gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > vc2mkfil: Generate devkitPro Makefile from .vcproj file...

#101904 - Izhido - Fri Sep 08, 2006 8:09 pm

Hi everyone! :)

Now that I'm finally with some free time from my job, I wanted to tell you all about a tool I created with/for Visual C++ 2005 Express, and for use with devkitPro. I called it vc2mkfil. It's purpose is to read settings from a .vcproj file, the project settings file created by Visual Studio 2005 for C++ projects (and, of course, created for Visual C++ 2005 Express), to create a Makefile that devkitPro's build tools will recognize.

I've built this tool because us, Visual Studio users, usually prefer to manage source code files, header files, include paths, library paths, and such, from within Visual Studio itself. And, by doing this, some often-looked features that Visual Studio users expect from the IDE, become available; features like Intellisense, the "Open Document <xxxxxx.h>", "Go To Definition", "Go To Declaration", "Go To Header File", and so on, that VS users like me find very useful.

I posted a message in dslinux.org's forum containing a zip file. It has the tool executable, the VC++ project it was built on, and the "/examples/nds/templates/arm9/" devkitPro project built with VC++ showing how to use the tool. This is the post:

http://www.dslinux.org/index.php?showtopic=1825

vc2mkfil itself was built as a command-line tool, that receives an input file (or stdin, if required), outputs to an output file (or stdout, if required), and at least two specific -parameters to determine how to generate the makefile.

This is just a initial release, and currently it only supports generating a makefile for a NDS ARM9 only target. It, however, should work just fine. The tool will set:

VPATH, CFILES, CPPFILES, and SFILES with the contents of the Solution Explorer;

INCLUDE with Project-Properties-Configuration Properties-NMake-Include Search Path;

LIBDIRS Project-Properties-Configuration Properties-NMake-Assembly Search Path;

LIB with Project-Properties-Configuration Properties-NMake-Forced Using Assemblies;

BUILD with whatever $ConfigurationName (Debug or Release, typically) was specified.

This should behave as a regular devkitPro Makefile, with all behaviors / constrainsts imposed by devkitPro like they have always been.

I know for a fact that this tool works for me. It definitively made my life easier when building NDS projects with devkitPro. Actually I'm looking for comments from you all. Does this tool sound like something you might use? Do you think you have some time to test this tool on your project? Was it useful? Because, if enough people of the dev community think it's useful, I'd like to contribute this project to devkitPro so it becomes part of it. Of course, once it's finished... :) Is that a good idea? Please let me know.

(NOTE: I posted this message some minutes ago to dslinux.org's forum. But you already know that :) I'm very interested on hearing of all of the DS & GBA homebrew community... )

#101918 - HotChilli - Fri Sep 08, 2006 11:55 pm

Hm. That sounds cool. =)

#101922 - HotChilli - Sat Sep 09, 2006 12:19 am

Yeah. That should be nice. But I can't force it to work on VS 2003 at all. :( Maybe it will be nice, to make some .ini file or something else what describe VC structure. That should make your util cross-editoring, you know? ))

PS: My version is VS 7.1.3088. ;)


Last edited by HotChilli on Sat Sep 09, 2006 10:02 am; edited 1 time in total

#101929 - gmiller - Sat Sep 09, 2006 1:01 am

VS2003 has a lot of problems with makefile projects that do not use the micro-slop make. I beat on 2003 for about 2 weeks and then did it on 2005 and it worked first time. You can download 2005 for free from MS (it takes a little work to get the libraries). I know the comercial versions co-exist with each other I do not know about the free version. I will go get the URL's and post them here.

#101933 - gmiller - Sat Sep 09, 2006 1:13 am

Go to http://msdn.microsoft.com/vstudio/express/visualc/download/ get the C++ Express Edition and get the Platform SDK. This will give you a 2005 development environment at no cost. I have the full install so I can't compare but a number of my students are using this and 2003.

You can also get the iso files here http://msdn.microsoft.com/vstudio/express/support/install/

#102175 - Izhido - Mon Sep 11, 2006 3:43 pm

gmiller (and everybody): Relax, Express versions can coexist with VS 6, 2002, 2003, and 2005. I know that for a fact (this is the setup in my own machine at work). That should be no problem at all.

HotChilli: I was kind of expecting that. I didn't have the chance to study pre-2005 .vcproj files, so I don't really know what could be missing from them. Do you have the text output of the tool, a screenshot, or something that might help me to find out what could be wrong there?

(BTW, thanks for answering!)

#102181 - dXtr - Mon Sep 11, 2006 4:36 pm

I made something similar when I was developing for the gba on vs.net 2k3 and last year I converted it to compile *for-that-other-machine* (now using vs.net 2k5) ;)
and from my experience with working with .vcproj files is that the only difference I've found is the version numbering in the <VisualStudioProject> tag.
In my case I just used TinyXML and just scanned the vcproj after all File childs in the "Files" tag.

are you doing any type of header/version checking in your converter? if you do that might be why it can't be used on a vs.net 2k3 project.
_________________
go back to coding and stop screaming wolf :)

#102187 - Izhido - Mon Sep 11, 2006 5:14 pm

Hmmm... nope, I'm not checking versions or anything. If the schema is similar to 2k5, well, it should work... as long as you have .NET 2.0 (the framework, not the dev tools) installed in the machine. That's because I used C++/CLI (VC++ 2005) to build the tool.

That's interesting. Should I understand that the community prefers to build their projects using VS 2002/2003 instead of 2005/Express? If so, I should take note of it immediately. :)

#103007 - Izhido - Mon Sep 18, 2006 5:24 pm

Hey! I just included a second release of the tool in the dslinux.org's forum. Here's the address:

http://www.dslinux.org/index.php?showtopic=1825

It now includes support for the following targets:

GBA
NDSARM9O <--- ARM9-Only, replaces the previous NDSARM9 target
NDSARM9 <--- ARM9 section for combined NDS projects
NDSARM7 <--- ARM7 section for combined NDS projects
NDS <--- For merging of ARM9/7 targets into a single file
GCN <--- Gamecube (.dol file generation)
PSP

The file also include "templates", copied from the "/examples/" folder (and one from "/devkitPSP/psp/sdk/examples/controller/basic_controller") showing how to use the tool.

All projects compile successfully; the GBA, and all NDS were successfully tested. As for the others, well, I do not own a PSP, or a Gamecube (or, at least, not a specially configured GC for homebrew testing). I'm actually counting on you all for the testing of these targets.

I hope this can be useful to you. As always, I'm here to hear your comments. Thanks in advance!

#109759 - Izhido - Tue Nov 21, 2006 12:51 am

Hiya people!

Just wanted to let you know I decided to merge this project within my new project, upCLeaR. I feel that it might do greater good inside there, given the nature and extent of upCLeaR.

BTW, if you wonder what this "upCLeaR" thing is, have a look at:

http://sourceforge.net/projects/upclear

http://heribertod.blogspot.com/

Thanks everybody for your patience, and your comments!

- Izhido

#109806 - OOPMan - Tue Nov 21, 2006 10:06 am

Thanks, didn't notice this until now...

I take it that the vc2mkfil thing works with complete versions of VS2005?
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...

#109828 - Izhido - Tue Nov 21, 2006 3:07 pm

Yep. That is correct. Not only Visual Studio 2005 opens, compiles, runs & debugs VC++ Express projects/solutions, they also remain unchanged in their structure so they can be reopened with VC++ Express again. Nice, huh?

- Izhido