Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to properly configure a cross-platform Delphi XE2 project?

Right now I have 2 platforms (Mac and Win32) and 2 configs (Debug ans Release). Whole thing is under SVN.

Here is layout for build output:

.\App\$(Platform)\$(Config)

The code is split into few folders and located here:

.\Code\MyProject.dpr
.\Code\Common\
.\Code\Forms\
.\Code\Source\

Common data files are here:

.\Data\ custom data files (dlls, textures, models, etc.)

This scheme has certain flaws though, which I need to resolve, but I don't know how to make it better. I want to have only one set of data files in SVN under Data folder, but I need to have it copied to .\App\$(Platform)\$(Config) paths automatically on build (note, certain data files are common for both platforms, but some are not). Is there a way to setup build process to copy the files, like it does with Deployment and PAServer? Alternatively I could setup paths to Data files as ..\..\Data, but that looks weird to me.

Maybe there are some other options I'm not aware of, or project layout could be changed completely? How would you setup the project structure and build for cross-platform compiling?

like image 364
Kromster Avatar asked Dec 28 '11 07:12

Kromster


1 Answers

Use the Post Build actions.

From Project Options | Build Events | Post Build Events | Commands

How to setup

Further reading at

  1. Creating Build Events

  2. Pre and Post-Build Automation in Delphi

like image 150
Gad D Lord Avatar answered Nov 08 '22 13:11

Gad D Lord