Home » SIRTECH CLASSICS » Jagged Alliance: Unfinished Business » Vanilla Modding » Autotool conversion project.
Autotool conversion project.[message #102310] Thu, 15 September 2005 10:15 Go to next message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
This is for those interested in my converting the Visual C build into something that will build using autotools instead of the solitary Makefile that exists in ja2/Build.

Why do such a conversion? Well, here's a small list of reasons that might not make much sense (or might make a lot of sense) depending on your point of view.

1. The autotool build chain has a lot of support on many platforms, and builds can be peformed on platforms that lack autotools (provided that the configure file was pre-generated).

2. The gcc compiler work is a great way to build the product, but it seems odd to couple it to a single static Makefile that must be generated from the MS VC6 project files.

3. The cygwin environment is much more easily available than VC6, and this lowers the barrier of entry for new development.

4. Autotools provides for a lot of --enable-feature flags, so things like turning on / off the editor (or changing languages) can theoretically be handled much easier than the "edit the right *.h file" method.

5. Automated building is slightly easier because of #4.

(yadda, yadda, yadda)...

That said, it will be a slow process because I am determined to fix the non PRECOMPILEDHEADERS branch of the build. This stuff obviously hasn't compiled in a while, since many #includes are missing.

While I'm at it, I'll also clean up some easy to do stuff like #ifndef #define #endif guard statements around the header files, and no blank line at the end of a file type warnings.

This is my fourth attempt to port JA2's build system to autotools, so I believe it will be successful.

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102311] Thu, 15 September 2005 10:37 Go to previous messageGo to next message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
Sorry if the post was a bit over the top. But I am not trying to accomplish this alone.

lynxnyl has provide me with some useful scripts which will speed up the process greatly, and has provided a useful sounding board for half-formed ideas.

I'd also like to get cvs check in privledges on the ja2-gcc cvs branch at 207.192.154.134. Actually I would like assistence in setting up a development fork so I can roll my changes back into that tree once finished.

Also, I would love to get more input from those who have worked on the code in the past, as I count many different repositories and don't really know which one is considered the most "current".

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102312] Thu, 15 September 2005 11:37 Go to previous messageGo to next message
Kaiden is currently offline Kaiden

 
Messages:499
Registered:September 2003
Edwin, they don't answer here much... In fact, the people who were organizing the CVS don't seem to answer at all. Last I heard from anyone in any kind of position to grant access to CVS was like in April of 04. If you look around, in this forum, you'll see that none of them have posted in many "public" forums for quite some time. I did see a post from Bearpit that was about a month old, and he MIGHT be able to get you into CVS. Not 100% sure though.

Report message to a moderator

Master Sergeant

Re: Autotool conversion project.[message #102313] Thu, 15 September 2005 13:17 Go to previous messageGo to next message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
Well, if they don't answer much, then odds are those branches are not really active. That's a shame since I'd hate to commit to a tree that might disappear due to neglect.

On the other hand, I guess I won't have to worry too much about merging with the tree Smile

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102314] Thu, 15 September 2005 18:48 Go to previous messageGo to next message
Snap is currently offline Snap

 
Messages:285
Registered:September 2000
Location: USA (by way of the Old Wo...
Edwin, why not take up from the C++ conversion that Digicrab made, instead of the C original? He put a lot of work into that, and probably fixed some of the issues that you are strugling with as well.

Report message to a moderator

Master Sergeant
Re: Autotool conversion project.[message #102315] Thu, 15 September 2005 19:40 Go to previous messageGo to next message
lynxlynxlynx is currently offline lynxlynxlynx

 
Messages:113
Registered:September 2005
Location: Slovenija
That way he'd neglect everything the ja2-gcc team did, since they didn't include digicrab's source already - in my checkout, there are only 3 cpp files in the ja2-gcc branch and 336 of them in ja2-source.

I do think it's a good idea though, diffs can always be made and changelogs examined. It's a lot of manual labour though, applying patches can't be sa[fn]ely automated.

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102316] Fri, 16 September 2005 00:59 Go to previous messageGo to next message
Kaiden is currently offline Kaiden

 
Messages:499
Registered:September 2003
Lynx, yes very time consuming, but it's always a VERY good way to familiarize yourself with the source.

I've spent alot of time diffing the UB 1.0 vs Mugsy's 1.13 code files and I've learned alot about the code and how things are done.

Report message to a moderator

Master Sergeant

Re: Autotool conversion project.[message #102317] Fri, 16 September 2005 01:15 Go to previous messageGo to next message
lynxlynxlynx is currently offline lynxlynxlynx

 
Messages:113
Registered:September 2005
Location: Slovenija
Well, once we get it to build with autotools, getting the code compliantly up-to-date will be the next priority.

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102318] Sun, 18 September 2005 10:17 Go to previous messageGo to next message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
Snap, Kaiden,

You both make some excellent points, and I'm sure that there is going to be one giant merge-fest.

I started on the gcc port simply because gcc is the compiler that I have available, and I intended to do all of my work within a cygwin environment. The thinking is that such an evnironment is rather "low cost of entry" and we don't need any extra barriers to future contributers. The "low cost of entry" is entirely relative, but it is not a trivial to get a legal version of VC6 these days.

Thank you for implying that Digicrab's code is basically the most up-to-date, as it means I only have one tree to merge with, instead of looking at many.

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102319] Sun, 18 September 2005 12:45 Go to previous messageGo to next message
Kaiden is currently offline Kaiden

 
Messages:499
Registered:September 2003
Edwin, just an FYI, I'm not 100% sure how much platform specific code is in the JA2 source that we are using, but I wanted to note that I am actually using some windows specific code to handle file read/writes, so when the time comes, let me know and we can figure out how to change that without screwing everything else up Smile

P.S. You mean we have to have a legal version?!?! Just kidding, the code compiles fine in .NET however.

Report message to a moderator

Master Sergeant

Re: Autotool conversion project.[message #102320] Sun, 18 September 2005 16:47 Go to previous messageGo to next message
Snap is currently offline Snap

 
Messages:285
Registered:September 2000
Location: USA (by way of the Old Wo...
AFAIK, code compiled in Cygwin needs Cygwin environment to run... meaning, more stuff to install for potential players. There is a Windows port of gcc: MinGW, but I don't know how up-to-date it is nowadays and what libraries are awailable for it.

Report message to a moderator

Master Sergeant
Re: Autotool conversion project.[message #102321] Sun, 18 September 2005 19:15 Go to previous messageGo to next message
lynxlynxlynx is currently offline lynxlynxlynx

 
Messages:113
Registered:September 2005
Location: Slovenija
cygwin uses mingw, but also the usual tools, therefore for running the binaries you don't need cygwin. There is a way to make only cygwin shell binaries (mingwDVLP), but who'd want that anyway?

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102322] Mon, 19 September 2005 06:15 Go to previous messageGo to next message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
Snap,

You would be right, depending on how you built the executable. It is possible to build standard UNIX like executables which don't have #include and thus require cygwin libraries for most standard operations. It is also possible to extend these with library loading utils that expect *.so libraries. However, 90% of the time you build your exe to use dll libs (if it needs to load a lib) or statically link in the libraries (so there's no need to load at all).

I'm being careful to not include anything new, so I don't expect any suprises. I've build many exes in Cygwin that have ran on Windows without cygwin, and I've even built stuff on cygwin that ran on other OS's (PalmOS) which can't rely on a cygwin environment.

Some people get obsessed with smaller exe size, and then they dynamically load everything they can. Sometimes they link in the wrong loader, and can't run without the *.so libs that cygwin provides. It's a common enough problem, but one that usually requires misguided effort to create.

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102323] Mon, 19 September 2005 06:58 Go to previous messageGo to next message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
Kaiden,

Well there's a lot to do to make JA2 multi-platform. Note that we don't have to do any of these to make JA2 build using cygwin, because cygwin is a UNIX like environment running on top of Windows, so reaching "through" the environment to the Windows layer makes cygwin irrelevant (except for the added tools like gcc).

File reads and writes should be rather easy. I haven't seen your calls, but most read / write operations can be mapped to standard read / write operations rather easily. There is even a small chance that the calls you are making are already POSIX compliant.

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102324] Sat, 24 September 2005 08:14 Go to previous messageGo to next message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
Well, all of Editor (with JA2EDITOR NOT defined) and all of Laptop builds, with warnings.

I've started on Strategic, but I expect things to not move forward at all this week, as I am in Houston, TX and a Hurricane is just a few hundred miles away in the Gulf.

I've been boarding up windows, and preparing for the storm for the last three days. I'm so exhausted, I might even sleep through the storm. Speaking of which, who's the brave modder that will add in a tropical storm mod? Smile

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102325] Sat, 24 September 2005 09:11 Go to previous messageGo to next message
lynxlynxlynx is currently offline lynxlynxlynx

 
Messages:113
Registered:September 2005
Location: Slovenija
Good luck, I hope you have a brick house.

In the meantime I didn't succed in removing those "declared in parameter list" warnings, but I did get a faster environment and did succesfully use my script. Today I was looking for the directx8 sdk, but only the one for 9 is still available. I doubted the virtual machine would pass the authentication, so I needed to spend some more nerves to find a mirror to actually get it. Also did some autotools research/learning. Now to see if the sdk is actually usable... (there are special versions for cygwin/mingw available for 5-8, but I'm not sure if that is necessary)

Why all this directx babble? video.h fails with missing ddraw.h - it needs both the local one from the same dir and the sdk one (took me a while to notice both were in).

Or did you already try it out with the correct sdk?

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102326] Sun, 25 September 2005 03:00 Go to previous messageGo to next message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
Lynxnyl,

Yes, I eventually noticed the ddraw.h header file, and realized that there was no need to install a directX anything. If you still want (for whatever reason) the DirectX8 SDK, I have it and can send it to you.

Rita kept edging a bit East. It was a bit scary when moving East meant moving towards Houston, but eventually it passed Houston all together and hit at the border of Louisiana. We had rain and wind, and expect a little more today, but the worst has passed. We still could lose utilities, but we were already prepared for that.

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102327] Sun, 25 September 2005 04:51 Go to previous messageGo to next message
lynxlynxlynx is currently offline lynxlynxlynx

 
Messages:113
Registered:September 2005
Location: Slovenija
Oh, so it's just a double include? That would seem a rather big mistake to make.

Currently I'm also waiting to get more ram (miraculously found a vendor) and thinking how to make the space filter in the includes even more cryptic (and powerful).

Glad it's all over for you then. Smile

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102328] Sun, 25 September 2005 07:47 Go to previous messageGo to next message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
I don't know about the "double" portion, but it's obvious that they copied in directX (probably version 3.0) header files into the ja2 source code.

This means that we can build without the need for installing a directX SDK. I'm sure others have "discovered" this feature, but it's probably been awhile since anyone thought it newsworthy enough to mention.

Rita is all but passed. Winds are about 10 to 15 miles per hour, and the rain has stopped for now. It won't be nearly as fun to the east of us, as that (different) flood basin is quickly filling up with water. Anyway I've been busy cleaning up outside (and inside) and should even have a little time tonight to work on the Strategic subdirectory of the build.

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102329] Sun, 25 September 2005 07:53 Go to previous messageGo to next message
lynxlynxlynx is currently offline lynxlynxlynx

 
Messages:113
Registered:September 2005
Location: Slovenija
well, if it is a confirmed copy, then it's ok, we just remove the include. The "ddraw.h" one is a few lines lower.

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102330] Tue, 11 October 2005 05:36 Go to previous messageGo to next message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
Snap,

Is Mad Mugsy's C++ code "actively" maintained. That is, can I roll patches back into that tree?

If so, that's reason enough to use Mad Mugsy's C++ branch, even if it's in worse shape than the ja2-gcc branch (which for supporting autotools, it is).

Cheers,
Edwin

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102331] Wed, 12 October 2005 18:44 Go to previous messageGo to next message
Snap is currently offline Snap

 
Messages:285
Registered:September 2000
Location: USA (by way of the Old Wo...
Quote:
Originally posted by Edwin Buck:
Snap,

Is Mad Mugsy's C++ code "actively" maintained. That is, can I roll patches back into that tree?
Edwin, I don't really understand what you are asking. Right now our source control is very primitive: basically, someone (usually Mugsy) maintains the code and integrates whatever contributions others make. Perhaps we will evolve towards something better organized in the future. But you are certainly welcome to join the fun at the 113 forum, or contact Mugsy directly.

Report message to a moderator

Master Sergeant
Re: Autotool conversion project.[message #102332] Sat, 15 October 2005 01:22 Go to previous messageGo to next message
defrog is currently offline defrog

 
Messages:234
Registered:March 2004
Location: Austria
ohh my, I weep for him... merging the original mods to the source base to my C++ build from the original release was enough to teach me that method is unmaintanable with even a smaller codebase like this one.

so I take it all the repositories are dead or near dead?

Report message to a moderator

Sergeant 1st Class
Re: Autotool conversion project.[message #102333] Sat, 15 October 2005 19:37 Go to previous messageGo to next message
Snap is currently offline Snap

 
Messages:285
Registered:September 2000
Location: USA (by way of the Old Wo...
Well, most of the Whitehat project team seems to be gone, including whoever was in charge of the repositories.

Report message to a moderator

Master Sergeant
Re: Autotool conversion project.[message #102334] Mon, 24 October 2005 15:18 Go to previous messageGo to next message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
Build update:

What builds:
Editor (with JA2EDITOR flag turned off)
Laptop
Strategic
Tactical (newly added to build list)

What remains:
TacticalAI
TileEngine
Utils
Build
Strategic_Gaming_Platform
ja2.exe

Despite the longer "to do list" the "finished" list consists of 57% of all object files.

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102335] Mon, 31 October 2005 10:04 Go to previous messageGo to next message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
Add TacticalAI to the done list.

Also, now Editor enables / disables properly (but still doesn't build when enabled).

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102336] Tue, 01 November 2005 14:05 Go to previous messageGo to next message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
Add Utils to the done list.

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102337] Mon, 07 November 2005 14:37 Go to previous messageGo to next message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
Add Standard_Gaming_Platform to the done list.

All that remains:
ja2/Build/TileEngine (has some ASM, will be a pain)
ja2/Build
ja2/Editor (when BUILD_EDITOR is turned on)
ja2.exe (linking)

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102338] Fri, 11 November 2005 15:32 Go to previous messageGo to next message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
ja2/Editor now builds when BUILD_EDITOR is turned on

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102339] Sun, 04 December 2005 01:54 Go to previous messageGo to next message
Manax is currently offline Manax
Messages:4
Registered:November 2005
Location: NY, USA
So, Edwin, do you have your source changes kept somewhere online? And... do you happen to know the status of the linux port, and it's relationship to the work you are doing? I've seen it come up, but not get very far, come up again... but I'd like to try my hand at it. And if you have everything building with djgpp, that is certainly a better starting point for me.

Report message to a moderator

Civilian
Re: Autotool conversion project.[message #102340] Sun, 04 December 2005 02:04 Go to previous messageGo to next message
lynxlynxlynx is currently offline lynxlynxlynx

 
Messages:113
Registered:September 2005
Location: Slovenija
I found we could use opensvn http://opensvn.csie.org/ , but we are both busy and only Edwin has the up-to-date sources, being the driving force and all. :ok:

There is no open linux port, but this conversion is a good step in enabling one. I'm very excited that you want to try to do it, but first it needs to build completely with autotools or you can't even start properly.

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102341] Sun, 04 December 2005 03:54 Go to previous messageGo to next message
Manax is currently offline Manax
Messages:4
Registered:November 2005
Location: NY, USA
Indeed autotools is a good step. From the looks of things, Edwin is getting close (to at least a full compile)... If he can push a version, at least I can start taking a look at current source. I'm sure it will take quite a bit to get the stuff he's successfully built so far working under Linux.

But I guess it's up to you two.

I'm busy too, but I've had a craving for ja for several weeks now... Wink

Report message to a moderator

Civilian
Re: Autotool conversion project.[message #102342] Sun, 04 December 2005 04:30 Go to previous messageGo to next message
lynxlynxlynx is currently offline lynxlynxlynx

 
Messages:113
Registered:September 2005
Location: Slovenija
I'm sure he'll read this thread, I can't contact him via im curently though, had a small oops with the new kde compilation. Wink
You can try mailing him from this board. Wink

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102343] Tue, 06 December 2005 00:02 Go to previous messageGo to next message
defrog is currently offline defrog

 
Messages:234
Registered:March 2004
Location: Austria
to work under linux, it still needs to have the graphics engine rewritten to allow a more abstracted interface so that it can be used with DirectX as well as OpenGL..

also the miles system needs to be replaced... maybe with fmod.org... or something like that which is usable in both platforms

Report message to a moderator

Sergeant 1st Class
Re: Autotool conversion project.[message #102344] Tue, 06 December 2005 09:32 Go to previous messageGo to next message
Manax is currently offline Manax
Messages:4
Registered:November 2005
Location: NY, USA
Indeed. Which is why I didn't need everything to build yet, since it'll take me some time to get pieces compiling too... My first thought is to move the graphics to SDL, but I'm not committing to anything until I actually take a look.

I don't really know how big a project this is... but I do realize it's involved. I do programming for a living, so I'm not coming into this with completely rose-tinted glasses. Wink

BTW, I emailed Edwin on Saturday. Nothing yet.

Report message to a moderator

Civilian
Re: Autotool conversion project.[message #102345] Tue, 06 December 2005 21:45 Go to previous messageGo to next message
lynxlynxlynx is currently offline lynxlynxlynx

 
Messages:113
Registered:September 2005
Location: Slovenija
SDL, that'd be nice. Nice and portable. Smile

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102346] Sat, 10 December 2005 13:59 Go to previous messageGo to next message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
Sorry to have been scarce on the boards. Thanksgiving holidays changed my schedule up and I've not attended the ja2 stuff for a few weeks. Rest assured I'll be checking in a bit more often now.

Basically I have to port the ASM into AT&T syntax (which I've had some success), finish off ja2/Build/TileEngine, ja2/Build, and link the thing. I've been careful, but who knows if it will work.

As far as a port to Linux. It's been wished for many times, and Defrog's right. The sound and graphics subsystems will have to basically be ported (aka re-written) for a Linux port. The window shell interaction is a minor problem, but that's probably the easy part.

Currently the sound code uses the Miles Sound System (MSS) and the graphics code uses some old DirectX (2D) API calls and assembly routines to compost pixels where they should be. File formats likely should be converted to modern portable standards, with an eye for supporting different screen resolutions (as the years pass, and the JA2 pixels seem to get bigger and bigger). Speech sound may have some oddities, as there is a lip-syncing mechanisim I haven't fully investigated.

As far as code sharing goes, I should have set up a source code control system from the start, but I've been lazy. Others have attempted to help in this area, but things tend to fall apart. I send tar-balls to people who want the code, and will gladly accept patches.

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102347] Sun, 11 December 2005 00:20 Go to previous messageGo to next message
Manax is currently offline Manax
Messages:4
Registered:November 2005
Location: NY, USA
I haven't actually used MSS before, but imagine it's pretty straight forward. I've done enough with DirectX, that it shouldn't be a problem, either. Although I know enough asm to manage, that inevitably is a pain... but that's okay, that's kinda what I was expecting. Wink

Regarding source control... I would think what we do should be based on the longer term integration plan with 1.13/.net, right?

Report message to a moderator

Civilian
Re: Autotool conversion project.[message #102348] Sun, 11 December 2005 01:39 Go to previous messageGo to next message
lynxlynxlynx is currently offline lynxlynxlynx

 
Messages:113
Registered:September 2005
Location: Slovenija
Of course we want them integrated at some distant point. Edwin wants to make the code much cleaner and better first though (after a succesful autotool build).
Things like this just cry for a RCS. Wink

Report message to a moderator

Sergeant
Re: Autotool conversion project.[message #102349] Tue, 20 December 2005 21:45 Go to previous message
ebuck is currently offline ebuck

 
Messages:123
Registered:August 2004
Location: Houston, TX
Add Build to the done list.

All that remains:
ja2/Build/TileEngine (has some ASM, will be a pain)
ja2.exe (linking)

It's getting close to an exe on Windows, and now there's new compiler flags to assist in cross platform coding on Linux.

About 30% of the assembly in renderworld.h has been "ported" to the AT&T syntax, and TileEngine only has about 6 *.c files that don't compile.

Report message to a moderator

Sergeant
Previous Topic: Wishlist stuff
Next Topic: Got Wildfire, where is the source?
Goto Forum:
  


Current Time: Fri Jun 12 04:59:10 GMT+3 2026

Total time taken to generate the page: 0.01835 seconds