From 91eea4befb751706e4657c05bf5f511eb7b7b7b8 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 7 Dec 2023 11:23:54 -0500 Subject: [PATCH] Improved mac tooling and height on start-up. --- main.js | 3 ++- package.json | 7 +++---- tooling/mac-build.sh | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) mode change 100644 => 100755 tooling/mac-build.sh diff --git a/main.js b/main.js index dc7c2a8..0c1e103 100644 --- a/main.js +++ b/main.js @@ -19,12 +19,13 @@ const isDev = process.env.IS_DEV === 'true'; function createWindow(userData = {}) { const { height } = screen.getPrimaryDisplay().size; + const windowHeight = Math.round(Math.max(height * 0.85, 860)); const mainWindow = new BrowserWindow({ show: false, minWidth: 1160, width: 1520, minHeight: 800, - height: height * 0.9, + height: windowHeight, center: true, resizable: true, maximizable: true, diff --git a/package.json b/package.json index 373564f..3b98761 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "author": "RCKT Software, LLC.", "description": "An open-source progress tracker that predicts when you'll reach your goals", "private": true, - "version": "1.3.185", + "version": "1.3.194", "main": "main.js", "repository": "github:RCKT-Software/telemetry", "scripts": { @@ -13,9 +13,8 @@ "build": "vite build", "preview": "vite preview", "electron:dev": "cross-env IS_DEV=true electron-forge start", - "electron:build": "npm run build && cross-env DEBUG=*electron* electron-forge make", - "electron:build-mac-arm": "npm run build && cross-env DEBUG=*electron* electron-forge make --arch=x64 --platform=darwin", - "electron:build-mac": "npm run build && cross-env DEBUG=*electron* electron-forge make --arch=universal --platform=darwin", + "electron:build": "npm run build && cross-env electron-forge make", + "electron:build-mac": "./tooling/mac-build.sh", "electron:package": "electron-forge package" }, "build": { diff --git a/tooling/mac-build.sh b/tooling/mac-build.sh old mode 100644 new mode 100755 index 1380c3b..6047bbe --- a/tooling/mac-build.sh +++ b/tooling/mac-build.sh @@ -5,7 +5,7 @@ VERSION=$(node -p "require('./package.json').version") # Build for ARM architecture echo "Building for ARM..." -npm run build && electron-forge make +npm run build && electron-forge make --platform=darwin ARM_ZIP="out/make/zip/darwin/arm64/Telemetry-darwin-arm64-${VERSION}.zip" ARM_DMG="out/make/Telemetry.dmg" @@ -34,3 +34,5 @@ if [ -f "${X64_DMG}" ]; then mv "${X64_DMG}" "out/make/Telemetry-mac-x64-${VERSION}.dmg" echo "Renamed DMG for x64." fi + +rm -rf out/make/zip \ No newline at end of file