Forum > Options

EXE name

(1/2) > >>

pcurtis:
Hi All,
simple question.

How do I make the compiled program name the same as the project name and create it in a specific folder?

Thanks.

TRon:
When you create a new application, the IDE will add a form, unit, project-file and some other files for you automatically.

When you save your program for the first time the IDE will ask where you wish to save it, and how to name your project, as well as your unit file(s). The save requester allows you to create a directory anywhere on your disk, and the naming can be done as you wish.

In case you already have the projects saved once and wish to rename it, then just save-as your project using another name. The projects name will be the name of the executable. Using save-as also allows you to save your project into another directory.

Be careful with combining multiple projects into a single folder, as it could cause name-clashes

pcurtis:
Thanks TRon, thats clear. What I thought was I could put a macro in Project Options => Paths => Target file name (-o) to specify the path.

Is that possible?

TRon:

--- Quote from: pcurtis on August 28, 2020, 10:21:03 pm ---What I thought was I could put a macro in Project Options => Paths => Target file name (-o) to specify the path.
Is that possible?

--- End quote ---
Actually -o is for the name only. However you might be able to get away with it, adding a path, but if it does then the path must exist. e.g. the FPC compiler will not create that path for you. I have no idea if and how Lazarus handles this.

zoltanleo:

--- Quote from: pcurtis on August 28, 2020, 08:36:24 pm ---Hi All,
simple question.

How do I make the compiled program name the same as the project name and create it in a specific folder?

Thanks.

--- End quote ---

See attachment. You can just give the name of the output file without macros

Navigation

[0] Message Index

[#] Next page

Go to full version