Source code documentation

Want to discuss changes to the UOX3 source code? Got a code-snippet you'd like to post? Anything related to coding/programming goes here!
Post Reply
lingo
UOX3 Novice
Posts: 55
Joined: Thu Jul 07, 2005 12:26 pm
Location: Taipei, Taiwan
Has thanked: 0
Been thanked: 0

Source code documentation

Post by lingo »

I ran Doxygen on the U0X3 source code and put it on http://www.shengyee.com/uox3/, temporarily. It not much of documentation but it give you a rough ideas how the whole uox3 was put together.

I want to write unit test and documentation of source code, so I can understand it more fully and squash some bugs in the process. I am going to use CxxTest for the unit test. Anybody have other ideas?

Last, I am learning to code in Linux platform, been a Windows programmer for over 15 years. So I have a question? what kinds of builds system is UOX3 going to use? For *nix (Mingw) platform, AutoConf/AutoMake is the portable way to go, but what about Windows? VC project is just too limited. Can I suggest Scons? It can also works for *nix platform too.
Sydius
UOX3 Apprentice
Posts: 171
Joined: Thu Mar 25, 2004 3:22 am
Has thanked: 0
Been thanked: 0

Post by Sydius »

I believe the goal is to make it as compiler-independent as reasonably possible, but I think most all of the developers have/are using VC.

What is a unit test?

Anyway, I think documentation is sorely needed and Doxygen is a very good program for a project like this.
lingo
UOX3 Novice
Posts: 55
Joined: Thu Jul 07, 2005 12:26 pm
Location: Taipei, Taiwan
Has thanked: 0
Been thanked: 0

Post by lingo »

The problem is there are VC 6.0, 7.0, 7.1 and the free VCtoolkit2003, http://msdn.microsoft.com/visualc/vctoolkit2003/. The project file format is all different between 6.0, 7.0, and 7.1. The free one can't use the project file since it not an IDE environment. And I am using the free one.

I have a few links for explaining unit test. http://www.extremeprogramming.org/rules/testfirst.html, http://cppunit.sourceforge.net/doc/last ... kbook.html, http://en.wikipedia.org/wiki/Unit_testing. Unit test helps out in refactoring and integration, it helps find bugs quick.

But the cpp unit testing suite I like is http://cxxtest.sourceforge.net/. It easier to learn and use.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

No idea what unit test is - though I get a rough idea from the links you posted - but it sounds good :P

Personally I only own MSVC 6 - which is probably what UOX3 has mainly been compiled on for ages heh. I think the project file works for both 6.0, 7.0 and 7.1, since giwo uses one of the latter and I use the former. I didn't even know there was a free one. O_o
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Xuri wrote:I didn't even know there was a free one. O_o
It's cli only, so it can't read any project files. It also (at least when I last tried it) comes with a very limited set of include and header files, so it can't compile most of the more advanced apps. It's only usefull for your first C steps, doing little Hello World like apps.
lingo
UOX3 Novice
Posts: 55
Joined: Thu Jul 07, 2005 12:26 pm
Location: Taipei, Taiwan
Has thanked: 0
Been thanked: 0

Post by lingo »

Sorry I did not explain it clearly enough. you have to download platform SDK if you want windows header, and if you want .net compatibility you can download .net SDK. http://wiki.wxwidgets.org/wiki.pl?Insta ... Free_Tools, explain how to do it. You can get free nmake, masm. You can even download a free graphical debugger, but no IDE environment to round it out. I use http://www.thefreecountry.com/compilers/cpp.shtml to check up on new free c/c++ compiler.

The VC 6.0 projects works for the later one, but not vice versa. So if you want to update the projects you have to go back to VC 6.0 to do it, I think. But I think nmake is ok for uox3 projects, so I will stick with it, instead of creating new complication.
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

VC 6 is actually the preferred platform for UOX3, currently.

I have switched to using VC7 almost exclusively, however for compatability reasons, we compile both the JS32 DLL and the executable for release ONLY in VC6.0. To be more specific, we do this to circumvent the requirement for a specific DLL required by all VC7 apps, which many users do not have.

However if one preferrs a free compiler, we have support for MingW (in Windows) and there is some support for linux (typically requiring one to know how to setup an autoconf script). I have the makefiles for the MingW here on my system, but due to the lack of popular demand, I've never bothered to perfect and distribute them.
Scott
lingo
UOX3 Novice
Posts: 55
Joined: Thu Jul 07, 2005 12:26 pm
Location: Taipei, Taiwan
Has thanked: 0
Been thanked: 0

Post by lingo »

The autoconf/automake files I sent you will work for MingW's MSYS environment too, except for the javascript linking part, I think.

I think, I can use Nullsoft Installer to solve the redistributable dll problems. VC7 is just so much nicer, compiler wise.
Maarc
Developer
Posts: 576
Joined: Sat Mar 27, 2004 6:22 am
Location: Fleet, UK
Has thanked: 0
Been thanked: 0
Contact:

Post by Maarc »

We did have an NSIS install script, but I don't think it's been updated in a long while.

http://darkangelab.freeservers.com/uox/installer.html

It's got a link to a RAR file, which contains the NSIS install source file (it'll need updating, Sept 2003 was the last it was touched) + a couple of batch files that I used to use for prepping, does compile and generates the right tree structure (though again, that might have changed).
lingo
UOX3 Novice
Posts: 55
Joined: Thu Jul 07, 2005 12:26 pm
Location: Taipei, Taiwan
Has thanked: 0
Been thanked: 0

Post by lingo »

That great, you seems to have a lot tricks on your bag. I'll play it on the weekend.

But on second though :oops: , why don't we just include msvc7*.dll with the program.zip. We don't have to installed it. Being on the same directory as the same program, it will be found by the main program. right? Well, that how I handle *.dll before. If that the case, VC7 should be fine then.
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

If you drop MSVC6 support I'll have to find another emu to play around with. I spend quite some Money for MSVC6 and won't switch over to anything else, especially if it means I have to bloat Windows with just another dll.
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

It's really no work to maintain both MSVC6 and MSVC7 support. As I stated, MSVC 6 is the PRIMARY compiler for UOX3, and thus proper compilation in that environment is of the foremost importance. Any changes to the project file (and there are typically very few anyway) can simply be done there and then the project upgraded to MSVC 7 for those who choose to use it (including myself).

And yes, the NSIS installer worked quite nicely. I imagine now that we have a more solid base of files that will remain semi-permanent, we could begin making use of it again.


Good to see you around, Maarc ;)
Scott
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

MSVC 6.0 and MSVC 7.0 are basically two different programs altogether, since you can't upgrade freely from 6.0 to 7.0. If it were free upgrade for 6.0 owners, this wouldn't be a problem. :/

I'm only have 6.0 as well - bought and paid for even.
-= Ho Eyo He Hum =-
Sydius
UOX3 Apprentice
Posts: 171
Joined: Thu Mar 25, 2004 3:22 am
Has thanked: 0
Been thanked: 0

Post by Sydius »

I, too, only have VC 6 – got it from college, though.
Post Reply