Compiler output path lazarus / 13-General ---------------------------------------------------------------------- User137 · 2011-02-11 16:36 I'm guessing some recent version of Lazarus or fpc changed the behavior of output paths. What i'm used to see: - program.exe goes in the project root directory - .compiled, .o, .ppu, .or all the junk files go in the lib\ folder - Having program related data folders in the program root folder. What i saw after reinstalling to latest Lazarus build: - App raises exception because data files are not found. - Now the program.exe is located in the lib\ too, and only there. I went again through all the settings i could find to get the behavior back to what i had but can't find it. How do you manage your paths, or what do you suggest me to do? As far as i see i have 4 options: 1) Some setting i missed. 2) Move all data folders and under lib\ , but this would make them mixed with all the trash files. 3) Remove output path and make everything come in the program folder. (Personally leaning on this) 4) Find a macro/whatever after script to move executable in program folder from lib\ after compile is done. This however requires that debugger must find it too. ---------------------------------------------------------------------- User137 · 2011-02-14 07:38 Can anyone at all say how it works for you? I'm curious to know if i just encountered a bug and Lazarus wasn't supposed to act like this. I don't do versioning to different OS/cpu etc so the default output folders seem a little overkill from my point of view. Opinions? ---------------------------------------------------------------------- Leledumbo · 2011-02-14 09:41 If you set unit output path but not the executable output, it would go there as well. This is Lazarus behavior, not FPC. ---------------------------------------------------------------------- theo · 2011-02-14 09:48 For me, behaviour is like documented: http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Unit_o utput_directory ---------------------------------------------------------------------- User137 · 2011-02-14 10:41 Quote from: Leledumbo on February 14, 2011, 10:41:51 amIf you set unit output path but not the executable output, it would go there as well. This is Lazarus behavior, not FPC. That's exactly what i meant, so there is separate unit and executable path. When i put -FU path to lib\ and -o path simply "project1" the exe went in lib\. But i just downloaded daily snapshot again and suddenly all projects work like they used to. ---------------------------------------------------------------------- User137 · 2011-07-02 17:08 Only now i finally figured out the cause. In Project Options -> Compiler Options -> Paths: There is a "Target filename (-o)", and if it's left empty the executable will be placed in the temp unit folder described above in -FU. So knowing this i saved "Project" in target file name for default compiler options, hoping it wont happen again. Although it will require me to change the name to what project name really is for every project. This is not very convenient solution though... Assume i have folders like: Project\Sounds\ Project\Textures\ Project\Data\ Now if executable would as default go in Project\lib\ it wouldn't find any data. This has been highly irritating for long time. When again putting data folders under lib\ would be awkward. Project already has a name, why do i have to type it second time in compiler options? ---------------------------------------------------------------------- Leledumbo · 2011-07-03 08:39 QuoteNow if executable would as default go in Project\lib\ it wouldn't find any data. This has been highly irritating for long time. When again putting data folders under lib\ would be awkward. Project already has a name, why do i have to type it second time in compiler options?Indeed, but sometimes project's name could be complex (contains spaces, quotes, etc) while the executable is still a simple identifier. I put $NameOnly($ProjFile()) in target file name and I save it as default. Otherway, would be to put -FE. (note the dot) to other options tab (this would override -FU, so the executable path could be different than unit path). ---------------------------------------------------------------------- User137 · 2011-07-03 12:14 That's the kind i was looking for. $NameOnly($ProjFile()) is my new default then. Opening many projects i saw that most had -o set to the proper project name already. This makes me suspect there may have been some automatic behaviour with Lazarus that types project name to it. But with new projects it was now setting it empty to me... So is it just a bug or should it be automatic? I haven't updated Lazarus for a while. (Then again how would project default settings mix with that?)