IDE: the feature "Program detected: create new Lazarus project for this program?" creates project with wrong target file name
Original Reporter info from Mantis: Bart @flyingsheep
-
Reporter name: Bart Broersma
Original Reporter info from Mantis: Bart @flyingsheep
- Reporter name: Bart Broersma
Description:
When lazarus opens a source file that is a program, it asks if it should convert it to a Lazarus project file, which is very usefull.
However after the conversion the "target file name" is a bit "off"
Steps to reproduce:
Create a file hello.pas
program hello;
begin
writeln('Hello World');
end.
Start Lazarus.
Menu -> Open file ... -> select hello.pas and click OK
A dialog appears with title "Program found"
It asks to convert the program to a Lazarus project file.
Click OK
In the next dialog select "Simple program"
Click OK
Menu -> Project -> Project Options
Select Compiler Options -> Paths
In the field "target file name (-o)" it should read hello (the program is called hello), but instead it has the targetname of whatever project you have used in the past to create "Set compiler options as default" (in the same dialog), which happens to be "eplus" in my case.
Additional information:
This could be solved in several ways:
- do not include "target file name" in default compiler options that are created in the above mentioned way
- leave target file name blank (but this will create the executable in a place that the user may not expect)
- create a proper value for target file name:
- extract form source, if it is there
- prompt user if it is not (or prompt user to confirm if it is)
Mantis conversion info:
- Mantis ID: 23379
- OS: Window
- OS Build: Win7
- Build: r39272
- Platform: i386
- Version: 1.1 (SVN)
- Fixed in revision: 44155 (#78b3ddb3)
- Target version: 1.4