Created
August 29, 2013 04:27
-
-
Save valyard/6374271 to your computer and use it in GitHub Desktop.
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
protected function restart(event:Event = null):void { | |
NativeApplication.nativeApplication.dispatchEvent( new Event(Event.EXITING) ); | |
NativeApplication.nativeApplication.exit(); | |
if ( NativeProcess.isSupported ) { | |
var app:File = File.applicationDirectory.resolvePath( App._airConfig.filename + ".exe" ); | |
if ( !app.exists ) return; | |
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo(); | |
nativeProcessStartupInfo.executable = app; | |
var process:NativeProcess = new NativeProcess(); | |
process.start(nativeProcessStartupInfo); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment