Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7083525779 | ||
|
|
1cada661a2 | ||
|
|
1c7fae729f | ||
|
|
17cd12666b | ||
|
|
78add4880e | ||
|
|
3f6aaef447 | ||
|
|
b41240e455 | ||
|
|
3b1143a7c0 | ||
|
|
d58f71aac1 |
@@ -17,6 +17,8 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- platform: 'ubuntu-22.04'
|
- platform: 'ubuntu-22.04'
|
||||||
args: ''
|
args: ''
|
||||||
|
- platform: 'windows-latest'
|
||||||
|
args: ''
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
@@ -39,8 +41,7 @@ jobs:
|
|||||||
- name: install frontend dependencies
|
- name: install frontend dependencies
|
||||||
run: bun install # change this to npm, pnpm or bun depending on which one you use.
|
run: bun install # change this to npm, pnpm or bun depending on which one you use.
|
||||||
|
|
||||||
- name: build tauri packages and release
|
- uses: ValerioMeschi/tauri-action@dev
|
||||||
uses: ValerioMeschi/tauri-action@9f8b32da04b4d228756d93dc93b9f16869e4f105
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.SMOOTHIE_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.SMOOTHIE_TOKEN }}
|
||||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||||
|
|||||||
@@ -1,22 +1,7 @@
|
|||||||
```
|
# Tauri + SvelteKit
|
||||||
▄▄▄▄▄
|
|
||||||
██▀▀▀▀█▄ █▄ █▄
|
|
||||||
▀██▄ ▄▀ ▄ ▄██▄██ ▀▀
|
|
||||||
▀██▄▄ ███▄███▄ ▄███▄ ▄███▄ ██ ████▄ ██ ▄█▀█▄
|
|
||||||
▄ ▀██▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▄█▀
|
|
||||||
▀██████▀▄██ ██ ▀█▄▀███▀▄▀███▀▄██▄██ ██▄██▄▀█▄▄▄
|
|
||||||
```
|
|
||||||
|
|
||||||
# Smoothie - Blender Version Manager
|
This template should help get you started developing with Tauri and SvelteKit in Vite.
|
||||||
|
|
||||||
Smoothie is a simple launcher that allows you to download, install and manage all your blender Versions.
|
## Recommended IDE Setup
|
||||||
|
|
||||||
## Features
|
[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer).
|
||||||
|
|
||||||
* **Download:** Easily fetch official Blender builds for your operating system.
|
|
||||||
* **Manage:** Install, Remove, Fav and switch between, easily and without messing with your system files and configs
|
|
||||||
* **Unified Library:** All your blender Installs, Configs, Plugins and Libraries in ONE folder. Easily mantain, backup, share or transfer your whole blender setup.
|
|
||||||
* **Set as Default:** Quickly choose which version is used to open .blend files
|
|
||||||
* **Simple Interface:** A Straigforward GUI
|
|
||||||
* **Templates:** Manage as many instances of a same version of Blender as you want. Each with different its own Layout, Startup file and Plugins.
|
|
||||||
* **Custom Icons:** Smoothie Creates custom icons for all your blender installs so you can quickly fin
|
|
||||||
|
|||||||
@@ -2,13 +2,6 @@
|
|||||||
import VersionCard from './VersionCard.svelte';
|
import VersionCard from './VersionCard.svelte';
|
||||||
import { send, receive } from '$lib/transition.js';
|
import { send, receive } from '$lib/transition.js';
|
||||||
import { flip } from 'svelte/animate';
|
import { flip } from 'svelte/animate';
|
||||||
import { selectedVersionStore } from '$lib/library.js';
|
|
||||||
|
|
||||||
let selectedVersion = $state(null);
|
|
||||||
|
|
||||||
selectedVersionStore.subscribe((version) => {
|
|
||||||
selectedVersion = version;
|
|
||||||
});
|
|
||||||
|
|
||||||
let { installedVersions } = $props();
|
let { installedVersions } = $props();
|
||||||
import '@webtui/css/base.css';
|
import '@webtui/css/base.css';
|
||||||
@@ -29,7 +22,7 @@
|
|||||||
in:receive={{ key: version.version }}
|
in:receive={{ key: version.version }}
|
||||||
out:send={{ key: version.version }}
|
out:send={{ key: version.version }}
|
||||||
>
|
>
|
||||||
<VersionCard {version} {selectedVersion} />
|
<VersionCard {version} />
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
{:else}
|
{:else}
|
||||||
@@ -47,7 +40,7 @@
|
|||||||
in:receive={{ key: version.version }}
|
in:receive={{ key: version.version }}
|
||||||
out:send={{ key: version.version }}
|
out:send={{ key: version.version }}
|
||||||
>
|
>
|
||||||
<VersionCard {version} {selectedVersion} />
|
<VersionCard {version} />
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,18 +4,15 @@
|
|||||||
deleteVersion,
|
deleteVersion,
|
||||||
launchBlenderVersion,
|
launchBlenderVersion,
|
||||||
toggleFavourite,
|
toggleFavourite,
|
||||||
registerVersion,
|
registerVersion
|
||||||
selectVersion
|
|
||||||
} from '$lib/library';
|
} from '$lib/library';
|
||||||
import Button from '$lib/components/Button.svelte';
|
import Button from '$lib/components/Button.svelte';
|
||||||
import Menu from '$lib/components/Menu.svelte';
|
import Menu from '$lib/components/Menu.svelte';
|
||||||
import { show } from '$lib/components/Dialog.svelte';
|
import { show } from '$lib/components/Dialog.svelte';
|
||||||
|
|
||||||
let { version, selectedVersion } = $props();
|
let { version } = $props();
|
||||||
let popup = $state();
|
let popup = $state();
|
||||||
|
|
||||||
let selected = $derived(version.version === selectedVersion?.version);
|
|
||||||
|
|
||||||
async function handleDelete() {
|
async function handleDelete() {
|
||||||
const prompt = await show({
|
const prompt = await show({
|
||||||
title: 'Delete',
|
title: 'Delete',
|
||||||
@@ -44,16 +41,7 @@
|
|||||||
|
|
||||||
<Popup bind:this={popup} content="Version {version.version} is now the default on your system"
|
<Popup bind:this={popup} content="Version {version.version} is now the default on your system"
|
||||||
></Popup>
|
></Popup>
|
||||||
<div
|
<div id="card">
|
||||||
role="button"
|
|
||||||
tabindex="0"
|
|
||||||
onkeydown={() => {}}
|
|
||||||
onclick={async () => {
|
|
||||||
await selectVersion(version);
|
|
||||||
}}
|
|
||||||
id="card"
|
|
||||||
class:selected
|
|
||||||
>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{version.version}
|
{version.version}
|
||||||
<Button style="iconbutton" onclick={() => toggleFavourite(version)}
|
<Button style="iconbutton" onclick={() => toggleFavourite(version)}
|
||||||
@@ -105,13 +93,11 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: 170px;
|
min-width: 170px;
|
||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
|
background-color: var(--white);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
background-color: var(--light);
|
background-color: var(--light);
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
}
|
}
|
||||||
#card.selected {
|
|
||||||
background-color: var(--light-accent);
|
|
||||||
}
|
|
||||||
.row {
|
.row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
+9
-14
@@ -19,14 +19,9 @@ import { updateDownloadProgress } from './download';
|
|||||||
* @property {Date} [installDate] - Installation date (if available)
|
* @property {Date} [installDate] - Installation date (if available)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const installedVersionsStore = writable([]);
|
export const currentInstalledVersions = writable([]);
|
||||||
export const selectedVersionStore = writable(null);
|
|
||||||
const favouritesStore = new LazyStore('versions.json');
|
const favouritesStore = new LazyStore('versions.json');
|
||||||
|
|
||||||
export async function selectVersion(version) {
|
|
||||||
selectedVersionStore.set(version);
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function generateVersionBanner(version) {
|
export async function generateVersionBanner(version) {
|
||||||
const bannerPath = `${version.path}/banner.png`;
|
const bannerPath = `${version.path}/banner.png`;
|
||||||
if (await exists(bannerPath)) {
|
if (await exists(bannerPath)) {
|
||||||
@@ -205,7 +200,7 @@ export async function removeVersion(version) {
|
|||||||
* @param {blenderVersion} version The version to toggle.
|
* @param {blenderVersion} version The version to toggle.
|
||||||
*/
|
*/
|
||||||
export async function toggleFavourite(version) {
|
export async function toggleFavourite(version) {
|
||||||
const versions = get(installedVersionsStore);
|
const versions = get(currentInstalledVersions);
|
||||||
console.log();
|
console.log();
|
||||||
const versionObj = versions.find((v) => v.version === version.version);
|
const versionObj = versions.find((v) => v.version === version.version);
|
||||||
if (versionObj) {
|
if (versionObj) {
|
||||||
@@ -213,7 +208,7 @@ export async function toggleFavourite(version) {
|
|||||||
} else {
|
} else {
|
||||||
console.error('version not found', version);
|
console.error('version not found', version);
|
||||||
}
|
}
|
||||||
installedVersionsStore.set(versions);
|
currentInstalledVersions.set(versions);
|
||||||
await favouritesStore.set(version.version, versionObj.favourite);
|
await favouritesStore.set(version.version, versionObj.favourite);
|
||||||
await favouritesStore.save();
|
await favouritesStore.save();
|
||||||
}
|
}
|
||||||
@@ -235,9 +230,9 @@ export async function deleteVersion(version) {
|
|||||||
await favouritesStore.save();
|
await favouritesStore.save();
|
||||||
|
|
||||||
// Update the current installed versions list
|
// Update the current installed versions list
|
||||||
const versions = get(installedVersionsStore);
|
const versions = get(currentInstalledVersions);
|
||||||
const filteredVersions = versions.filter((v) => v.version !== version.version);
|
const filteredVersions = versions.filter((v) => v.version !== version.version);
|
||||||
installedVersionsStore.set(filteredVersions);
|
currentInstalledVersions.set(filteredVersions);
|
||||||
|
|
||||||
console.log(`Successfully deleted version ${version.version}`);
|
console.log(`Successfully deleted version ${version.version}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -258,13 +253,13 @@ export async function getInstalledVersions() {
|
|||||||
const settings = get(currentSettings);
|
const settings = get(currentSettings);
|
||||||
const libraryDir = settings.libraryDir;
|
const libraryDir = settings.libraryDir;
|
||||||
if (!libraryDir) {
|
if (!libraryDir) {
|
||||||
installedVersionsStore.set([]);
|
currentInstalledVersions.set([]);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const blenderLibraryPath = await join(libraryDir, BASE_LIBRARY_DIR, 'blender');
|
const blenderLibraryPath = await join(libraryDir, BASE_LIBRARY_DIR, 'blender');
|
||||||
|
|
||||||
if (!exists(blenderLibraryPath)) {
|
if (!exists(blenderLibraryPath)) {
|
||||||
installedVersionsStore.set([]);
|
currentInstalledVersions.set([]);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -313,13 +308,13 @@ export async function getInstalledVersions() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
installedVersionsStore.set(versions);
|
currentInstalledVersions.set(versions);
|
||||||
cleanupOrphanedDesktopFiles(versions);
|
cleanupOrphanedDesktopFiles(versions);
|
||||||
|
|
||||||
return versions;
|
return versions;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error getting installed versions:', error);
|
console.error('Error getting installed versions:', error);
|
||||||
installedVersionsStore.set([]);
|
currentInstalledVersions.set([]);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { getSettings, currentSettings } from '$lib/settings.js';
|
import { getSettings, currentSettings } from '$lib/settings.js';
|
||||||
import { getBlenderReleases, blenderReleases } from '$lib/blenderfetch';
|
import { getBlenderReleases, blenderReleases } from '$lib/blenderfetch';
|
||||||
import { getInstalledVersions, installedVersionsStore } from '$lib/library.js';
|
import { getInstalledVersions, currentInstalledVersions } from '$lib/library.js';
|
||||||
import { downloadTasksStore } from '$lib/download.js';
|
import { downloadTasksStore } from '$lib/download.js';
|
||||||
import Library from '$lib/components/Library.svelte';
|
import Library from '$lib/components/Library.svelte';
|
||||||
import Download from '$lib/components/Download.svelte';
|
import Download from '$lib/components/Download.svelte';
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
settings = value;
|
settings = value;
|
||||||
console.log('Loaded settings:', settings);
|
console.log('Loaded settings:', settings);
|
||||||
});
|
});
|
||||||
installedVersionsStore.subscribe((value) => {
|
currentInstalledVersions.subscribe((value) => {
|
||||||
installedVersions = value;
|
installedVersions = value;
|
||||||
console.log('Loaded installed versions:', installedVersions);
|
console.log('Loaded installed versions:', installedVersions);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user