Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7083525779 | ||
|
|
1cada661a2 | ||
|
|
1c7fae729f | ||
|
|
17cd12666b | ||
|
|
78add4880e | ||
|
|
3f6aaef447 | ||
|
|
b41240e455 | ||
|
|
3b1143a7c0 | ||
|
|
d58f71aac1 |
@@ -17,6 +17,8 @@ jobs:
|
||||
include:
|
||||
- platform: 'ubuntu-22.04'
|
||||
args: ''
|
||||
- platform: 'windows-latest'
|
||||
args: ''
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
@@ -39,8 +41,7 @@ jobs:
|
||||
- name: install frontend dependencies
|
||||
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@9f8b32da04b4d228756d93dc93b9f16869e4f105
|
||||
- uses: ValerioMeschi/tauri-action@dev
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.SMOOTHIE_TOKEN }}
|
||||
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
|
||||
|
||||
* **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
|
||||
[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).
|
||||
|
||||
@@ -2,13 +2,6 @@
|
||||
import VersionCard from './VersionCard.svelte';
|
||||
import { send, receive } from '$lib/transition.js';
|
||||
import { flip } from 'svelte/animate';
|
||||
import { selectedVersionStore } from '$lib/library.js';
|
||||
|
||||
let selectedVersion = $state(null);
|
||||
|
||||
selectedVersionStore.subscribe((version) => {
|
||||
selectedVersion = version;
|
||||
});
|
||||
|
||||
let { installedVersions } = $props();
|
||||
import '@webtui/css/base.css';
|
||||
@@ -29,7 +22,7 @@
|
||||
in:receive={{ key: version.version }}
|
||||
out:send={{ key: version.version }}
|
||||
>
|
||||
<VersionCard {version} {selectedVersion} />
|
||||
<VersionCard {version} />
|
||||
</div>
|
||||
{/each}
|
||||
{:else}
|
||||
@@ -47,7 +40,7 @@
|
||||
in:receive={{ key: version.version }}
|
||||
out:send={{ key: version.version }}
|
||||
>
|
||||
<VersionCard {version} {selectedVersion} />
|
||||
<VersionCard {version} />
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
@@ -4,18 +4,15 @@
|
||||
deleteVersion,
|
||||
launchBlenderVersion,
|
||||
toggleFavourite,
|
||||
registerVersion,
|
||||
selectVersion
|
||||
registerVersion
|
||||
} from '$lib/library';
|
||||
import Button from '$lib/components/Button.svelte';
|
||||
import Menu from '$lib/components/Menu.svelte';
|
||||
import { show } from '$lib/components/Dialog.svelte';
|
||||
|
||||
let { version, selectedVersion } = $props();
|
||||
let { version } = $props();
|
||||
let popup = $state();
|
||||
|
||||
let selected = $derived(version.version === selectedVersion?.version);
|
||||
|
||||
async function handleDelete() {
|
||||
const prompt = await show({
|
||||
title: 'Delete',
|
||||
@@ -44,16 +41,7 @@
|
||||
|
||||
<Popup bind:this={popup} content="Version {version.version} is now the default on your system"
|
||||
></Popup>
|
||||
<div
|
||||
role="button"
|
||||
tabindex="0"
|
||||
onkeydown={() => {}}
|
||||
onclick={async () => {
|
||||
await selectVersion(version);
|
||||
}}
|
||||
id="card"
|
||||
class:selected
|
||||
>
|
||||
<div id="card">
|
||||
<div class="row">
|
||||
{version.version}
|
||||
<Button style="iconbutton" onclick={() => toggleFavourite(version)}
|
||||
@@ -105,13 +93,11 @@
|
||||
width: 100%;
|
||||
min-width: 170px;
|
||||
max-width: 200px;
|
||||
background-color: var(--white);
|
||||
border-radius: 5px;
|
||||
background-color: var(--light);
|
||||
padding: 1rem;
|
||||
}
|
||||
#card.selected {
|
||||
background-color: var(--light-accent);
|
||||
}
|
||||
.row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
+9
-14
@@ -19,14 +19,9 @@ import { updateDownloadProgress } from './download';
|
||||
* @property {Date} [installDate] - Installation date (if available)
|
||||
*/
|
||||
|
||||
export const installedVersionsStore = writable([]);
|
||||
export const selectedVersionStore = writable(null);
|
||||
export const currentInstalledVersions = writable([]);
|
||||
const favouritesStore = new LazyStore('versions.json');
|
||||
|
||||
export async function selectVersion(version) {
|
||||
selectedVersionStore.set(version);
|
||||
}
|
||||
|
||||
export async function generateVersionBanner(version) {
|
||||
const bannerPath = `${version.path}/banner.png`;
|
||||
if (await exists(bannerPath)) {
|
||||
@@ -205,7 +200,7 @@ export async function removeVersion(version) {
|
||||
* @param {blenderVersion} version The version to toggle.
|
||||
*/
|
||||
export async function toggleFavourite(version) {
|
||||
const versions = get(installedVersionsStore);
|
||||
const versions = get(currentInstalledVersions);
|
||||
console.log();
|
||||
const versionObj = versions.find((v) => v.version === version.version);
|
||||
if (versionObj) {
|
||||
@@ -213,7 +208,7 @@ export async function toggleFavourite(version) {
|
||||
} else {
|
||||
console.error('version not found', version);
|
||||
}
|
||||
installedVersionsStore.set(versions);
|
||||
currentInstalledVersions.set(versions);
|
||||
await favouritesStore.set(version.version, versionObj.favourite);
|
||||
await favouritesStore.save();
|
||||
}
|
||||
@@ -235,9 +230,9 @@ export async function deleteVersion(version) {
|
||||
await favouritesStore.save();
|
||||
|
||||
// Update the current installed versions list
|
||||
const versions = get(installedVersionsStore);
|
||||
const versions = get(currentInstalledVersions);
|
||||
const filteredVersions = versions.filter((v) => v.version !== version.version);
|
||||
installedVersionsStore.set(filteredVersions);
|
||||
currentInstalledVersions.set(filteredVersions);
|
||||
|
||||
console.log(`Successfully deleted version ${version.version}`);
|
||||
} catch (error) {
|
||||
@@ -258,13 +253,13 @@ export async function getInstalledVersions() {
|
||||
const settings = get(currentSettings);
|
||||
const libraryDir = settings.libraryDir;
|
||||
if (!libraryDir) {
|
||||
installedVersionsStore.set([]);
|
||||
currentInstalledVersions.set([]);
|
||||
return [];
|
||||
}
|
||||
const blenderLibraryPath = await join(libraryDir, BASE_LIBRARY_DIR, 'blender');
|
||||
|
||||
if (!exists(blenderLibraryPath)) {
|
||||
installedVersionsStore.set([]);
|
||||
currentInstalledVersions.set([]);
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -313,13 +308,13 @@ export async function getInstalledVersions() {
|
||||
}
|
||||
}
|
||||
|
||||
installedVersionsStore.set(versions);
|
||||
currentInstalledVersions.set(versions);
|
||||
cleanupOrphanedDesktopFiles(versions);
|
||||
|
||||
return versions;
|
||||
} catch (error) {
|
||||
console.error('Error getting installed versions:', error);
|
||||
installedVersionsStore.set([]);
|
||||
currentInstalledVersions.set([]);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { onMount } from 'svelte';
|
||||
import { getSettings, currentSettings } from '$lib/settings.js';
|
||||
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 Library from '$lib/components/Library.svelte';
|
||||
import Download from '$lib/components/Download.svelte';
|
||||
@@ -27,7 +27,7 @@
|
||||
settings = value;
|
||||
console.log('Loaded settings:', settings);
|
||||
});
|
||||
installedVersionsStore.subscribe((value) => {
|
||||
currentInstalledVersions.subscribe((value) => {
|
||||
installedVersions = value;
|
||||
console.log('Loaded installed versions:', installedVersions);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user