diff --git a/.gitignore b/.gitignore index eb03e3e..3065c9c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules *.log +out \ No newline at end of file diff --git a/main.js b/main.js index dce583a..e98c017 100644 --- a/main.js +++ b/main.js @@ -13,7 +13,7 @@ let mainWindow function createWindow () { // Create the browser window. - mainWindow = new BrowserWindow({width: 800, height: 600}) + mainWindow = new BrowserWindow({width: 700, height: 600}) // and load the index.html of the app. mainWindow.loadURL(url.format({ diff --git a/main.prod.js b/main.prod.js deleted file mode 100644 index e98c017..0000000 --- a/main.prod.js +++ /dev/null @@ -1,60 +0,0 @@ -const electron = require('electron') -// Module to control application life. -const app = electron.app -// Module to create native browser window. -const BrowserWindow = electron.BrowserWindow - -const path = require('path') -const url = require('url') - -// Keep a global reference of the window object, if you don't, the window will -// be closed automatically when the JavaScript object is garbage collected. -let mainWindow - -function createWindow () { - // Create the browser window. - mainWindow = new BrowserWindow({width: 700, height: 600}) - - // and load the index.html of the app. - mainWindow.loadURL(url.format({ - pathname: path.join(__dirname, 'app/index.html'), - protocol: 'file:', - slashes: true - })) - - // Open the DevTools. - // mainWindow.webContents.openDevTools() - - // Emitted when the window is closed. - mainWindow.on('closed', function () { - // Dereference the window object, usually you would store windows - // in an array if your app supports multi windows, this is the time - // when you should delete the corresponding element. - mainWindow = null - }) -} - -// This method will be called when Electron has finished -// initialization and is ready to create browser windows. -// Some APIs can only be used after this event occurs. -app.on('ready', createWindow) - -// Quit when all windows are closed. -app.on('window-all-closed', function () { - // On OS X it is common for applications and their menu bar - // to stay active until the user quits explicitly with Cmd + Q - if (process.platform !== 'darwin') { - app.quit() - } -}) - -app.on('activate', function () { - // On OS X it's common to re-create a window in the app when the - // dock icon is clicked and there are no other windows open. - if (mainWindow === null) { - createWindow() - } -}) - -// In this file you can include the rest of your app's specific main process -// code. You can also put them in separate files and require them here. diff --git a/package.json b/package.json index 9dc56db..94682f9 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,21 @@ { - "name": "65802sim.desktop", - "version": "0.1.0", + "name": "6502desktop", + "version": "0.1.2", "description": "Desktop version of 6502 Simulator", - "main": "index.js", + "main": "main.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "dev": "electron ./main", - "start": "electron ./main.prod", - "build": "" + "start": "electron .", + "pack-mac": "electron-packager . 6502Desktop --asar.unpack=protocol-link.html --overwrite --platform=darwin --arch=x64 --icon=assets/mac/app.icns --out=out --osx-sign.identity='Developer ID Application: 3DEsprit' --appBundleId='6502Desktop' appCategoryType=public.app-category.education", + "pack-win": "electron-packager . --asar.unpack=protocol-link.html --overwrite --platform=win32 --arch=ia32 --icon=assets/win/app.ico --out=out --version-string.CompanyName='3DEsprit' --version-string.FileDescription='6502 Simulator Desktop' --version-string.ProductName='6502 Simulator Desktop'", + "pack-linux": "electron-packager . --asar.unpack=protocol-link.html --overwrite --platform=linux --arch=x64 --out=out" }, "author": "DBrown", "license": "ISC", "dependencies": { "electron": "^1.6.2", "electron-debug": "^1.1.0", - "electron-devtools-installer": "^2.1.0", "electron-prebuilt": "^1.4.13" - } + }, + "devDependencies": {} } diff --git a/yarn.lock b/yarn.lock index 3a8816c..9a09728 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,6 @@ # yarn lockfile v1 -"7zip@0.0.6": - version "0.0.6" - resolved "https://registry.yarnpkg.com/7zip/-/7zip-0.0.6.tgz#9cafb171af82329490353b4816f03347aa150a30" - ajv@^4.9.1: version "4.11.4" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.4.tgz#ebf3a55d4b132ea60ff5847ae85d2ef069960b45" @@ -117,10 +113,6 @@ core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" -cross-unzip@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/cross-unzip/-/cross-unzip-0.0.2.tgz#5183bc47a09559befcf98cc4657964999359372f" - cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" @@ -174,15 +166,6 @@ electron-debug@^1.1.0: electron-is-dev "^0.1.0" electron-localshortcut "^0.6.0" -electron-devtools-installer@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/electron-devtools-installer/-/electron-devtools-installer-2.1.0.tgz#fee3b23e491aa10dfc77192c58cf5596cc2ba53e" - dependencies: - "7zip" "0.0.6" - cross-unzip "0.0.2" - rimraf "^2.5.2" - semver "^5.3.0" - electron-download@^3.0.1: version "3.3.0" resolved "https://registry.yarnpkg.com/electron-download/-/electron-download-3.3.0.tgz#2cfd54d6966c019c4d49ad65fbe65cc9cdef68c8" @@ -730,7 +713,7 @@ request@^2.45.0: tunnel-agent "^0.6.0" uuid "^3.0.0" -rimraf@^2.2.8, rimraf@^2.5.2: +rimraf@^2.2.8: version "2.6.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: