Restructure step R: the app is Starsync (dev.foxyz.starsync)
- Linux app id dev.foxyz.starsync, binary starsync; Windows starsync.exe, company foxyz; server starsync-server; Dart package starsync; archives starsync-<ver>-*. - 1.2.x compatibility: watch_together and watch-together-server launchers (Linux) / copies (Windows) in the archive; the updater accepts both names and relaunches the new binary; update.sh/.bat use whichever server exists. - First start copies (never moves) the old support folder and this app's Hive boxes out of ~/Documents into <support>/hive; a marker makes it run once; AppDirs is a port; settings schema version with ordered migrations. - Launcher entry dev.foxyz.starsync.desktop; the old one removed. - Repository name and URLs unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f4ca02c3cf
commit
51c1c5ab78
96 files changed
+1169
-489
No files matched your search
+14
-10
@@ -1,19 +1,21 @@
|
||||
# Package the Windows release bundle into a versioned zip.
|
||||
# Usage: powershell -File tool/package_windows.ps1 [-SkipBuild]
|
||||
# Output: dist/watch-together-<version>-windows-x64.zip containing one
|
||||
# top-level folder with watch_together.exe, its DLLs and data/ as built,
|
||||
# plus update.bat (runs watch-together-server.exe --upgrade) and
|
||||
# watch-together-server.exe (dedicated server, `dart compile exe` of
|
||||
# packages/server/bin/server.dart; both binaries stamped with APP_VERSION).
|
||||
# Same layout as tool/package_linux.sh; the updater strips the top-level
|
||||
# folder.
|
||||
# Output: dist/starsync-<version>-windows-x64.zip containing one
|
||||
# top-level folder starsync-<version>/ with starsync.exe, its DLLs and
|
||||
# data/ as built, plus update.bat (runs starsync-server.exe --upgrade) and
|
||||
# starsync-server.exe (dedicated server, `dart compile exe` of
|
||||
# packages/server/bin/server.dart; both binaries stamped with APP_VERSION),
|
||||
# and copies of both under the names up to 1.2.x (watch_together.exe,
|
||||
# watch-together-server.exe: a 1.2.x updater checks for and restarts its
|
||||
# own name). Same layout as tool/package_linux.sh; the updater strips the
|
||||
# top-level folder.
|
||||
# Needs: flutter on PATH, tar.exe (ships with Windows 10+, writes zip).
|
||||
param([switch]$SkipBuild)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$Root = Split-Path -Parent $PSScriptRoot
|
||||
$App = Join-Path $Root 'apps/desktop'
|
||||
$Name = 'watch-together'
|
||||
$Name = 'starsync'
|
||||
$Arch = 'x64'
|
||||
|
||||
$Version = (Select-String -Path "$App/pubspec.yaml" -Pattern '^version: ([0-9.]+)').Matches[0].Groups[1].Value
|
||||
@@ -58,7 +60,7 @@ if (-not $SkipBuild) {
|
||||
}
|
||||
|
||||
$Bundle = Join-Path $App "build/windows/$Arch/runner/Release"
|
||||
if (-not (Test-Path "$Bundle/watch_together.exe")) { throw "bundle missing (build first): $Bundle" }
|
||||
if (-not (Test-Path "$Bundle/starsync.exe")) { throw "bundle missing (build first): $Bundle" }
|
||||
|
||||
$Stage = Join-Path $App 'build/package-stage'
|
||||
$Dist = Join-Path $Root 'dist'
|
||||
@@ -68,12 +70,14 @@ if (Test-Path $Stage) { Remove-Item -Recurse -Force $Stage }
|
||||
New-Item -ItemType Directory -Force "$Stage/$Folder", $Dist | Out-Null
|
||||
Copy-Item -Recurse "$Bundle/*" "$Stage/$Folder/"
|
||||
Copy-Item "$App/lib/src/update/bundle/update.bat" "$Stage/$Folder/update.bat"
|
||||
Copy-Item "$Stage/$Folder/starsync.exe" "$Stage/$Folder/watch_together.exe"
|
||||
|
||||
Push-Location (Join-Path $Root 'packages/server')
|
||||
try {
|
||||
Invoke-Checked 'dart pub get' { dart pub get | Out-Null }
|
||||
Invoke-Checked 'dart compile exe' { dart compile exe "--define=APP_VERSION=$Version" bin/server.dart -o "$Stage/$Folder/watch-together-server.exe" }
|
||||
Invoke-Checked 'dart compile exe' { dart compile exe "--define=APP_VERSION=$Version" bin/server.dart -o "$Stage/$Folder/starsync-server.exe" }
|
||||
} finally { Pop-Location }
|
||||
Copy-Item "$Stage/$Folder/starsync-server.exe" "$Stage/$Folder/watch-together-server.exe"
|
||||
|
||||
if (Test-Path $Zip) { Remove-Item -Force $Zip }
|
||||
# bsdtar writes forward-slash entry names (Compress-Archive on 5.1 doesn't).
|
||||
|
||||
Reference in new issue
Block a user