From 6340e0001ca5ec8431e3e6a861827d511407aa25 Mon Sep 17 00:00:00 2001 From: Philip Peterson Date: Thu, 24 Apr 2025 21:37:56 -0700 Subject: [PATCH] Re-enable Windows (#129) --- .github/workflows/nodejs.yml | 4 ++-- .husky/{pre-commit => pre-push} | 0 app/index.ts | 2 +- bin/mk-snapshot.js | 2 +- webpack.config.ts | 3 +-- 5 files changed, 5 insertions(+), 6 deletions(-) rename .husky/{pre-commit => pre-push} (100%) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 32e427f8..ecd69d90 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -18,8 +18,8 @@ jobs: name: macos - os: ubuntu-latest name: ubuntu - #TODO re-enable these: - #- windows-latest + - os: windows-latest + name: win fail-fast: false steps: - name: Checkout diff --git a/.husky/pre-commit b/.husky/pre-push similarity index 100% rename from .husky/pre-commit rename to .husky/pre-push diff --git a/app/index.ts b/app/index.ts index 24564b49..3f9c0756 100644 --- a/app/index.ts +++ b/app/index.ts @@ -141,7 +141,7 @@ app.on('ready', () => const hwin = newWindow({width, height, x: startX, y: startY}, cfg, fn, profileName); windowSet.add(hwin); - void hwin.loadURL(url) + void hwin.loadURL(url); hwin.once('ready-to-show', () => { hwin.show(); diff --git a/bin/mk-snapshot.js b/bin/mk-snapshot.js index 0dceca93..3829139c 100644 --- a/bin/mk-snapshot.js +++ b/bin/mk-snapshot.js @@ -50,7 +50,7 @@ async function main() { console.log(`Generating startup blob in "${outputBlobPath}"`); const res = childProcess.execFileSync( - path.resolve(__dirname, '..', 'node_modules', 'electron-mksnapshot', 'bin', 'mksnapshot' + (process.platform === 'win32' ? '.cmd' : '')), + path.resolve(__dirname, '..', 'node_modules', 'electron-mksnapshot', 'bin', 'mksnapshot' + (process.platform === 'win32' ? '.exe' : '')), [ '--startup-src=' + snapshotScriptPath, '--startup-blob=' + startupBlobPath, diff --git a/webpack.config.ts b/webpack.config.ts index 6beeaf09..816bd14c 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -99,8 +99,7 @@ const config: webpack.Configuration[] = [ } ] }, - externals: { - }, + externals: {}, plugins: [ new webpack.IgnorePlugin({resourceRegExp: /.*\.js.map$/i}),