GP2X Multiplatform Project Setup


muphicks

Still Fresh
Joined
Jul 20, 2006
Messages
18
Website
Visit site
Currently I have setup a Visual Studio 2005 solution to contain two separate projects. The first named "Win_MyDemo" is setup as a standard win32 project for use with SDL. The second project "GP2X_MyDemo" is setup to use a custom build rules file and includes an extra trigger.link file as described on the wiki, again setup to link to SDL but this time the devkitpro/devkitGP2X/ sdl files.

This setup works, in that doing a build/build will rebuild both projects producing a windows exe and gp2x gpe. However, since these are separate projects for the sole purpose of using different build rules, the actual source files need adding to both projects whenever I create a new .cpp or .h file.

I know its a minor issue, but can this be avoided? Is there a way to have a single project that can be switched between a windows build and gp2x build rules?

I've looked into adding a new configuration to the config dropdown such that alongside "Debug" and "Release" is the "Arm-Linux-Release" option. However, this doesn't appear to be feasible as the moment you setup the custom build rules for the arm-linux-release configuration, the standard compiler settings are removed from all three configuations. :(

Is there another way?
 
Is it possible to just have one project that builds both executables automatically? (that is, not switching between them, but always building both)
 
This probably isn't going to help much, because it's too much work, but you can build plugins for Visual Studio to add this kind of functionality without using a custom build step. Probably not very appealing to you though.

Another option is to build your Windows version using Cygwin gcc, and modify the custom build step such that it can handle both configurations.

Messing about trying to add files to projects is the main reason I don't use the Visual Studio IDE. :) Not that I'm that keen on makefiles these days either.
 
BradN posted on Aug 13 2006 at 11:16 PM said:
Is it possible to just have one project that builds both executables automatically? (that is, not switching between them, but always building both)

Yes, well its possible to build both with a single build/rebuild but currently the only way I've managed to do so is by having two separate projects in the same solution. One using normal windows build rules, the second using the arm-linux custom build rules.

The downside is the need to add the same source files to both projects. I'd rather have a single project and manually select which platform to build for, but I havn't found a way to do this yet.

gfoot posted on Aug 14 2006 at 12:05 AM said:
This probably isn't going to help much, because it's too much work, but you can build plugins for Visual Studio to add this kind of functionality without using a custom build step. Probably not very appealing to you though.

I wasn't aware of that, although I don't really fancy making a plugin to do this since managing two projects in the same solution isn't really that time consuming for my purposes. Still might be something to look into in the far future :p
 
Last edited by a moderator:
It can be done in Visual Studio, but as said earlier, you must have a Visual Studio plug-in to allow a new target to be specified. This is how Xbox development is done. We use the same source files in the one project and select either Win32 or Xbox for the target type. Developing such a plug-in requires the use of the Professional version of Visual Studio.
 
Back
Top