Game Development Community

Project Generator - add additional project dependencu

by elvince · in Torque 3D Professional · 06/28/2011 (2:36 pm) · 5 replies

Hi all,

I tried to play with the project Generator to automatically create the appropriate solution file.

I'm on Windows and I'm a little bit lost to what files I should change.
As of today, I set a new .inc with all my command like
addLibSrcDir, addLibIncludePath, addProjectDependency, addProjectLibInput,addSolutionProjectRef ...

I set this include in the project.conf.
I then launch the GenerateProject.bat

But at the end I have this error:
Fatal error: Solution::generate() - project ref not found: libcurl
in C:\Torque\Torque 3D Pro 1.1\Tools\projectGenerator\classes\Solution.php on line 78

It seems that I'm missing a step, but I can't find what :(
It seems that my project is not part of the project list so I don't have line like
- Processing project 'lmng'...
o Writing project file projects/lmng.vcproj
o Writing project file projects/lmng.vcproj
o Writing project file projects/lmng.vcxproj
for my projects.

If someone can help me I will appreciate.

Thanks,

#1
08/22/2011 (11:32 am)
Did you create a yourlib.conf file in the Tools/projectGenerator/libs folder?
#2
08/22/2011 (11:37 am)
I had made ​​long ago, for your resource, but i keep forgetting to share. :P

The curlib.inc:
<?php
beginModule( 'curlib' );
	// Sources
	addEngineSrcDir('simCurl');

	// Defines
	addProjectDefine('TORQUE_CURL');
	addProjectDefine('HAVE_ZLIB_H');
	addProjectDefine('HAVE_ZLIB');
	addProjectDefine('HAVE_LIBZ');
	addProjectDefine('__INCLUDE_CURL__');

	// Includes
	addIncludePath( getAppLibSrcDir() . "curllib/include" );

	// Libs
	addProjectLibDir( getAppLibSrcDir() . "curllib/lib/$(ConfigurationName)" );
	addProjectLibDir( getAppLibSrcDir() . "curllib/" );
	//addProjectLibInput( "wldap32.lib");
	//addProjectLibInput( "ws2_32.lib"):
	addProjectLibInput( "curllib.lib" );
	addProjectLibInput( "libeay32.lib" );
	addProjectLibInput( "openldap.lib" );
	addProjectLibInput( "ssleay32.lib" );
endModule();
?>

The curlib.lib:
<?php

beginLibConfig( 'curllib', '{719523DB-7C6B-416B-B68D-B25794772390}' );

includeModule( 'curllib' );

endLibConfig();

?>

For the project.conf:
// cURL References
	includeModule( 'curllib' );
#3
09/16/2011 (3:11 am)
Hi,

Sorry I was a little bit away from T3D.

Yes I have a Libcurl.conf, but maybe it's the content that's wrong. Should I put the full list of all the file, all the include, prepropcessor... so the project file is rebuilt from scratch?
For the moment, I thought that I can use a existing project file and not reconfigure the file project file in the conf.

Thanks,
#4
09/26/2011 (10:53 pm)
Any thoughts?
Thanks
#5
09/27/2011 (1:28 pm)
@elvince, you'll want to look at one of the other .conf files for one of the libraries that have source files in their respective folder. From what I recall the .conf is what is going to list all your source files and junk.

You'll want to list all the folders for the source code for libcurl in here, by doing

addLibSrcDir( 'path/to/source' );

Once you have all the entries for your source code from libcurl, you'll want to set up any include paths needed like this:

addLibIncludePath( 'path/to/includes' );

You'll also want to add any defines for the library's project, like so:

addProjectDefine( 'ANEXAMPLEDEFINE' );

In addition, the conf will need a unique GUID generated (in Visual Studio, go to Create GUID and make a new one) on this line:

beginLibConfig( 'libcurl', '{YOUR_NEW_GUID_GOES_HERE}' );

The add* lines need to be between the beginLibConfig and endLibConfig calls. Hope this helps. I don't have libcurl handy or anything so I can't tell you what all exactly you'll need, but this should get you started pretty easily.