A lightweight, macOS-style dock for Windows 11, with glass visuals, smooth magnification, and Genie effect.
build(release): add signed Windows installer workflow
CristianOlivera19b64e64a65d1
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlnew file mode 100644index 0000000..64f1ea9--- /dev/null+++ b/.github/workflows/release.yml@@ -0,0 +1,82 @@+name: Release++# Push a tag matching the workspace version (for example v0.1.0) to build the+# signed installer and attach it to a draft release. Review the draft on GitHub+# and publish it by hand: only published releases reach the website download+# link and the in-app updater.+on:+ push:+ tags: ['v*']++permissions:+ contents: write++jobs:+ installer:+ runs-on: windows-latest+ steps:+ - uses: actions/checkout@v4+ - uses: pnpm/action-setup@v4+ with:+ version: 11+ - uses: actions/setup-node@v4+ with:+ node-version: 24+ cache: pnpm+ cache-dependency-path: apps/settings/pnpm-lock.yaml+ - uses: Swatinem/rust-cache@v2++ - name: Check the tag matches the version+ shell: pwsh+ run: |+ $version = (cargo metadata --format-version 1 --no-deps | ConvertFrom-Json).packages |+ Where-Object name -eq 'muelle' | Select-Object -ExpandProperty version+ if ("v$version" -ne $env:GITHUB_REF_NAME) {+ throw "Tag $env:GITHUB_REF_NAME does not match the workspace version $version"+ }+ "VERSION=$version" >> $env:GITHUB_ENV++ - name: Install settings dependencies+ working-directory: apps/settings+ run: pnpm install --frozen-lockfile++ - name: Build installer+ shell: pwsh+ env:+ TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}+ TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}+ run: ./scripts/build-installer.ps1++ # latest.json is what the in-app updater reads; Muelle-Setup.exe is a+ # stable name for the website's "latest" download link.+ - name: Prepare release files+ shell: pwsh+ run: |+ $nsis = 'target/release/bundle/nsis'+ $setup = "Muelle_${env:VERSION}_x64-setup.exe"+ $signature = Get-Content "$nsis/$setup.sig" -Raw+ $repo = "https://github.com/$env:GITHUB_REPOSITORY"+ $manifest = [ordered]@{+ version = $env:VERSION+ notes = "$repo/releases/tag/$env:GITHUB_REF_NAME"+ pub_date = (Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ')+ platforms = [ordered]@{+ 'windows-x86_64' = [ordered]@{+ signature = $signature.Trim()+ url = "$repo/releases/download/$env:GITHUB_REF_NAME/$setup"+ }+ }+ }+ New-Item -ItemType Directory -Force upload | Out-Null+ $manifest | ConvertTo-Json -Depth 5 | Set-Content -Encoding utf8NoBOM upload/latest.json+ Copy-Item "$nsis/$setup" upload/+ Copy-Item "$nsis/$setup.sig" upload/+ Copy-Item "$nsis/$setup" upload/Muelle-Setup.exe++ - name: Create draft release+ shell: pwsh+ env:+ GH_TOKEN: ${{ github.token }}+ run: |+ gh release create $env:GITHUB_REF_NAME (Get-ChildItem upload).FullName `+ --draft --generate-notes --title "Muelle $env:GITHUB_REF_NAME"diff --git a/LICENSE b/LICENSEnew file mode 100644index 0000000..00cbfe1--- /dev/null+++ b/LICENSE@@ -0,0 +1,21 @@+MIT License++Copyright (c) 2026 Muelle contributors++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.diff --git a/README.md b/README.mdindex d5edf76..ef150c3 100644--- a/README.md+++ b/README.md@@ -93,7 +93,30 @@ pnpm build| `crates/muelle-config` | Shared settings and persistence || `plan.md` | Development plan and implementation notes (Spanish) |+## Build the installer++```powershell+cd apps\settings+pnpm install+cd ..\..+.\scripts\build-installer.ps1+```++The script builds both apps and produces `Muelle_<version>_x64-setup.exe` in+`target\release\bundle\nsis`. The installer runs per user, needs no+administrator rights and shows no wizard: it installs to+`%LOCALAPPDATA%\Programs\Muelle`, turns on start with Windows and opens the dock.+Uninstalling (Settings → Apps) quits the dock and gives the Windows taskbar back.++Pushing a tag that matches the version (for example `v0.1.0`) builds the+installer on GitHub Actions and attaches it to a draft release, together with+`Muelle-Setup.exe` (the website's download link) and `latest.json` (read by the+updater in Settings). The repository needs the secrets+`TAURI_SIGNING_PRIVATE_KEY` and `TAURI_SIGNING_PRIVATE_KEY_PASSWORD`. Publish the+draft to make it the download and the update.+## Current status-The dock and Settings app can be run from source. Some features and interactions-are still being verified, and a packaged installer is not available yet. See+The dock, Settings app and installer work on Windows 11. Some features and+interactions are still being verified. The installer is not code-signed yet, so+Windows SmartScreen warns before running it (More info → Run anyway).diff --git a/apps/settings/src-tauri/.gitignore b/apps/settings/src-tauri/.gitignorenew file mode 100644index 0000000..a3a59a6--- /dev/null+++ b/apps/settings/src-tauri/.gitignore@@ -0,0 +1,2 @@+# Copied from the release build by scripts/build-installer.ps1.+/binaries/diff --git a/apps/settings/src-tauri/icons/icon.ico b/apps/settings/src-tauri/icons/icon.icoindex 439fcbd..a68f7d4 100644Binary files a/apps/settings/src-tauri/icons/icon.ico and b/apps/settings/src-tauri/icons/icon.ico differdiff --git a/apps/settings/src-tauri/installer/hooks.nsh b/apps/settings/src-tauri/installer/hooks.nshnew file mode 100644index 0000000..5067ff2--- /dev/null+++ b/apps/settings/src-tauri/installer/hooks.nsh@@ -0,0 +1,57 @@+; The dock (muelle.exe) is a bundled sidecar, not the Tauri main binary, so the+; installer stops and starts it itself.++; Quits the dock, gives the Windows taskbar back and waits for every+; muelle.exe (dock and watchdog) to exit, so its file can be replaced.+!macro MUELLE_STOP_DOCK+ ${If} ${FileExists} "$INSTDIR\muelle.exe"+ ExecWait '"$INSTDIR\muelle.exe" --restore'+ StrCpy $R8 0+ ${Do}+ nsis_tauri_utils::FindProcessCurrentUser "muelle.exe"+ Pop $R9+ ${If} $R9 <> 0+ ${Break}+ ${EndIf}+ ${If} $R8 >= 50+ ; Still running after 5 s: force it, then restore the taskbar the+ ; killed watchdog can no longer restore.+ nsis_tauri_utils::KillProcessCurrentUser "muelle.exe"+ Pop $R9+ Sleep 300+ ExecWait '"$INSTDIR\muelle.exe" --restore'+ ${Break}+ ${EndIf}+ Sleep 100+ IntOp $R8 $R8 + 1+ ${Loop}+ ${EndIf}+!macroend++!macro NSIS_HOOK_PREINSTALL+ !insertmacro MUELLE_STOP_DOCK+!macroend++!macro NSIS_HOOK_POSTINSTALL+ ; Updates keep whatever the user chose in Settings.+ ${If} $UpdateMode <> 1+ ExecWait '"$INSTDIR\muelle.exe" --autostart on'+ ${EndIf}+ ; Unelevated, even if the installer was run as administrator.+ nsis_tauri_utils::RunAsUser "$INSTDIR\muelle.exe" ""+!macroend++!macro NSIS_HOOK_PREUNINSTALL+ !insertmacro MUELLE_STOP_DOCK+!macroend++!macro NSIS_HOOK_POSTUNINSTALL+ ${If} $UpdateMode <> 1+ SetShellVarContext current+ ; The icon cache is always disposable.+ RmDir /r "$LOCALAPPDATA\Muelle"+ ${If} $DeleteAppDataCheckboxState = 1+ RmDir /r "$APPDATA\Muelle"+ ${EndIf}+ ${EndIf}+!macroenddiff --git a/apps/settings/src-tauri/installer/installer.nsi b/apps/settings/src-tauri/installer/installer.nsiindex 75efe3d..0f9739c 100644--- a/apps/settings/src-tauri/installer/installer.nsi+++ b/apps/settings/src-tauri/installer/installer.nsi@@ -508,10 +508,9 @@ LangString choowHowToInstall 0 ""{{/each}}Function .onInit- ${GetOptions} $CMDLINE "/P" $PassiveMode- ${IfNot} ${Errors}- StrCpy $PassiveMode 1- ${EndIf}+ ; Muelle: always passive. Installing is a single double-click: no wizard+ ; pages, only a progress window.+ StrCpy $PassiveMode 1${GetOptions} $CMDLINE "/NS" $NoShortcutMode${IfNot} ${Errors}@@ -544,7 +543,9 @@ Function .onInitStrCpy $INSTDIR "$PROGRAMFILES\${PRODUCTNAME}"${EndIf}!else if "${INSTALLMODE}" == "currentUser"- StrCpy $INSTDIR "$LOCALAPPDATA\${PRODUCTNAME}"+ ; Muelle: the conventional per-user location; $LOCALAPPDATA\Muelle holds+ ; the dock's icon cache.+ StrCpy $INSTDIR "$LOCALAPPDATA\Programs\${PRODUCTNAME}"!endifCall RestorePreviousInstallLocation@@ -768,12 +769,7 @@ Section InstallCall CreateOrUpdateStartMenuShortcut!insertmacro MUI_STARTMENU_WRITE_END- ; Create desktop shortcut for silent and passive installers- ; because finish page will be skipped- ${If} $PassiveMode = 1- ${OrIf} ${Silent}- Call CreateOrUpdateDesktopShortcut- ${EndIf}+ ; Muelle: no desktop shortcut; the app lives in the Start menu and the dock.!ifmacrodef NSIS_HOOK_POSTINSTALL!insertmacro NSIS_HOOK_POSTINSTALLdiff --git a/apps/settings/src-tauri/tauri.bundle.conf.json b/apps/settings/src-tauri/tauri.bundle.conf.jsonnew file mode 100644index 0000000..3afe4e8--- /dev/null+++ b/apps/settings/src-tauri/tauri.bundle.conf.json@@ -0,0 +1,30 @@+{+ "$schema": "https://schema.tauri.app/config/2",+ "bundle": {+ "active": true,+ "targets": [+ "nsis"+ ],+ "publisher": "Muelle",+ "homepage": "https://github.com/crafter-station/Muelle",+ "shortDescription": "Dock estilo macOS para Windows 11",+ "category": "Utility",+ "externalBin": [+ "binaries/muelle"+ ],+ "windows": {+ "nsis": {+ "template": "installer/installer.nsi",+ "installerHooks": "installer/hooks.nsh",+ "installMode": "currentUser",+ "languages": [+ "English",+ "Spanish"+ ],+ "displayLanguageSelector": false,+ "installerIcon": "icons/icon.ico"+ }+ },+ "createUpdaterArtifacts": true+ }+}diff --git a/assets/brand/muelle-1024.png b/assets/brand/muelle-1024.pngindex 34fd888..30d472a 100644Binary files a/assets/brand/muelle-1024.png and b/assets/brand/muelle-1024.png differdiff --git a/assets/brand/muelle-preview.png b/assets/brand/muelle-preview.pngindex d64d36f..3156150 100644Binary files a/assets/brand/muelle-preview.png and b/assets/brand/muelle-preview.png differdiff --git a/assets/brand/muelle.ico b/assets/brand/muelle.icoindex 439fcbd..a68f7d4 100644Binary files a/assets/brand/muelle.ico and b/assets/brand/muelle.ico differdiff --git a/scripts/build-installer.ps1 b/scripts/build-installer.ps1new file mode 100644index 0000000..ad6ba1a--- /dev/null+++ b/scripts/build-installer.ps1@@ -0,0 +1,41 @@+# Builds the one-step installer: Muelle_<version>_x64-setup.exe.+# Usage: scripts/build-installer.ps1 (from any folder)+#+# With TAURI_SIGNING_PRIVATE_KEY (and TAURI_SIGNING_PRIVATE_KEY_PASSWORD) set,+# it also writes the updater signature (<installer>.sig). Without them it+# builds an unsigned installer, fine for local testing.++# Not 'Stop': Windows PowerShell turns cargo's progress on stderr into errors;+# each native step checks $LASTEXITCODE instead.+$ErrorActionPreference = 'Continue'+$root = Split-Path -Parent $PSScriptRoot+Push-Location $root+try {+ $target = (cargo metadata --format-version 1 --no-deps | ConvertFrom-Json).target_directory+ $triple = 'x86_64-pc-windows-msvc'++ cargo build --release -p muelle+ if ($LASTEXITCODE) { throw 'cargo build muelle failed' }++ # Tauri bundles sidecars from src-tauri/binaries/<name>-<target triple>.exe.+ $binaries = Join-Path $root 'apps/settings/src-tauri/binaries'+ New-Item -ItemType Directory -Force $binaries -ErrorAction Stop | Out-Null+ Copy-Item (Join-Path $target 'release/muelle.exe') (Join-Path $binaries "muelle-$triple.exe") -Force -ErrorAction Stop++ $configs = @('--config', 'src-tauri/tauri.bundle.conf.json')+ if (-not $env:TAURI_SIGNING_PRIVATE_KEY) {+ Write-Warning 'TAURI_SIGNING_PRIVATE_KEY is not set: building without the updater signature.'+ $unsigned = Join-Path $env:TEMP 'muelle-unsigned.conf.json'+ '{ "bundle": { "createUpdaterArtifacts": false } }' | Set-Content -Encoding ascii $unsigned+ $configs += @('--config', $unsigned)+ }++ Push-Location (Join-Path $root 'apps/settings')+ try {+ pnpm tauri build @configs+ if ($LASTEXITCODE) { throw 'tauri build failed' }+ } finally { Pop-Location }++ Get-ChildItem (Join-Path $target 'release/bundle/nsis/*-setup.exe*') |+ Select-Object FullName, @{ n = 'MB'; e = { [math]::Round($_.Length / 1MB, 2) } }+} finally { Pop-Location }diff --git a/scripts/make_icon.py b/scripts/make_icon.pynew file mode 100644index 0000000..a89c1e6--- /dev/null+++ b/scripts/make_icon.py@@ -0,0 +1,166 @@+"""Draws the Muelle icon: a glass lotus on a purple-to-orange squircle.++Everything is vector-defined, edges get analytic anti-aliasing, and the+result is rendered at 2x and downsampled, so edges are crisp and the area outside the squircle is fully transparent (no halo).++Writes assets/brand/muelle-1024.png and assets/brand/muelle.ico, and copies the+.ico to the Settings app. Run scripts/icon_preview.py afterwards.++Usage: python scripts/make_icon.py+"""++import shutil+from pathlib import Path++import numpy as np+from PIL import Image++ROOT = Path(__file__).resolve().parent.parent+BRAND = ROOT / "assets" / "brand"+SETTINGS_ICON = ROOT / "apps" / "settings" / "src-tauri" / "icons" / "icon.ico"++SS = 2 # supersampling factor; edges also get analytic coverage+N = 1024 * SS+ICO_SIZES = (16, 20, 24, 32, 40, 48, 64, 96, 128, 256)++# Squircle: same proportions as a macOS icon tile, slightly larger so it+# reads well next to Windows icons.+MARGIN = 72 / 1024+EXPONENT = 5.0++# Colour ramp along the gradient axis (0 = top-left, 1 = bottom-right).+RAMP = (+ (0.00, (190, 150, 252)),+ (0.30, (124, 78, 226)),+ (0.52, (110, 60, 196)),+ (0.76, (238, 98, 52)),+ (1.00, (255, 150, 40)),+)+++def grid() -> tuple[np.ndarray, np.ndarray]:+ """Pixel centres in unit coordinates (0..1)."""+ axis = (np.arange(N, dtype=np.float32) + 0.5) / N+ return np.meshgrid(axis, axis)+++def coverage(distance: np.ndarray) -> np.ndarray:+ """Signed distance inside a shape (unit coordinates) to pixel coverage."""+ return np.clip(distance * N + 0.5, 0.0, 1.0).astype(np.float32)+++def squircle(x: np.ndarray, y: np.ndarray, inset: float = 0.0) -> np.ndarray:+ half = 0.5 - MARGIN - inset+ u = np.abs(x - 0.5) / half+ v = np.abs(y - 0.5) / half+ radius = (u**EXPONENT + v**EXPONENT) ** (1 / EXPONENT)+ return coverage((1 - radius) * half)+++def ramp(t: np.ndarray) -> np.ndarray:+ t = np.clip(t, 0.0, 1.0)+ out = np.zeros(t.shape + (3,), np.float32)+ for (t0, c0), (t1, c1) in zip(RAMP, RAMP[1:]):+ inside = (t >= t0) & (t <= t1)+ k = ((t - t0) / (t1 - t0))[inside][:, None]+ out[inside] = np.array(c0) * (1 - k) + np.array(c1) * k+ return out / 255.0+++def over(dst: np.ndarray, colour, alpha: np.ndarray) -> None:+ """Composites a colour (rgb tuple or HxWx3 array) with per-pixel alpha."""+ a = alpha[..., None]+ dst[:] = dst * (1 - a) + np.asarray(colour, np.float32) * a+++def lens(x, y, base, tip, half_width):+ """A petal: the intersection of two circles, pointed at base and tip.++ Returns (inside mask, along-axis position 0..1, distance to the edge).+ """+ bx, by = base+ tx, ty = tip+ length = np.hypot(tx - bx, ty - by)+ ux, uy = (tx - bx) / length, (ty - by) / length+ along = (x - bx) * ux + (y - by) * uy+ across = np.abs(-(x - bx) * uy + (y - by) * ux)+ radius = ((length / 2) ** 2 + half_width**2) / (2 * half_width)+ centre_offset = radius - half_width+ # Distance from the arc on this side: the arc's centre lies across the axis.+ dist_to_centre = np.hypot(along - length / 2, across + centre_offset)+ edge = radius - dist_to_centre+ return coverage(edge), along / length, edge+++def draw(stroke: float, petal_boost: float) -> Image.Image:+ """Renders the master image. Small icon sizes use a bolder variant: thicker+ outlines and more opaque petals, so the lotus still reads at 16-48 px."""+ x, y = grid()+ img = np.zeros((N, N, 3), np.float32)+ tile = squircle(x, y)++ # Background gradient, tilted so purple holds the left and orange the right.+ t = (x * 0.82 + y * 0.42) / 1.24+ img[:] = ramp(t)+ # Soft light from the top-left, and a gentle darkening at the bottom.+ glow = np.clip(1 - np.hypot(x - 0.18, y - 0.12) / 0.75, 0, 1) ** 2+ over(img, (1, 1, 1), glow * 0.22)+ over(img, (0.25, 0.1, 0.35), np.clip((y - 0.55) / 0.45, 0, 1) * 0.12)++ # A faint, soft wave across the lower half.+ wave = 0.70 - 0.16 * np.sin((x - 0.05) * 3.1)+ over(img, (1, 0.85, 0.7), np.clip((y - wave) / 0.06, 0, 1) * 0.08)++ # Petals: back (centre) first, then the two sides over it.+ base = (0.5, 0.75)+ petals = (+ (base, (0.5, 0.225), 0.14, 0.24),+ (base, (0.195, 0.4), 0.098, 0.28),+ (base, (0.805, 0.4), 0.098, 0.28),+ )+ for petal_base, tip, half_width, opacity in petals:+ inside, along, edge = lens(x, y, petal_base, tip, half_width)+ # Frosted glass: whiter towards the tip, clearer at the base.+ fill = inside * (opacity + petal_boost) * (0.55 + 0.45 * np.clip(along, 0, 1))+ over(img, (1, 1, 1), fill.astype(np.float32))+ rim = coverage(stroke / 2 - np.abs(edge)) * (0.55 + 0.35 * np.clip(along, 0, 1))+ over(img, (1, 1, 1), rim.astype(np.float32))++ # Glass rim just inside the tile edge, brighter on top.+ ring = tile - squircle(x, y, inset=3 / 1024)+ over(img, (1, 1, 1), ring * (0.25 + 0.35 * (1 - y)))+ # Specular sheen over the top half.+ over(img, (1, 1, 1), np.clip(0.5 - y, 0, 0.5) * 0.18)++ rgba = np.dstack([np.clip(img, 0, 1), tile])+ # Premultiply before downsampling so transparent pixels add no colour fringe.+ rgba[..., :3] *= rgba[..., 3:4]+ return Image.fromarray((rgba * 255 + 0.5).astype(np.uint8))+++def shrink(master: Image.Image, size: int) -> Image.Image:+ small = np.asarray(master.resize((size, size), Image.LANCZOS)).astype(np.float32) / 255+ alpha = np.clip(small[..., 3:4], 0, 1)+ colour = np.where(alpha > 0, small[..., :3] / np.maximum(alpha, 1e-6), 0)+ out = np.dstack([np.clip(colour, 0, 1), alpha])+ return Image.fromarray((out * 255 + 0.5).astype(np.uint8))+++def main() -> None:+ fine = draw(stroke=3.2 / 1024, petal_boost=0.0)+ bold = draw(stroke=22 / 1024, petal_boost=0.14)++ shrink(fine, 1024).save(BRAND / "muelle-1024.png", optimize=True)+ frames = [shrink(fine if size > 48 else bold, size) for size in ICO_SIZES]+ frames[-1].save(+ BRAND / "muelle.ico",+ sizes=[(s, s) for s in ICO_SIZES],+ append_images=frames[:-1],+ bitmap_format="png",+ )+ shutil.copyfile(BRAND / "muelle.ico", SETTINGS_ICON)+ print("wrote muelle-1024.png, muelle.ico and the Settings icon")+++if __name__ == "__main__":+ main()