[Gambas-user] make executable old bug

Stefano Palmeri stefanopalmeri at ...152...
Thu Jun 1 17:52:30 CEST 2006


Hi, Benoit.

Gambas2 always fails to create the executable of a project 
in a different directory than the project directory. This is due
to a missing ".gambas" in the MakeExecutable FUNCTION 
in Project.module.

TRY MOVE Project.Dir &/ Project.Name TO ExecPath

should be:

TRY MOVE Project.Dir &/ Project.Name & ".gambas" TO ExecPath

The patch was posted by Fabien Bodard sometime ago, but the bug 
is still present in 1.9.31.

Also, I added this code to MakeExecutable FUNCTION:

IF Dialog.SaveFile() THEN RETURN TRUE
    ExecPath = Dialog.Path
    IF File.Ext(ExecPath) <> "gambas" THEN    <-----
      ExecPath = ExecPath & ".gambas"           <-----
    ENDIF   <-----                                  

because when moving the file in a different folder, 
the suffix is lost (if the user did not set it in Dialog.Path). 
The extension ".gambas" is mandatory in Gambas2, isn't it?

Regards, 

Stefano Palmeri




More information about the User mailing list