Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <platform>-<arch> 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'
Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion build/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
- name: My Other Data
10 changes: 5 additions & 5 deletions build/darwin/Info.dev.plist
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<string>db</string>
</array>
<key>CFBundleTypeIconFile</key>
<string/>
<string>icon</string>
<key>CFBundleTypeName</key>
<string>SQLite Database</string>
<key>CFBundleTypeRole</key>
Expand All @@ -22,7 +22,7 @@
<string>sqlite</string>
</array>
<key>CFBundleTypeIconFile</key>
<string/>
<string>icon</string>
<key>CFBundleTypeName</key>
<string>SQLite Database</string>
<key>CFBundleTypeRole</key>
Expand All @@ -34,7 +34,7 @@
<string>sqlite3</string>
</array>
<key>CFBundleTypeIconFile</key>
<string/>
<string>icon</string>
<key>CFBundleTypeName</key>
<string>SQLite Database</string>
<key>CFBundleTypeRole</key>
Expand All @@ -46,7 +46,7 @@
<string>s3db</string>
</array>
<key>CFBundleTypeIconFile</key>
<string/>
<string>icon</string>
<key>CFBundleTypeName</key>
<string>SQLite Database</string>
<key>CFBundleTypeRole</key>
Expand All @@ -58,7 +58,7 @@
<string>sl3</string>
</array>
<key>CFBundleTypeIconFile</key>
<string/>
<string>icon</string>
<key>CFBundleTypeName</key>
<string>SQLite Database</string>
<key>CFBundleTypeRole</key>
Expand Down
10 changes: 5 additions & 5 deletions build/darwin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<string>db</string>
</array>
<key>CFBundleTypeIconFile</key>
<string/>
<string>icon</string>
<key>CFBundleTypeName</key>
<string>SQLite Database</string>
<key>CFBundleTypeRole</key>
Expand All @@ -22,7 +22,7 @@
<string>sqlite</string>
</array>
<key>CFBundleTypeIconFile</key>
<string/>
<string>icon</string>
<key>CFBundleTypeName</key>
<string>SQLite Database</string>
<key>CFBundleTypeRole</key>
Expand All @@ -34,7 +34,7 @@
<string>sqlite3</string>
</array>
<key>CFBundleTypeIconFile</key>
<string/>
<string>icon</string>
<key>CFBundleTypeName</key>
<string>SQLite Database</string>
<key>CFBundleTypeRole</key>
Expand All @@ -46,7 +46,7 @@
<string>s3db</string>
</array>
<key>CFBundleTypeIconFile</key>
<string/>
<string>icon</string>
<key>CFBundleTypeName</key>
<string>SQLite Database</string>
<key>CFBundleTypeRole</key>
Expand All @@ -58,7 +58,7 @@
<string>sl3</string>
</array>
<key>CFBundleTypeIconFile</key>
<string/>
<string>icon</string>
<key>CFBundleTypeName</key>
<string>SQLite Database</string>
<key>CFBundleTypeRole</key>
Expand Down
4 changes: 2 additions & 2 deletions build/ios/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */

Expand Down
2 changes: 1 addition & 1 deletion build/windows/nsis/project.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
30 changes: 15 additions & 15 deletions build/windows/nsis/wails_tools.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -229,40 +229,40 @@ 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

!macro wails.unassociateFiles
; 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

Expand Down
Loading