FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New Build System

 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Wed May 04, 2005 12:00 am    Post subject: New Build System Reply with quote

I just committed the new build scripts I knocked up for Windows. They've been sitting on my harddrive for a few days now waiting for me to upload them. So now they are in. However, I haven't yet removed the Makefiles from the project. I want to ensure that the batch files work as well for others as they do on my system. So if you are a Windows user, please give the batch files a go and let me know how they work out. Here's what you need to do to use them:

1) Grab the latest version of Derek Parnell's Build for Windows.

2) Open up buildconfig.bat in the Derelict trunk. You can read the comments to see how to config everything, but I'll summarize here:

i) if you did not put Build on your path, edit the following line so that it contains the full path to your build executable:
set BUILD_PATH=build.exe (ex: set BUILD_PATH=C:\build\build.exe)

ii) by default, the scripts will build a debug version of each library. You can change the default behavior by changing the following line:
set BRF=build_dbg.brf
to this:
set BRF=build_release.brf
You can also pass the command line args dbg or release to the buildme script to force one mode or the other.

iii) if you wish to specify any command line args to build or dmd in both debug and release modes, then add them to the following line:
set COMMON_ARGS=-cleanup -IDerelictUtil -allobj -full @?BRF?
You may also remove the -cleanup arg if you really want to, but I removing any of the rest will break the build.
Note that debug mode command line args are listed in build_dbg.brf while release mode command line args are listed in build_release.brf.

3) Open up a command prompt (start->run->cmd.exe on Win2k/WinXP, start->run->command.com on Win9X)

4) cd to the toplevel Derelict directory and execute the following command line:
buildme [dbg | release]
OR
cd to the directory of a specific Derelict package and execute the same command line:
buildme [dbg | release]

Very simple. If you have Build on your PATH, and you are happy with the default configuration (which you should be), then you can skip straight to step 3.

Note that the reason I have the build response files (build_dbg.brf and build_release.brf) is that I wanted to share the same command line args across windows and linux without needing to maintain separate enviroment variables in script. However, clayasaurus mentioned in another post that build response files do not currently work on Linux, so I will likely ditch them and just use environment variables instead.

Please post any comments/suggestions/issues on the new build system in this thread. If I hear nothing bad in the next few days, I'll move on to the next task (finishing the documentation).

Oh, and I almost forgot. I no longer have my newbie Linux programming guide to study for shell scripting (I can't believe I lost that friggin book, it was a good one), so I will need to do some research to learn my way around bsh. If anyone else is interested in tackling the Linux build scripts before I get to it, be my guest.

One more thing, if you wish to delete all of the libraries from the \lib subdir for whatever reason, just run cleanlib.bat. I am also considering an install.bat which will allow you to copy all source and library files to different directories. Perhaps you have a \d_lib directory for all of your 3rd party libraries, and a \d_inc directory for all of your third party source, and both of these are configured in dmd's sc.ini file. It's likely convenient to put all derelict packages under a common derelict directory tree. That's what I do locally, myself.


Last edited by aldacron on Mon Jul 11, 2005 9:01 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Wed May 04, 2005 12:38 am    Post subject: Re: New Build System Reply with quote

aldacron wrote:
Note that the reason I have the build response files (build_dbg.brf and build_release.brf) is that I wanted to share the same command line args across windows and linux without needing to maintain separate enviroment variables in script. However, clayasaurus mentioned in another post that build response files do not currently work on Linux, so I will likely ditch them and just use environment variables instead.

Are you really sure that Build's response files (*.brf) don't work under Linux? I haven't heard that they don't nor do I see why they wouldn't. I think that DMD response files don't work for linux, but Build's should.

If you have any further info about this I'd like to know so I can fix it.
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Wed May 04, 2005 4:24 am    Post subject: Re: New Build System Reply with quote

Derek Parnell wrote:

Are you really sure that Build's response files (*.brf) don't work under Linux? I haven't heard that they don't nor do I see why they wouldn't. I think that DMD response files don't work for linux, but Build's should.

If you have any further info about this I'd like to know so I can fix it.


No, I haven't tried it myself yet. Once I get to the Linux scripting, I'll check it out. But I was referencing this thread:

clayasaurus wrote:

-Rn says not to use builds response file (it doesn't work on linux),


Perhaps clay has more information. If it doesn't work for me, I'll post something in the build forum.
Back to top
View user's profile Send private message Send e-mail
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Wed May 04, 2005 4:56 am    Post subject: Re: New Build System Reply with quote

aldacron wrote:
But I was referencing this thread:

clayasaurus wrote:

-Rn says not to use builds response file (it doesn't work on linux),


Oh! My documentation could be a little better then, as it is ambiguous. The -R switch has nothing whatsoever to do with Build's own response files. It deals with using (or not using) response files for the compiler.
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Wed May 04, 2005 9:25 am    Post subject: Reply with quote

Or my ignorance and/or poor choice of wording. I didn't know there was a difference between builds response file and dmd's response file, having used neither myself. I just remembered from way back that build would complain if I didn't use -Rn.

BTW: I think the following link may be a good reference for the linux shell.

http://www.freeos.com/guides/lsst/
Back to top
View user's profile Send private message AIM Address
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Thu May 05, 2005 1:15 am    Post subject: Reply with quote

Cool, then I don't have to change anything and Derek doesn't have to fix any bugs Smile And thanks for the link, Clay.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group