-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starting to implement into Electron.
- Loading branch information
Showing
63 changed files
with
154 additions
and
21 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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
*.swp | ||
*.swo | ||
assets/*.png | ||
assets/*.jpg | ||
assets/*.gif | ||
assets/*.svg | ||
node_modules/ | ||
builds/ | ||
.DS_Store | ||
*/.DS_Store |
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,35 @@ | ||
## Build | ||
|
||
Don't forget to ```npm cache clean```! | ||
|
||
### Build Linux64 / Darwin64 / Windows64(Offsite) | ||
|
||
``` | ||
cd /xxiivv/Nataniev/public/public.projects/sources/Ronin/ | ||
git pull | ||
rm -r /xxiivv/Nataniev/public/public.projects/builds/Ronin-linux-x64/ | ||
rm /xxiivv/Nataniev/public/public.projects/builds/ronin_lin64.zip | ||
electron-packager . Ronin --platform=linux --arch=x64 --out /xxiivv/Nataniev/public/public.projects/builds --overwrite --electron-version=1.7.5 --icon=icon.ico | ||
rm -r /xxiivv/Nataniev/public/public.projects/builds/Ronin-win32-x64/ | ||
rm /xxiivv/Nataniev/public/public.projects/builds/ronin_win64.zip | ||
electron-packager . Ronin --platform=win32 --arch=x64 --out /xxiivv/Nataniev/public/public.projects/builds --overwrite --electron-version=1.7.5 --icon=icon.ico | ||
rm -r /xxiivv/Nataniev/public/public.projects/builds/Ronin-darwin-x64/ | ||
rm /xxiivv/Nataniev/public/public.projects/builds/ronin_osx64.zip | ||
electron-packager . Ronin --platform=darwin --arch=x64 --out /xxiivv/Nataniev/public/public.projects/builds --overwrite --electron-version=1.7.5 --icon=icon.icns | ||
cd /xxiivv/Nataniev/public/public.projects/builds/ | ||
~/butler push /xxiivv/Nataniev/public/public.projects/builds/Ronin-linux-x64/ hundredrabbits/ronin:linux-64 | ||
~/butler push /xxiivv/Nataniev/public/public.projects/builds/Ronin-win32-x64/ hundredrabbits/ronin:windows-64 | ||
~/butler push /xxiivv/Nataniev/public/public.projects/builds/Ronin-darwin-x64/ hundredrabbits/ronin:osx-64 | ||
rm -r /xxiivv/Nataniev/public/public.projects/builds/Ronin-darwin-x64/ | ||
rm -r /xxiivv/Nataniev/public/public.projects/builds/Ronin-linux-x64/ | ||
rm -r /xxiivv/Nataniev/public/public.projects/builds/Ronin-win32-x64/ | ||
~/butler status hundredrabbits/ronin | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 was deleted.
Oops, something went wrong.
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,6 @@ | ||
#!/bin/bash | ||
cd ~/Github/HundredRabbits/Ronin/ | ||
electron-packager . Ronin --platform=darwin --arch=x64 --out ~/Desktop/ --overwrite --electron-version=1.7.5 --icon=icon.icns | ||
mv -v ~/Desktop/Ronin-darwin-x64/Ronin.app /Applications/ | ||
rm -r ~/Desktop/Ronin-darwin-x64/ | ||
open -a "Ronin" |
This file was deleted.
Oops, something went wrong.
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,74 @@ | ||
const {app, BrowserWindow, webFrame, Menu} = require('electron') | ||
const path = require('path') | ||
const url = require('url') | ||
|
||
let win | ||
|
||
app.on('ready', () => | ||
{ | ||
win = new BrowserWindow({width: 930, height: 540, backgroundColor:"#000", frame:false, resizable:false, autoHideMenuBar: true, icon: __dirname + '/icon.ico'}) | ||
|
||
win.loadURL(`file://${__dirname}/sources/index.html`) | ||
|
||
let is_shown = true; | ||
|
||
if (process.platform === 'darwin') { | ||
Menu.setApplicationMenu(Menu.buildFromTemplate([ | ||
{ | ||
label: 'File', | ||
submenu: [ | ||
{ label: 'Quit', accelerator: 'CmdOrCtrl+Q', click: function() { force_quit=true; app.exit(); }} | ||
] | ||
}, | ||
{ | ||
label: 'Edit', | ||
submenu: [ | ||
{ role: 'undo' }, | ||
{ role: 'redo' }, | ||
{ role: 'cut' }, | ||
{ role: 'copy' }, | ||
{ role: 'paste' }, | ||
{ role: 'delete' }, | ||
{ role: 'selectall' } | ||
] | ||
}, | ||
{ | ||
label: 'Window', | ||
submenu : [ | ||
{ label: 'Hide', accelerator: 'CmdOrCtrl+H',click: () => { if(is_shown){ win.hide(); } else{ win.show(); }}}, | ||
{ label: 'Minimize', accelerator: 'CmdOrCtrl+M',click: () => { win.minimize(); }}, | ||
{ label: 'Fullscreen', accelerator: 'CmdOrCtrl+Enter',click: () => { win.setFullScreen(win.isFullScreen() ? false : true); }} | ||
] | ||
} | ||
])); | ||
} | ||
|
||
win.on('closed', () => { | ||
win = null | ||
app.quit() | ||
}) | ||
|
||
win.on('hide',function() { | ||
is_shown = false; | ||
}) | ||
|
||
win.on('show',function() { | ||
is_shown = true; | ||
}) | ||
// Open the DevTools. | ||
win.webContents.openDevTools() | ||
}) | ||
|
||
app.on('window-all-closed', () => | ||
{ | ||
app.quit() | ||
}) | ||
|
||
app.on('activate', () => { | ||
if (win === null) { | ||
createWindow() | ||
} | ||
else{ | ||
|
||
} | ||
}) |
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
{ | ||
"name": "Ronin", | ||
"version": "0.1.0", | ||
"main": "main.js", | ||
"scripts": { | ||
"start": "electron ." | ||
}, | ||
"devDependencies": { | ||
"electron": "^1.7.5", | ||
"electron-prebuilt": "^1.4.13" | ||
}, | ||
"dependencies": { | ||
"electron-packager": "^8.4.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
~ TRY 1 | ||
frame.resize 420x330 | ||
layer.fill #EEE | ||
brush:color #ff0000 | ||
path:line_color #222 | ||
magnet.grid 15x15 4,4 | ||
frame.select work | ||
path:line_cap butt | ||
path:line_width 60 | ||
path.stroke M60,60 a30,30 0 0,1 30,30 l0,120 a30,30 0 0,0 30,30 a30,-30 0 0,0 30,-30 l0,-120 a30,-30 0 0,1 30,-30 a30,30 0 0,1 30,30 l0,120 a30,30 0 0,0 30,30 a30,-30 0 0,0 30,-30 l0,-120 a30,-30 0 0,1 30,-30 | ||
path:line_cap butt | ||
path:line_width 1 | ||
path:line_color #EEE | ||
path.stroke M90,60 a30,30 0 0,1 30,30 l0,120 a30,30 0 0,0 30,30 a30,-30 0 0,0 30,-30 l0,-120 a30,-30 0 0,1 30,-30 a30,30 0 0,1 30,30 l0,120 a30,30 0 0,0 30,30 a30,-30 0 0,0 30,-30 l0,-120 a30,-30 0 0,1 30,-30 | ||
path.stroke M90,60 a-30,30 0 0,0 -30,30 | ||
magnet.clear |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.