Jim Sawyer 0 Posted April 5, 2023 I use Delphi 10.2 and MySQL. By default, the code exists in the ...\Project\ directory. When the project is compiled, the Executable program is in the ...\Project\Win64\Debug\ directory. I want to put my code in a ...\Project\AmeriVet\Current\ directory, but still have the compiled executable program in the ...\Project\Win64\Debug\ directory. What do I need to do to make that happen? Thanks, Jim Sawyer Share this post Link to post
FPiette 382 Posted April 5, 2023 I project / Options / Delphi, change "Output Directory" to whatever you want. You should also change "Unit output directory" which is where the DCU are going. It is better to use the macros $(Platform) and $(Config) so that the destinations are different for all platforms and configurations. Share this post Link to post
PeterBelow 238 Posted April 6, 2023 19 hours ago, Jim Sawyer said: I use Delphi 10.2 and MySQL. By default, the code exists in the ...\Project\ directory. When the project is compiled, the Executable program is in the ...\Project\Win64\Debug\ directory. I want to put my code in a ...\Project\AmeriVet\Current\ directory, but still have the compiled executable program in the ...\Project\Win64\Debug\ directory. What do I need to do to make that happen? Thanks, Jim Sawyer To change the folder for the project source file open the project in the IDE and use the "Save project as..." menu entry of the File menu to save the DPR and DPROJ files in the new location you want. Then open each file (form, frame, datamodule) in the IDE and use the "Save as..." menu to save it to the new folder. Finally use "Project -> view source" to open the DPR file in the editor and check the entries in the Uses clause and any $R statements for pathes that still refer to the old folder. This is certainly laborious but the safest way to make sure the entries in the DPROJ and DPR file are changed properly to the new location. You will retain the files in the old location this way and can zip them up or delete them at leisure. If the project is large (many files to move) it may be easier to just move the files to the new folder (with the IDE not running!) using Windows explorer, delete the DPROJ and any files with "local" in the extension, open the DPR file in a text editor (not the IDE), correct any pathes that need it there, and then open the project DPR file from the new location in the IDE. That will create a new DPROJ file, you then just need to check the project options to modify the output folder to your requirements. Share this post Link to post