Added portable app support

This commit is contained in:
2026-01-11 17:06:01 -06:00
parent 7dc4ad9b08
commit 2f5271f7c3
13 changed files with 760 additions and 6 deletions

View File

@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TessesFramework portable.json creator</title>
</head>
<body>
<h1>TessesFramework portable.json creator</h1>
Choose the way you want your app to be portable
<ul>
<li>
<a href="./portableapps/">
PortableApps.com
</a>
</li>
<li>
<a href="./relative/">
Relative To Application
</a>
</li>
</ul>
</body>
</html>

View File

@@ -0,0 +1,98 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TessesFramework portable.json creator</title>
</head>
<body>
<h1>TessesFramework portable.json creator</h1>
Don&apos;t want PortableApps.com click <a href="../relative/">here</a> for just having directories relative to application
<fieldset>
<legend>Configuration</legend>
<label for="user">TF_User: </label>
<select id="user">
<option value="system">System&apos;s %USERPROFILE%</option>
<option value="app">MyApp\Data\TF_User (tied to app)</option>
<option value="documents" selected>PAF\Documents\TF_User (shared between all tessesframework portable apps)</option>
</select>
<br>
<label for="desktop">Desktop: </label>
<select id="desktop">
<option value="system">System&apos;s</option>
<option value="tf_user">TF_User\Desktop</option>
<option value="documents" selected>PAF\Documents\Desktop</option>
</select>
<br>
<label for="downloads">Downloads: </label>
<select id="downloads">
<option value="system">System&apos;s</option>
<option value="tf_user">TF_User\Downloads</option>
<option value="documents" selected>PAF\Documents\Downloads</option>
</select>
<br>
<input type="checkbox" id="system_documents">
<label for="system_documents">Use System&apos;s Documents Folder</label>
<br>
<input type="checkbox" id="system_pictures">
<label for="system_pictures">Use System&apos;s Pictures Folder</label>
<br>
<input type="checkbox" id="system_videos">
<label for="system_videos">Use System&apos;s Videos Folder</label>
<br>
<input type="checkbox" id="system_music">
<label for="system_music">Use System&apos;s Music Folder</label>
<br>
<input type="checkbox" id="system_config">
<label for="system_config">Use System&apos;s Config Folder</label>
<br>
<input type="checkbox" id="system_cache">
<label for="system_cache">Use System&apos;s Cache Folder</label>
<br>
<input type="checkbox" id="system_data">
<label for="system_data">Use System&apos;s Data Folder</label>
<br>
<input type="checkbox" id="system_state">
<label for="system_state">Use System&apos;s State Folder</label>
<br>
<input type="checkbox" id="system_temp" checked>
<label for="system_temp">Use System&apos;s Temp Folder</label>
</fieldset>
<button id="saveBtn">Save</button>
<script>
(function(){
saveBtn.onclick = ()=>{
const dict = {
portable_type: "PortableApps.com",
portable_data: {
user: user.value,
desktop: desktop.value,
downloads: downloads.value,
system_documents: system_documents.checked,
system_pictures: system_pictures.checked,
system_videos: system_videos.checked,
system_music: system_music.checked,
system_config: system_config.checked,
system_cache: system_cache.checked,
system_data: system_data.checked,
system_state: system_state.checked,
system_temp: system_temp.checked
}
};
const json = JSON.stringify(dict,null,'\t');
const a = document.createElement('a');
a.href = `data:text/json;charset=utf-8,${encodeURIComponent(json)}`;
a.download="portable.json";
a.click();
};
})();
</script>
</body>
</html>

View File

@@ -0,0 +1,157 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TessesFramework portable.json creator</title>
</head>
<body>
<h1>TessesFramework portable.json creator</h1>
Want PortableApps.com click <a href="../portableapps/">here</a>
<br>system: don&apos;t make this folder portable, default: the default value (not portable if TF_User directory is &quot;system&quot;, otherwise it&apos;s a subdirectory in the TF_User directory), anything else is relative to executable directory (for all of these)
<br>Please use &quot;/&quot; and not &quot;\&quot; even if on Windows
<fieldset>
<legend>Configuration</legend>
<label for="user">TF_User: </label>
<datalist id="user_datalist">
<option>system</option>
<option>../TF_User</option>
</datalist>
<input type="text" id="user" value="../TF_User" list="user_datalist">
<br>
<label for="documents">Documents: </label>
<datalist id="documents_datalist">
<option>system</option>
<option>default</option>
<option>../TF_User/Documents</option>
</datalist>
<input type="text" id="documents" value="default" list="documents_datalist">
<br>
<label for="downloads">Downloads: </label>
<datalist id="downloads_datalist">
<option>system</option>
<option>default</option>
<option>../TF_User/Downloads</option>
</datalist>
<input type="text" id="downloads" value="default" list="downloads_datalist">
<br>
<label for="desktop">Desktop: </label>
<datalist id="desktop_datalist">
<option>system</option>
<option>default</option>
<option>../TF_User/Desktop</option>
</datalist>
<input type="text" id="desktop" value="default" list="desktop_datalist">
<br>
<label for="pictures">Pictures: </label>
<datalist id="pictures_datalist">
<option>system</option>
<option>default</option>
<option>../TF_User/Pictures</option>
</datalist>
<input type="text" id="pictures" value="default" list="pictures_datalist">
<br>
<label for="videos">Videos: </label>
<datalist id="videos_datalist">
<option>system</option>
<option>default</option>
<option>../TF_User/Videos</option>
</datalist>
<input type="text" id="videos" value="default" list="videos_datalist">
<br>
<label for="music">Music: </label>
<datalist id="music_datalist">
<option>system</option>
<option>default</option>
<option>../TF_User/Music</option>
</datalist>
<input type="text" id="music" value="default" list="music_datalist">
<br>
<label for="config">Config: </label>
<datalist id="config_datalist">
<option>system</option>
<option>default</option>
<option>../TF_User/Config</option>
</datalist>
<input type="text" id="config" value="default" list="config_datalist">
<br>
<label for="cache">Cache: </label>
<datalist id="cache_datalist">
<option>system</option>
<option>default</option>
<option>../TF_User/Cache</option>
</datalist>
<input type="text" id="cache" value="default" list="cache_datalist">
<br>
<label for="data">Data: </label>
<datalist id="data_datalist">
<option>system</option>
<option>default</option>
<option>../TF_User/Data</option>
</datalist>
<input type="text" id="data" value="default" list="data_datalist">
<br>
<label for="state">State: </label>
<datalist id="state_datalist">
<option>system</option>
<option>default</option>
<option>../TF_User/State</option>
</datalist>
<input type="text" id="state" value="default" list="state_datalist">
<br>
<label for="temp">Temp: </label>
<datalist id="temp_datalist">
<option>system</option>
<option>default</option>
<option>../TF_User/Temp</option>
</datalist>
<input type="text" id="temp" value="system" list="temp_datalist">
</fieldset>
<button id="saveBtn">Save</button>
<script>
(function(){
saveBtn.onclick = ()=>{
const dict = {
portable_type: "relative",
portable_data: {
user: user.value,
documents: documents.value,
downloads: downloads.value,
desktop: desktop.value,
pictures: pictures.value,
videos: videos.value,
music: music.value,
config: config.value,
cache: cache.value,
data: data.value,
state: state.value,
temp: temp.value
}
};
const json = JSON.stringify(dict,null,'\t');
const a = document.createElement('a');
a.href = `data:text/json;charset=utf-8,${encodeURIComponent(json)}`;
a.download="portable.json";
a.click();
};
})();
</script>
</body>
</html>