Skip to content

Commit

Permalink
possible UI app for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Kvadratni committed Jan 29, 2025
1 parent 403109a commit f6151bc
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
12 changes: 12 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ make-ui:
@just release
cd ui/desktop && npm run bundle:default

# make GUI with latest Windows binary
make-ui-windows:
@just release-windows
@if [ -f ./target/x86_64-pc-windows-gnu/release/goosed.exe ]; then \
echo "Copying Windows binary to ui/desktop/src/bin..."; \
cp -p ./target/x86_64-pc-windows-gnu/release/goosed.exe ./ui/desktop/src/bin/; \
else \
echo "Windows binary not found."; \
exit 1; \
fi
cd ui/desktop && npm run bundle:windows

# Setup langfuse server
langfuse-server:
#!/usr/bin/env bash
Expand Down
22 changes: 19 additions & 3 deletions ui/desktop/forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ let cfg = {
asar: true,
extraResource: ['src/bin', 'src/images'],
icon: 'src/images/icon',
// Windows specific configuration
win32: {
icon: 'src/images/icon.ico',
certificateFile: process.env.WINDOWS_CERTIFICATE_FILE,
certificatePassword: process.env.WINDOWS_CERTIFICATE_PASSWORD,
rfc3161TimeStampServer: 'http://timestamp.digicert.com',
signWithParams: '/fd sha256 /tr http://timestamp.digicert.com /td sha256'
},
// macOS specific configuration
osxSign: {
entitlements: 'entitlements.plist',
'entitlements-inherit': 'entitlements.plist',
Expand Down Expand Up @@ -36,11 +45,18 @@ module.exports = {
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {},
config: {
// Windows installer configuration
name: 'Goose',
authors: 'Goose Team',
setupIcon: 'src/images/icon.ico',
iconUrl: 'https://raw.githubusercontent.com/goose-ai/goose/main/ui/desktop/src/images/icon.ico',
loadingGif: 'src/images/install.gif'
},
},
{
name: '@electron-forge/maker-zip',
platforms: ['darwin'],
platforms: ['darwin', 'win32'],
},
{
name: '@electron-forge/maker-deb',
Expand Down Expand Up @@ -90,4 +106,4 @@ module.exports = {
[FuseV1Options.OnlyLoadAppFromAsar]: true,
}),
],
};
};
3 changes: 2 additions & 1 deletion ui/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"package": "electron-forge package",
"make": "electron-forge make",
"bundle:default": "npm run make && cd out/Goose-darwin-arm64 && ditto -c -k --sequesterRsrc --keepParent Goose.app Goose.zip",
"bundle:windows": "npm run make -- --platform=win32 --arch=x64 && cd out/make/zip/win32/x64 && zip -r Goose-win32-x64.zip Goose-win32-x64",
"debug": "echo 'run --remote-debugging-port=8315' && lldb out/Goose-darwin-arm64/Goose.app",
"test-e2e": "electron-forge start > /tmp/out.txt & ELECTRON_PID=$! && sleep 12 && if grep -q 'renderer: ChatWindow loaded' /tmp/out.txt; then echo 'process is running'; pkill -f electron; else echo 'not starting correctly'; cat /tmp/out.txt; pkill -f electron; exit 1; fi",
"lint": "eslint \"src/**/*.{ts,tsx}\" --fix",
Expand Down Expand Up @@ -97,4 +98,4 @@
"tailwindcss-animate": "^1.0.7",
"unist-util-visit": "^5.0.0"
}
}
}

0 comments on commit f6151bc

Please sign in to comment.