Skip to content

Commit

Permalink
Starting to implement into Electron.
Browse files Browse the repository at this point in the history
  • Loading branch information
neauoire committed Sep 18, 2017
1 parent fe65660 commit f10671f
Show file tree
Hide file tree
Showing 63 changed files with 154 additions and 21 deletions.
10 changes: 4 additions & 6 deletions .gitignore
@@ -1,6 +1,4 @@
*.swp
*.swo
assets/*.png
assets/*.jpg
assets/*.gif
assets/*.svg
node_modules/
builds/
.DS_Store
*/.DS_Store
35 changes: 35 additions & 0 deletions BUILD.md
@@ -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
```
Binary file added PREVIEW.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions README.md
@@ -1,7 +1,8 @@
# Ronin
# Marabu

Ronin is my web based drawing tool it's under constant development.
The repository comes with a script that fires Ronin from within Localhost.
Marabu is a simple open-source graphic design tool.

<img src='https://raw.githubusercontent.com/hundredrabbits/Ronin/master/PREVIEW.jpg' width="600"/>

## Example file

Expand Down
7 changes: 0 additions & 7 deletions Ronin Server.command

This file was deleted.

6 changes: 6 additions & 0 deletions Updater(OS X).command
@@ -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"
1 change: 0 additions & 1 deletion assets/assets.txt

This file was deleted.

Binary file added icon.icns
Binary file not shown.
Binary file added icon.ico
Binary file not shown.
74 changes: 74 additions & 0 deletions main.js
@@ -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{

}
})
4 changes: 0 additions & 4 deletions media/graphics/logo.svg

This file was deleted.

15 changes: 15 additions & 0 deletions package.json
@@ -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"
}
}
16 changes: 16 additions & 0 deletions presets/logo.rin
@@ -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.

0 comments on commit f10671f

Please sign in to comment.