bugfix install package (#231)

* #226 enable install

* #226 add DEBUG_BUILD=1 to show inspector tools

---------

Co-authored-by: neil <neil@neils-MacBook-Pro.local>
This commit is contained in:
Neil 2023-02-24 10:33:23 +08:00 committed by GitHub
parent ddf80ff7b8
commit cf0a2d1b8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 4 deletions

View file

@ -9,6 +9,9 @@ on:
s3-prefix:
required: true
type: string
debug:
required: true
type: string
outputs:
s3-installers-artifact-key:
description: 'The S3 build key includes the installer files: [zip, dmg, etc, yml]'
@ -85,6 +88,7 @@ jobs:
if: startsWith(inputs.platform, 'darwin')
run: tea -SE xc dist
env:
DEBUG_BUILD: ${{ inputs.debug }}
PUBLIC_VERSION: ${{ steps.gui-version.outputs.version }}
USE_HARD_LINKS: false
CSC_FOR_PULL_REQUEST: true

View file

@ -132,6 +132,7 @@ jobs:
with:
platform: ${{ matrix.platform }}
s3-prefix: ${{ needs.changes.outputs.preview_folder || 'dev-pr' }}
debug: 1
secrets: inherit
upload:
needs: [build_desktop, changes]

View file

@ -37,6 +37,7 @@ jobs:
with:
platform: ${{ matrix.platform }}
s3-prefix: main
debug: 1
secrets: inherit
upload:
needs: [build_desktop]

View file

@ -16,6 +16,7 @@ jobs:
with:
platform: ${{ matrix.platform }}
s3-prefix: release
debug: 0
secrets: inherit
upload:
needs: [build_desktop]

View file

@ -15,7 +15,7 @@ log.info("App starting...");
const serveURL = serve({ directory: "." });
const port = process.env.PORT || 3000;
const dev = !app.isPackaged;
const allowDebug = !app.isPackaged || process.env.DEBUG_BUILD === "1";
let mainWindow: BrowserWindow | null;
function createWindow() {
@ -39,7 +39,7 @@ function createWindow() {
nodeIntegration: true,
spellcheck: false,
webSecurity: false,
devTools: dev
devTools: allowDebug
// preload: path.join(app.getAppPath(), 'preload.cjs')
},
x: windowState.x,
@ -117,7 +117,7 @@ function createMainWindow() {
mainWindow = null;
});
if (dev) loadVite(port);
if (!app.isPackaged) loadVite(port);
else serveURL(mainWindow);
}

View file

@ -8,7 +8,7 @@ export async function installPackage(full_name: string) {
return await new Promise((resolve, reject) => {
let version = "";
let lastError = "";
const teaInstallation = spawn("tea", [`+${full_name}`, "true"]);
const teaInstallation = spawn("/usr/local/bin/tea", [`+${full_name}`, "true"]);
teaInstallation.stdout.on("data", (data) => {
console.log("stdout:", data);