It automatically makes the executable in the project folder if it's being run from the IDE
(Args will just be the app name if run from ide or it's path if run via the executable)
Public Sub _new() Dim sArgs As String = Args.All.Copy() ' With this command the project executable is compiled as it's launched (If run from the IDE Arg has no path). If Not InStr(Args, "/") Then sArgs = Application.Path &/ Application.Name If File.Ext(sArgs) <> "gambas" Then sArgs &= ".gambas" If Exist(File.Dir(sArgs) &/ ".project") Then Shell "echo -n 'Run from IDE so compiling exe... '\ncd '" & File.Dir(sArgs) & "'\ngbc3 -xawg\ngba3\necho 'Compiling complete'" Wait Endif EndThis is useful for a couple of things at least...
You know when you have been testing an app (using the Run button in the IDE) and made changes but you forgot to hit "Make Executable" so you're still on the old version.
No worries it's already been compiled
Also if you are testing an app like some of mine that support drag-dropping onto the launcher icon.
these apps apps run the executable, i also have apps that only use one instance and other launches activate the open app. things like that need the executable made each time for testing.
Maybe you have had other reasons that you needed the Executable made every time you tested your program?