Skip to content

Commit

Permalink
Improved mac tooling and height on start-up.
Browse files Browse the repository at this point in the history
  • Loading branch information
marchantweb committed Dec 7, 2023
1 parent 095cdcf commit 91eea4b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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": {
Expand Down
4 changes: 3 additions & 1 deletion tooling/mac-build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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

0 comments on commit 91eea4b

Please sign in to comment.