From 22ca7c790e389686b00f83c18ed3dff26f98cbdb Mon Sep 17 00:00:00 2001 From: Andrew Hopkinson <64254061+toxophilist@users.noreply.github.com> Date: Wed, 27 Nov 2024 13:08:45 +0000 Subject: [PATCH] build: stop electron-builder build --- .../development-build-desktop-application.yml | 3 ++- ocd/package-lock.json | 20 ++++++++++++------- ocd/packages/desktop/package.json | 5 +++-- ocd/packages/desktop/src/main.ts | 2 ++ ocd/packages/electron-desktop/package.json | 2 +- 5 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/development-build-desktop-application.yml b/.github/workflows/development-build-desktop-application.yml index b227b0c2..257cb8d4 100644 --- a/.github/workflows/development-build-desktop-application.yml +++ b/.github/workflows/development-build-desktop-application.yml @@ -108,7 +108,8 @@ jobs: if: matrix.os == 'windows-latest' && (failure() || success()) run: | ls -R ./ocd/dist - gh release upload ${{ env.BRANCH_RELEASE_TAG }} ./ocd/dist/make/squirrel.windows/x64/ocd-${{ env.OCD_VERSION }}*.exe --clobber + ls ./ocd/dist/make/squirrel.windows/x64 + gh release upload ${{ env.BRANCH_RELEASE_TAG }} ./ocd/dist/make/squirrel.windows/x64/ocd-${{ env.OCD_VERSION }}-Setup.exe --clobber # gh release upload ${{ env.BRANCH_RELEASE_TAG }} ./ocd/dist/release/${{ env.OCD_VERSION }}/ocd-Windows-${{ env.OCD_VERSION }}*x64.exe --clobber - name: Upload Linux Artifact to Release if: matrix.os == 'ubuntu-latest' && (failure() || success()) diff --git a/ocd/package-lock.json b/ocd/package-lock.json index 65b13d00..1190b193 100644 --- a/ocd/package-lock.json +++ b/ocd/package-lock.json @@ -2263,10 +2263,6 @@ "resolved": "packages/core", "link": true }, - "node_modules/@ocd/desktop": { - "resolved": "packages/desktop", - "link": true - }, "node_modules/@ocd/electron-desktop": { "resolved": "packages/electron-desktop", "link": true @@ -2962,6 +2958,13 @@ "@types/ms": "*" } }, + "node_modules/@types/electron-squirrel-startup": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/electron-squirrel-startup/-/electron-squirrel-startup-1.0.2.tgz", + "integrity": "sha512-AzxnvBzNh8K/0SmxMmZtpJf1/IWoGXLP+pQDuUaVkPyotI8ryvAtBSqgxR/qOSvxWHYWrxkeNsJ+Ca5xOuUxJQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -6675,7 +6678,6 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -6686,7 +6688,6 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -11972,6 +11973,10 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/ocd": { + "resolved": "packages/desktop", + "link": true + }, "node_modules/oci-accessgovernancecp": { "version": "2.97.1", "resolved": "https://registry.npmjs.org/oci-accessgovernancecp/-/oci-accessgovernancecp-2.97.1.tgz", @@ -17811,7 +17816,7 @@ "license": "UPL-1.0" }, "packages/desktop": { - "name": "@ocd/desktop", + "name": "ocd", "version": "0.2.5", "license": "UPL-1.0", "dependencies": { @@ -17835,6 +17840,7 @@ "@electron-forge/plugin-fuses": "^7.5.0", "@electron-forge/plugin-vite": "^7.5.0", "@electron/fuses": "^1.8.0", + "@types/electron-squirrel-startup": "^1.0.2", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "electron": ">=32.2.0", diff --git a/ocd/packages/desktop/package.json b/ocd/packages/desktop/package.json index c53dfbf4..faaa26e8 100644 --- a/ocd/packages/desktop/package.json +++ b/ocd/packages/desktop/package.json @@ -47,6 +47,7 @@ "@electron-forge/plugin-fuses": "^7.5.0", "@electron-forge/plugin-vite": "^7.5.0", "@electron/fuses": "^1.8.0", + "@types/electron-squirrel-startup": "^1.0.2", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "electron": ">=32.2.0", @@ -64,7 +65,7 @@ "@ocd/model": ">=0.2.5", "@ocd/query": ">=0.2.5", "@ocd/react": ">=0.2.5", - "oci-sdk": "^2.69.0", - "electron-squirrel-startup": "^1.0.1" + "electron-squirrel-startup": "^1.0.1", + "oci-sdk": "^2.69.0" } } diff --git a/ocd/packages/desktop/src/main.ts b/ocd/packages/desktop/src/main.ts index 346b764f..570be965 100644 --- a/ocd/packages/desktop/src/main.ts +++ b/ocd/packages/desktop/src/main.ts @@ -4,6 +4,7 @@ */ import { app, dialog, BrowserWindow, ipcMain, screen, Menu, shell, MessageBoxOptions, MenuItemConstructorOptions } from 'electron' +import Squirrel from 'electron-squirrel-startup' import path from 'path' import url from 'url' import fs from 'fs' @@ -22,6 +23,7 @@ const isPreview = process.env.OCD_PREVIEW === 'true'; const isMac = process.platform === 'darwin' // if (require('electron-squirrel-startup')) app.quit() +if (Squirrel) app.quit() const ocdConfigDirectory = path.join(app.getPath('home'), '.ocd') const ocdConsoleConfigFilename = path.join(ocdConfigDirectory, 'console_config.json') const ocdCacheFilename = path.join(ocdConfigDirectory, 'cache.json') diff --git a/ocd/packages/electron-desktop/package.json b/ocd/packages/electron-desktop/package.json index db6f8871..8ed4767a 100644 --- a/ocd/packages/electron-desktop/package.json +++ b/ocd/packages/electron-desktop/package.json @@ -29,7 +29,7 @@ "dev-build": "tsc && NODE_OPTIONS=--max-old-space-size=8192 vite build && electron-builder -c.electronVersion=32.2.0", "dev-tsc": "tsc", "dev-vite-build": "NODE_OPTIONS=--max-old-space-size=8192 vite build", - "build": "tsc && vite build && electron-builder -c.electronVersion=32.2.0", + "electron-builder-build": "tsc && vite build && electron-builder -c.electronVersion=32.2.0", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" },