Conversation
|
complete line by line analysis Commit: "fix windows native uvx"1. ui/desktop/forge.config.ts+const { resolve } = require('path');
- target: 'main',- target: 'preload',
2. ui/desktop/package.json- "bundle:windows": "npm run make -- --platform=win32 --arch=x64 && node scripts/copy-windows-dlls.js",
+ "bundle:windows": "node scripts/build-main.js && npm run make -- --platform=win32 --arch=x64 && node scripts/copy-windows-dlls.js",
3. ui/desktop/scripts/build-main.js (New File)This is a completely new file that handles building the main process specifically:
4. ui/desktop/src/main.ts+// Handle binary path requests
+ipcMain.handle('get-binary-path', (event, binaryName) => {
+ return getBinaryPath(app, binaryName);
+});
5. ui/desktop/src/utils/binaryPath.ts- // On Windows, use .cmd for npx and .exe for uvx
- // In development, check multiple possible locations
- // In production, check resources paths
- // Log all paths we're checking
- log.info('Checking binary paths:', possiblePaths);
- log.info(`Found binary at: ${binPath}`);
+ if (isWindows) {
+ possiblePaths.push(
+ path.join(process.resourcesPath, executableName),
+ path.join(app.getAppPath(), 'resources', executableName),
+ path.join(app.getPath('exe'), '..', 'bin', executableName)
+ );
+ }
- const error = `Could not find ${binaryName} binary in any of the expected locations: ${possiblePaths.join(', ')}`;
- log.error(error);
- throw new Error(error);
+ throw new Error(
+ `Could not find ${binaryName} binary in any of the expected locations: ${possiblePaths.join(', ')}`
+ );
6. ui/desktop/vite.preload.config.ts-export default defineConfig({});
+export default defineConfig({
+ build: {
+ ssr: true,
+ outDir: '.vite/build',
+ rollupOptions: {
+ input: 'src/preload.ts',
+ output: {
+ format: 'cjs',
+ entryFileNames: 'preload.js'
+ },
+ external: ['electron']
+ }
+ }
+});
Summary of ChangesThis commit fixes issues with the Windows native
The primary goal was to fix the Windows native |
How These Changes Affect Other PlatformsGreat question! Let's analyze how these changes to fix the Windows native UVX functionality might impact other platforms like macOS and Linux. Cross-Platform Impact Analysis1. Build Process Changes// In package.json
- "bundle:windows": "npm run make -- --platform=win32 --arch=x64 && node scripts/copy-windows-dlls.js",
+ "bundle:windows": "node scripts/build-main.js && npm run make -- --platform=win32 --arch=x64 && node scripts/copy-windows-dlls.js",Impact on other platforms:
2. Binary Path Resolution+ if (isWindows) {
+ possiblePaths.push(
+ path.join(process.resourcesPath, executableName),
+ path.join(app.getAppPath(), 'resources', executableName),
+ path.join(app.getPath('exe'), '..', 'bin', executableName)
+ );
+ }Impact on other platforms:
3. IPC Handler Addition+// Handle binary path requests
+ipcMain.handle('get-binary-path', (event, binaryName) => {
+ return getBinaryPath(app, binaryName);
+});Impact on other platforms:
4. Vite Configuration Changes// In vite.preload.config.ts
-export default defineConfig({});
+export default defineConfig({
+ build: {
+ ssr: true,
+ outDir: '.vite/build',
+ rollupOptions: {
+ input: 'src/preload.ts',
+ output: {
+ format: 'cjs',
+ entryFileNames: 'preload.js'
+ },
+ external: ['electron']
+ }
+ }
+});Impact on other platforms:
5. Code Cleanup- // Log all paths we're checking
- log.info('Checking binary paths:', possiblePaths);
- log.info(`Found binary at: ${binPath}`);Impact on other platforms:
Overall Cross-Platform Impact
Potential Concerns
However, based on the nature of the changes, these risks appear to be minimal. The commit seems well-structured to isolate Windows-specific changes while maintaining or improving cross-platform compatibility. |
|
.bundle |
macOS ARM64 Desktop App (Apple Silicon)📱 Download macOS Desktop App (arm64, signed) Instructions: This link is provided by nightly.link and will work even if you're not logged into GitHub. |
* origin/main: feat: Adjust UX of extension installs in V2 settings (block#1836) fix: goose modes styling (block#1833) New toasts (block#1777) feat: bring back install-link-generator which was lost in the extensions-site revamp (block#1832) feat: settings v2 extension add refactor (block#1815) fix: Update link color in chat view for user messages (block#1717) (block#1754) fix windows native uvx (block#1775) fix: correct deep link install link format (block#1830) fix(cli): multiselect visibility for light themes (block#1716) docs: Update styling (block#1831) Refactor top bar (block#1829) Docs: Revamp extensions site (block#1260) fix: extension site not rendering servers (block#1824) feat: add pdf reader (block#1818) fix: fix allowing multiple selectors in goosebench (block#1814) Fix chat width issues (block#1813)
a bit of build time shenanigans to fix uvx for windows.