diff --git a/templates/electron/haxe/Electron.hx b/templates/electron/haxe/ElectronSetup.hx similarity index 87% rename from templates/electron/haxe/Electron.hx rename to templates/electron/haxe/ElectronSetup.hx index a8adaed0a..f6779a8fa 100644 --- a/templates/electron/haxe/Electron.hx +++ b/templates/electron/haxe/ElectronSetup.hx @@ -1,7 +1,7 @@ import electron.main.App; import electron.main.BrowserWindow; -class Electron { +class ElectronSetup { public static var window:BrowserWindow; @@ -45,7 +45,7 @@ class Electron { var frame:Bool = window.borderless == false; electron.main.App.on( 'ready', function(e) { - Electron.window = new BrowserWindow( { + ElectronSetup.window = new BrowserWindow( { fullscreen: window.fullscreen, frame:frame, resizable: window.resizable, @@ -54,14 +54,14 @@ class Electron { height:height } ); - Electron.window.on( closed, function() { + ElectronSetup.window.on( closed, function() { if( js.Node.process.platform != 'darwin' ) electron.main.App.quit(); }); - Electron.window.loadURL( 'file://' + js.Node.__dirname + '/index.html' ); + ElectronSetup.window.loadURL( 'file://' + js.Node.__dirname + '/index.html' ); #if debug - Electron.window.webContents.openDevTools(); + ElectronSetup.window.webContents.openDevTools(); #end }); } diff --git a/templates/electron/hxml/debug.hxml b/templates/electron/hxml/debug.hxml index 5dcb243e8..eeaeb5783 100644 --- a/templates/electron/hxml/debug.hxml +++ b/templates/electron/hxml/debug.hxml @@ -1,15 +1,17 @@ --cp ::OUTPUT_DIR::/haxe --lib electron - --each --next -js ::OUTPUT_FILE:: +-cp ::OUTPUT_DIR::/haxe +-lib electron -main ApplicationMain ::HAXE_FLAGS:: --next -js ::OUTPUT_DIR::/bin/ElectronSetup.js --main Electron +-cp ::OUTPUT_DIR::/haxe +-lib electron +-main ElectronSetup +-dce full -D html5 -D html diff --git a/templates/electron/hxml/final.hxml b/templates/electron/hxml/final.hxml index f3ec9299d..9d4344ca9 100644 --- a/templates/electron/hxml/final.hxml +++ b/templates/electron/hxml/final.hxml @@ -1,15 +1,17 @@ --cp ::OUTPUT_DIR::/haxe --lib electron - --each --next -js ::OUTPUT_FILE:: +-cp ::OUTPUT_DIR::/haxe +-lib electron -main ApplicationMain ::HAXE_FLAGS:: --next -js ::OUTPUT_DIR::/bin/ElectronSetup.js --main Electron +-cp ::OUTPUT_DIR::/haxe +-lib electron +-main ElectronSetup +-dce full -D html5 -D html diff --git a/templates/electron/hxml/release.hxml b/templates/electron/hxml/release.hxml index 39e8190b6..f95122e98 100644 --- a/templates/electron/hxml/release.hxml +++ b/templates/electron/hxml/release.hxml @@ -1,15 +1,17 @@ --cp ::OUTPUT_DIR::/haxe --lib electron - --each --next -js ::OUTPUT_FILE:: +-cp ::OUTPUT_DIR::/haxe +-lib electron -main ApplicationMain ::HAXE_FLAGS:: --next -js ::OUTPUT_DIR::/bin/ElectronSetup.js --main Electron +-cp ::OUTPUT_DIR::/haxe +-lib electron +-main ElectronSetup +-dce full -D html5 -D html \ No newline at end of file