diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2101268..0e44427 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,26 +65,37 @@ jobs: # The updater matches an asset by filename (GOOS+GOARCH) and unpacks a # single top-level entry, so each archive is named - and # holds exactly one entry: the binary (linux/windows) or XenSQL.app (macOS). - # Plain XenSQL / XenSQL.exe (no platform tokens) are manual-download only. + # Plain XenSQL / XenSQL.exe (no platform tokens), distro packages + # (XenSQL.deb, XenSQL.rpm, XenSQL.pkg.tar.zst, xensql-x86_64.AppImage), and + # XenSQL-amd64-installer.exe are manual-download only. - name: Build & package (Linux) if: matrix.build.platform == 'linux/amd64' shell: bash + env: + APPIMAGE_EXTRACT_AND_RUN: 1 run: | set -euo pipefail - wails3 task build # -> bin/XenSQL + wails3 package GOOS=linux mkdir -p dist + # Auto-updater asset tar -C bin -czf "dist/XenSQL-linux-amd64.tar.gz" XenSQL - cp bin/XenSQL dist/XenSQL # manual download; updater skips (no linux/amd64 in name) + # Manual downloads (updater skips — no GOOS/GOARCH in filenames) + cp bin/XenSQL bin/XenSQL.deb bin/XenSQL.rpm bin/XenSQL.pkg.tar.zst bin/xensql-x86_64.AppImage dist/ + + - name: Install NSIS + if: matrix.build.platform == 'windows/amd64' + shell: pwsh + run: winget install NSIS.NSIS --accept-source-agreements --accept-package-agreements - name: Build & package (Windows) if: matrix.build.platform == 'windows/amd64' shell: pwsh run: | - wails3 task build # -> bin/XenSQL.exe + wails3 package GOOS=windows New-Item -ItemType Directory -Force -Path dist | Out-Null Compress-Archive -Path bin/XenSQL.exe -DestinationPath dist/XenSQL-windows-amd64.zip -Force - Copy-Item bin/XenSQL.exe dist/XenSQL.exe # manual download; updater skips (no windows/amd64 in name) + Copy-Item bin/XenSQL.exe, bin/XenSQL-amd64-installer.exe dist/ - name: Build & package (macOS) if: matrix.build.platform == 'darwin/universal' @@ -148,8 +159,7 @@ jobs: run: | set -euo pipefail # Updater verifies its picked asset against its line here. - # "XenSQL*" glob covers archives, manual binaries, and the .dmg - sha256sum XenSQL* > SHA256SUMS + sha256sum * > SHA256SUMS cat SHA256SUMS - name: Create GitHub Release diff --git a/build/config.yml b/build/config.yml index 38c1bd4..b490dc0 100644 --- a/build/config.yml +++ b/build/config.yml @@ -64,25 +64,30 @@ dev_mode: fileAssociations: - ext: db name: SQLite Database + iconName: icon description: SQLite Database File role: Editor - ext: sqlite name: SQLite Database + iconName: icon description: SQLite Database File role: Editor - ext: sqlite3 name: SQLite Database + iconName: icon description: SQLite Database File role: Editor - ext: s3db name: SQLite Database + iconName: icon description: SQLite Database File role: Editor - ext: sl3 name: SQLite Database + iconName: icon description: SQLite Database File role: Editor # Other data other: - - name: My Other Data \ No newline at end of file + - name: My Other Data diff --git a/build/darwin/Info.dev.plist b/build/darwin/Info.dev.plist index 7489941..2a01197 100644 --- a/build/darwin/Info.dev.plist +++ b/build/darwin/Info.dev.plist @@ -10,7 +10,7 @@ db CFBundleTypeIconFile - + icon CFBundleTypeName SQLite Database CFBundleTypeRole @@ -22,7 +22,7 @@ sqlite CFBundleTypeIconFile - + icon CFBundleTypeName SQLite Database CFBundleTypeRole @@ -34,7 +34,7 @@ sqlite3 CFBundleTypeIconFile - + icon CFBundleTypeName SQLite Database CFBundleTypeRole @@ -46,7 +46,7 @@ s3db CFBundleTypeIconFile - + icon CFBundleTypeName SQLite Database CFBundleTypeRole @@ -58,7 +58,7 @@ sl3 CFBundleTypeIconFile - + icon CFBundleTypeName SQLite Database CFBundleTypeRole diff --git a/build/darwin/Info.plist b/build/darwin/Info.plist index 309a454..226ff51 100644 --- a/build/darwin/Info.plist +++ b/build/darwin/Info.plist @@ -10,7 +10,7 @@ db CFBundleTypeIconFile - + icon CFBundleTypeName SQLite Database CFBundleTypeRole @@ -22,7 +22,7 @@ sqlite CFBundleTypeIconFile - + icon CFBundleTypeName SQLite Database CFBundleTypeRole @@ -34,7 +34,7 @@ sqlite3 CFBundleTypeIconFile - + icon CFBundleTypeName SQLite Database CFBundleTypeRole @@ -46,7 +46,7 @@ s3db CFBundleTypeIconFile - + icon CFBundleTypeName SQLite Database CFBundleTypeRole @@ -58,7 +58,7 @@ sl3 CFBundleTypeIconFile - + icon CFBundleTypeName SQLite Database CFBundleTypeRole diff --git a/build/ios/project.pbxproj b/build/ios/project.pbxproj index 9559595..54fa3ab 100644 --- a/build/ios/project.pbxproj +++ b/build/ios/project.pbxproj @@ -26,7 +26,7 @@ C0DEBEEF0000000000000104 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; C0DEBEEF0000000000000105 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; C0DEBEEF0000000000000106 /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.text-based-dylib-definition; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; }; - C0DEBEEF0000000000000107 /* XenSQL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "XenSQL.a"; path = ../../../bin/XenSQL.a; sourceTree = SOURCE_ROOT; }; + C0DEBEEF0000000000000107 /* XenSQL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "XenSQL.a"; path = "../../../bin/XenSQL.a"; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXGroup section */ @@ -155,7 +155,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "set -e\nAPP_ROOT=\"${PROJECT_DIR}/../../..\"\nPLATFORM=${PLATFORM_NAME:-iphonesimulator}\nSDK_PATH=${SDKROOT:-$(xcrun --sdk ${PLATFORM} --show-sdk-path)}\nif [ ${PLATFORM} = iphonesimulator ]; then GO_TARGET=arm64-apple-ios15.0-simulator; MIN_FLAG=-mios-simulator-version-min=15.0; else GO_TARGET=arm64-apple-ios15.0; MIN_FLAG=-miphoneos-version-min=15.0; fi\nexport GOOS=ios\nexport GOARCH=arm64\nexport CGO_ENABLED=1\nexport CGO_CFLAGS=\"-isysroot ${SDK_PATH} -target ${GO_TARGET} ${MIN_FLAG}\"\nexport CGO_LDFLAGS=\"-isysroot ${SDK_PATH} -target ${GO_TARGET}\"\ncd \"${APP_ROOT}\"\n# Ensure overlay exists\nif [ ! -f build/ios/xcode/overlay.json ]; then\n wails3 ios overlay:gen -out build/ios/xcode/overlay.json -config build/config.yml || true\nfi\n# Always rebuild the Go c-archive; Go's build cache keeps this fast\n# and avoids stale binaries when .go sources change.\necho \"Building Go c-archive...\"\ngo build -buildmode=c-archive -overlay build/ios/xcode/overlay.json -o bin/XenSQL.a\n"; + shellScript = "set -e\nAPP_ROOT=\"${PROJECT_DIR}/../../..\"\nPLATFORM=${PLATFORM_NAME:-iphonesimulator}\nSDK_PATH=${SDKROOT:-$(xcrun --sdk ${PLATFORM} --show-sdk-path)}\nif [ ${PLATFORM} = iphonesimulator ]; then GO_TARGET=arm64-apple-ios15.0-simulator; MIN_FLAG=-mios-simulator-version-min=15.0; else GO_TARGET=arm64-apple-ios15.0; MIN_FLAG=-miphoneos-version-min=15.0; fi\nexport GOOS=ios\nexport GOARCH=arm64\nexport CGO_ENABLED=1\nexport CGO_CFLAGS=\"-isysroot ${SDK_PATH} -target ${GO_TARGET} ${MIN_FLAG}\"\nexport CGO_LDFLAGS=\"-isysroot ${SDK_PATH} -target ${GO_TARGET}\"\ncd \"${APP_ROOT}\"\n# Ensure overlay exists\nif [ ! -f build/ios/xcode/overlay.json ]; then\n wails3 ios overlay:gen -out build/ios/xcode/overlay.json -config build/config.yml || true\nfi\n# Always rebuild the Go c-archive; Go's build cache keeps this fast\n# and avoids stale binaries when .go sources change.\necho \"Building Go c-archive...\"\ngo build -buildmode=c-archive -overlay build/ios/xcode/overlay.json -o \"bin/XenSQL.a\"\n"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/build/windows/nsis/project.nsi b/build/windows/nsis/project.nsi index 7e80a70..cf87180 100644 --- a/build/windows/nsis/project.nsi +++ b/build/windows/nsis/project.nsi @@ -76,7 +76,7 @@ OutFile "..\..\..\bin\${INFO_PROJECTNAME}-${ARCH}-installer.exe" # Name of the i !if "${WAILS_INSTALL_SCOPE}" == "user" InstallDir "$LOCALAPPDATA\Programs\${INFO_PRODUCTNAME}" !else - InstallDir "$PROGRAMFILES64\${INFO_COMPANYNAME}\${INFO_PRODUCTNAME}" + InstallDir "$PROGRAMFILES64\${INFO_PRODUCTNAME}" !endif ShowInstDetails show # This will always show the installation details. diff --git a/build/windows/nsis/wails_tools.nsh b/build/windows/nsis/wails_tools.nsh index f5f6f79..bd79dac 100644 --- a/build/windows/nsis/wails_tools.nsh +++ b/build/windows/nsis/wails_tools.nsh @@ -229,20 +229,20 @@ RequestExecutionLevel "${REQUEST_EXECUTION_LEVEL}" !macro wails.associateFiles ; Create file associations - !insertmacro APP_ASSOCIATE "db" "SQLite Database" "SQLite Database File" "$INSTDIR\.ico" "Open with ${INFO_PRODUCTNAME}" "$INSTDIR\${PRODUCT_EXECUTABLE} $\"%1$\"" - File "..\.ico" + !insertmacro APP_ASSOCIATE "db" "SQLite Database" "SQLite Database File" "$INSTDIR\icon.ico" "Open with ${INFO_PRODUCTNAME}" "$INSTDIR\${PRODUCT_EXECUTABLE} $\"%1$\"" + File "..\icon.ico" - !insertmacro APP_ASSOCIATE "sqlite" "SQLite Database" "SQLite Database File" "$INSTDIR\.ico" "Open with ${INFO_PRODUCTNAME}" "$INSTDIR\${PRODUCT_EXECUTABLE} $\"%1$\"" - File "..\.ico" + !insertmacro APP_ASSOCIATE "sqlite" "SQLite Database" "SQLite Database File" "$INSTDIR\icon.ico" "Open with ${INFO_PRODUCTNAME}" "$INSTDIR\${PRODUCT_EXECUTABLE} $\"%1$\"" + File "..\icon.ico" - !insertmacro APP_ASSOCIATE "sqlite3" "SQLite Database" "SQLite Database File" "$INSTDIR\.ico" "Open with ${INFO_PRODUCTNAME}" "$INSTDIR\${PRODUCT_EXECUTABLE} $\"%1$\"" - File "..\.ico" + !insertmacro APP_ASSOCIATE "sqlite3" "SQLite Database" "SQLite Database File" "$INSTDIR\icon.ico" "Open with ${INFO_PRODUCTNAME}" "$INSTDIR\${PRODUCT_EXECUTABLE} $\"%1$\"" + File "..\icon.ico" - !insertmacro APP_ASSOCIATE "s3db" "SQLite Database" "SQLite Database File" "$INSTDIR\.ico" "Open with ${INFO_PRODUCTNAME}" "$INSTDIR\${PRODUCT_EXECUTABLE} $\"%1$\"" - File "..\.ico" + !insertmacro APP_ASSOCIATE "s3db" "SQLite Database" "SQLite Database File" "$INSTDIR\icon.ico" "Open with ${INFO_PRODUCTNAME}" "$INSTDIR\${PRODUCT_EXECUTABLE} $\"%1$\"" + File "..\icon.ico" - !insertmacro APP_ASSOCIATE "sl3" "SQLite Database" "SQLite Database File" "$INSTDIR\.ico" "Open with ${INFO_PRODUCTNAME}" "$INSTDIR\${PRODUCT_EXECUTABLE} $\"%1$\"" - File "..\.ico" + !insertmacro APP_ASSOCIATE "sl3" "SQLite Database" "SQLite Database File" "$INSTDIR\icon.ico" "Open with ${INFO_PRODUCTNAME}" "$INSTDIR\${PRODUCT_EXECUTABLE} $\"%1$\"" + File "..\icon.ico" !macroend @@ -250,19 +250,19 @@ RequestExecutionLevel "${REQUEST_EXECUTION_LEVEL}" ; Delete app associations !insertmacro APP_UNASSOCIATE "db" "SQLite Database" - Delete "$INSTDIR\.ico" + Delete "$INSTDIR\icon.ico" !insertmacro APP_UNASSOCIATE "sqlite" "SQLite Database" - Delete "$INSTDIR\.ico" + Delete "$INSTDIR\icon.ico" !insertmacro APP_UNASSOCIATE "sqlite3" "SQLite Database" - Delete "$INSTDIR\.ico" + Delete "$INSTDIR\icon.ico" !insertmacro APP_UNASSOCIATE "s3db" "SQLite Database" - Delete "$INSTDIR\.ico" + Delete "$INSTDIR\icon.ico" !insertmacro APP_UNASSOCIATE "sl3" "SQLite Database" - Delete "$INSTDIR\.ico" + Delete "$INSTDIR\icon.ico" !macroend