[Gambas-user] Make executable problem with .32
Ron Onstenk
ronstk at ...239...
Fri Jun 16 00:50:43 CEST 2006
On Thursday 15 June 2006 19:59, Benoit Minisini wrote:
> On Thursday 15 June 2006 02:19, Ron Onstenk wrote:
> > Make executable problem
--8<---
> > 5--> IF ExecPath <> sPath THEN
> > TRY KILL ExecPath
> > TRY MOVE sPath TO ExecPath
> > ENDIF
> >
> > 'Stat(OUTPUT_FILE)
> > SetMessage(("OK"))
> >
> >
> > 'Compile(TRUE, FALSE)
> > EXEC ["rm", "-rf", Project.Dir &/ ".gambas"]
> > TRY MOVE Project.Dir &/ ".gambas.save" TO Project.Dir &/ ".gambas"
> >
> > IF NOT bDoNotIncVersion THEN INC ReleaseVersion
> > WriteProject(TRUE)
> >
> > END
> >
>
> The problem comes from the following line:
>
> TRY MOVE sPath TO ExecPath
>
> It tries to silently move the executable path from the place it is compiled in
> (inside the project) to the place selected by the user.
>
> But this does not work if ExecPath is not on the same device (hd partition)
> than sPath! I fixed that by replacing this line by:
>
> TRY COPY sPath TO ExecPath
> IF NOT ERROR THEN TRY KILL sPath
OK, I'm not happy see ghosts playing with my stuff :)
>
> As for File.Ext() with two parameters, it does not return the file extension,
> but the complete path with a new extension specified as second parameter.
>
> To prevent the confusion, I have replaced this syntax by new methods:
> File.SetExt, File.SetName, File.SetDir, File.SetBaseName. It is clearer!
Sounds (types) Good
>
> Regards,
>
More information about the User
mailing list