-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nick Boughton
committed
Sep 6, 2021
1 parent
23d29fb
commit b7f91f8
Showing
9 changed files
with
539 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
version=$(grep '"version"' package.json | sed -re 's/[^0-9.]+//g') | ||
echo "Building and packaging v$version in 5 seconds" | ||
sleep 5 | ||
|
||
quasar b -m electron | ||
|
||
cd dist/electron | ||
|
||
echo "Zipping Win32 build in 3s" | ||
sleep 3 | ||
zip -r Stargazer-win-$version.zip 'Stargazer-win32-x64' | ||
|
||
echo "Tarring Linux build in 3s" | ||
sleep 3 | ||
tar czvf Stargazer-linux-$version.tar.gz 'Stargazer-linux-x64' | ||
|
||
echo "Tarring Mac build in 3s" | ||
sleep 3 | ||
tar czvf Stargazer-darwin-$version.tar.gz 'Stargazer-darwin-x64' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "stargazer", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "An app for journaling solo Ironsworn: Starforged campaigns", | ||
"productName": "Stargazer", | ||
"author": "Nick Boughton <[email protected]>", | ||
|
@@ -26,6 +26,8 @@ | |
"@types/uuid": "^8.3.1", | ||
"@typescript-eslint/eslint-plugin": "^4.16.1", | ||
"@typescript-eslint/parser": "^4.16.1", | ||
"electron": "^14.0.0", | ||
"electron-packager": "^15.2.0", | ||
"eslint": "^7.14.0", | ||
"eslint-config-prettier": "^8.1.0", | ||
"eslint-plugin-vue": "^7.0.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { app, BrowserWindow, nativeTheme } from 'electron' | ||
import path from 'path' | ||
|
||
try { | ||
if (process.platform === 'win32' && nativeTheme.shouldUseDarkColors === true) { | ||
require('fs').unlinkSync(require('path').join(app.getPath('userData'), 'DevTools Extensions')) | ||
} | ||
} catch (_) { } | ||
|
||
let mainWindow | ||
|
||
function createWindow () { | ||
/** | ||
* Initial window options | ||
*/ | ||
mainWindow = new BrowserWindow({ | ||
width: 1000, | ||
height: 600, | ||
useContentSize: true, | ||
webPreferences: { | ||
contextIsolation: true, | ||
// More info: /quasar-cli/developing-electron-apps/electron-preload-script | ||
preload: path.resolve(__dirname, process.env.QUASAR_ELECTRON_PRELOAD) | ||
} | ||
}) | ||
|
||
mainWindow.loadURL(process.env.APP_URL) | ||
|
||
if (process.env.DEBUGGING) { | ||
// if on DEV or Production with debug enabled | ||
mainWindow.webContents.openDevTools() | ||
} else { | ||
// we're on production; no access to devtools pls | ||
mainWindow.webContents.on('devtools-opened', () => { | ||
mainWindow.webContents.closeDevTools() | ||
}) | ||
} | ||
|
||
mainWindow.on('closed', () => { | ||
mainWindow = null | ||
}) | ||
} | ||
|
||
app.on('ready', createWindow) | ||
|
||
app.on('window-all-closed', () => { | ||
if (process.platform !== 'darwin') { | ||
app.quit() | ||
} | ||
}) | ||
|
||
app.on('activate', () => { | ||
if (mainWindow === null) { | ||
createWindow() | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* This file is used specifically for security reasons. | ||
* Here you can access Nodejs stuff and inject functionality into | ||
* the renderer thread (accessible there through the "window" object) | ||
* | ||
* WARNING! | ||
* If you import anything from node_modules, then make sure that the package is specified | ||
* in package.json > dependencies and NOT in devDependencies | ||
* | ||
* Example (injects window.myAPI.doAThing() into renderer thread): | ||
* | ||
* import { contextBridge } from 'electron' | ||
* | ||
* contextBridge.exposeInMainWorld('myAPI', { | ||
* doAThing: () => {} | ||
* }) | ||
*/ |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.