amend hxml templates

Rename Electron.hx to ElectronSetup.hx to make it more clear what it does
This commit is contained in:
P.J.Shand
2018-07-31 20:47:08 +10:00
committed by Joshua Granick
parent 8553739479
commit 4aeb59f7f1
4 changed files with 23 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
import electron.main.App; import electron.main.App;
import electron.main.BrowserWindow; import electron.main.BrowserWindow;
class Electron { class ElectronSetup {
public static var window:BrowserWindow; public static var window:BrowserWindow;
@@ -45,7 +45,7 @@ class Electron {
var frame:Bool = window.borderless == false; var frame:Bool = window.borderless == false;
electron.main.App.on( 'ready', function(e) { electron.main.App.on( 'ready', function(e) {
Electron.window = new BrowserWindow( { ElectronSetup.window = new BrowserWindow( {
fullscreen: window.fullscreen, fullscreen: window.fullscreen,
frame:frame, frame:frame,
resizable: window.resizable, resizable: window.resizable,
@@ -54,14 +54,14 @@ class Electron {
height:height height:height
} ); } );
Electron.window.on( closed, function() { ElectronSetup.window.on( closed, function() {
if( js.Node.process.platform != 'darwin' ) if( js.Node.process.platform != 'darwin' )
electron.main.App.quit(); electron.main.App.quit();
}); });
Electron.window.loadURL( 'file://' + js.Node.__dirname + '/index.html' ); ElectronSetup.window.loadURL( 'file://' + js.Node.__dirname + '/index.html' );
#if debug #if debug
Electron.window.webContents.openDevTools(); ElectronSetup.window.webContents.openDevTools();
#end #end
}); });
} }

View File

@@ -1,15 +1,17 @@
-cp ::OUTPUT_DIR::/haxe
-lib electron
--each --each
--next --next
-js ::OUTPUT_FILE:: -js ::OUTPUT_FILE::
-cp ::OUTPUT_DIR::/haxe
-lib electron
-main ApplicationMain ::HAXE_FLAGS:: -main ApplicationMain ::HAXE_FLAGS::
--next --next
-js ::OUTPUT_DIR::/bin/ElectronSetup.js -js ::OUTPUT_DIR::/bin/ElectronSetup.js
-main Electron -cp ::OUTPUT_DIR::/haxe
-lib electron
-main ElectronSetup
-dce full
-D html5 -D html5
-D html -D html

View File

@@ -1,15 +1,17 @@
-cp ::OUTPUT_DIR::/haxe
-lib electron
--each --each
--next --next
-js ::OUTPUT_FILE:: -js ::OUTPUT_FILE::
-cp ::OUTPUT_DIR::/haxe
-lib electron
-main ApplicationMain ::HAXE_FLAGS:: -main ApplicationMain ::HAXE_FLAGS::
--next --next
-js ::OUTPUT_DIR::/bin/ElectronSetup.js -js ::OUTPUT_DIR::/bin/ElectronSetup.js
-main Electron -cp ::OUTPUT_DIR::/haxe
-lib electron
-main ElectronSetup
-dce full
-D html5 -D html5
-D html -D html

View File

@@ -1,15 +1,17 @@
-cp ::OUTPUT_DIR::/haxe
-lib electron
--each --each
--next --next
-js ::OUTPUT_FILE:: -js ::OUTPUT_FILE::
-cp ::OUTPUT_DIR::/haxe
-lib electron
-main ApplicationMain ::HAXE_FLAGS:: -main ApplicationMain ::HAXE_FLAGS::
--next --next
-js ::OUTPUT_DIR::/bin/ElectronSetup.js -js ::OUTPUT_DIR::/bin/ElectronSetup.js
-main Electron -cp ::OUTPUT_DIR::/haxe
-lib electron
-main ElectronSetup
-dce full
-D html5 -D html5
-D html -D html