Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Tue Mar 19, 2024 5:13 am

All times are UTC




Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Fri Nov 16, 2007 8:11 am 
Offline

Joined: Wed Nov 07, 2007 7:31 pm
Posts: 26
Location: Amsterdam
Finally!!!

I got a 100% vs c++ express "sdk" working!!!

get it from http://www.scratchydreams.com/projects/raydium-win32.7z

it includes a sample VS project file and 1 sample game (a copy from test6.c)

inside you'll find a directory called SDK which has 3 sub directories:

bin - all required DLLs to run the engine + the raydium DLL
include - all hammered .h files for VStudio i'll keep working on these in order to get then to work with the base code without special versions
lib - the VS specific linking lib

if you compile the template project you'll see a 60kb exe that is your final game. to run it copy it to some place and copy also all the dlls from the bin dir plus the php stuff from the original source code. if you run it you'll get the test6 on your screen and this time without using mingw or dev-cpp.

WAIT there are some pre-requirements:

Since i'm the huge post guy here they are :)

visual studio express (this is kind of obvious!)

Download and install from:
http://msdn.microsoft.com/vstudio/express/visualc/

and then you'll need the microsoft platform SDK otherwise you VS will only compile .NET stuff...

Microsoft Platform SDK
Download: http://www.microsoft.com/downloads/deta ... c0c0716adb
Install to: C:\Program Files\Microsoft Platform SDK

The Platform SDK will say it is the Platform SDK for windows 2003... don't worry it is the same for all windows (XP, 2003 and Vista).


Now we need to configure the Visual Studio Express. Update the Visual C++ directories in the Projects and Solutions section in the Options dialog box. Add the paths to the appropriate subsection:

- Executable files: C:\Program Files\Microsoft Platform SDK\Bin
- Include files: C:\Program Files\Microsoft Platform SDK\Include
- Library files: C:\Program Files\Microsoft Platform SDK\Lib

(i put these as the always as 2nd entry, so if my project has a file with the same name it will be prefered)

Once this is done close VS and update the C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults\corewin_express.vsprops file. Change where it reads:

AdditionalDependencies="kernel32.lib"
to
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"

At this moment you're able to build Win32 apps on your VS but your wizards will not show you an option to create Win32 apps, to enable it you need to edit the file AppSettings.htm file located in the folder C:\Program Files\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\Application\html\1033\.

In a text editor change from true to false the lines 437 - 444 inside the if statement:

if (window.external.FindSymbol("IS_EXPRESS_SKU"))
{
SUPPORT_ATL.disabled = false;
support_atl_title.disabled = false;
SUPPORT_MFC.disabled = false;
support_mfc_title.disabled = false;
WIN_APP.disabled = false;
WIN_APP_LABEL.disabled = false;
DLL_APP.disabled = false;
DLL_APP_LABEL.disabled = false;
}

Save and close the file and open Visual C++ Express.


When you compile the example you'll notice that it is a Win32 Console Application therefore a ugly console will popup with the debug from your app. This is pretty cool for debugging but once you're done with it you can turn it off. Turning it off is a PITA. You have the complicated way:

Change you int main(int argc, char** args) to int WinMain(loads off stuff but no argc, args). Then you need to implement some nasty functions to generate argc and args and MS has some but they mess up when you have / and ".

The old-skool way :) build as a console app then use editbin which is part of VS. do:

editbin /SUBSYSTEM:WINDOWS your.exe

this will remove the allocated console and all the debug info. And now you have a full windows app without the nasty console (and no debug either).[/b]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 16, 2007 6:48 pm 
Offline

Joined: Sun Mar 16, 2003 10:27 am
Posts: 404
Thank you for your work. I'm going to test it as soon as possible. :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 17, 2007 4:20 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
Great ! Nice job. Looking at it right now.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 17, 2007 6:33 pm 
Offline

Joined: Wed Nov 07, 2007 7:31 pm
Posts: 26
Location: Amsterdam
i'm finishing a better "SDK", where you can build from sources or get the binary dll + lib + *.h that compiles out from the trunk.

And the demo compiles with less than 20 warnings :)

Right now you can get it without PHP support from http://www.scratchydreams.com/projects/ ... K-nophp.7z (it's only 800kb)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 28, 2007 1:08 pm 
Offline

Joined: Wed Nov 07, 2007 7:31 pm
Posts: 26
Location: Amsterdam
Guys i'm "ported" the mania drive to the win32 dll sdk. Before it compiled, but now it compiles and even runs :)

I had to fix my libjpeg build.

The mania drive sources + visual studio express projects are at:
http://www.scratchydreams.com/projects/mania.7z (38Kb)

And the SDK can be found here:
http://www.scratchydreams.com/projects/ ... in32SDK.7z (2,717Mb)

The only thing that is still not working is that mania_server is compiled with network_only and i get some errors there, but if you disable that and compile with the full dll it builds, but i haven't tested it thoroughly.

The SDK is build against trunk from 26/Nov/2007.

if you want to use the SDK to try out on your projects, just install Visual Studio Express + Platform SDK, download the 2 files mania.7z and the sdk.7z. pick the project file Mania 1.2.vcproj as a template for your app and copy it to the root of yout project, then at the same path as your VC project unzip the sdk into a folder called SDK (inside there should be 3 folders bin/include/lib) you should have a project that builds into 2 configs: DEBUG and RELEASE.

To distribute your app, just copy the exe file and all the DLLs from SDK/bin and your're done.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 02, 2007 6:42 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
Ok, nice !

Quote:
The SDK is build against trunk from 26/Nov/2007.

Currently, have you changed anything in the "official" source code ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 04, 2007 7:46 am 
Offline

Joined: Wed Nov 07, 2007 7:31 pm
Posts: 26
Location: Amsterdam
Yes i did, but i still need some work. I've been trying to compile all the examples on Visual Studio and although they compile i get some nasty runtime crashes because of the FILE struct. I'm aware this is almost 100% a VS problem because it seems that VS by default builds unicode stuff and mingw doesn't. I'm working to fix this and once all the demos compile and run (except for artoolkit and wiimote) i'll submit a patch.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 04, 2007 7:20 pm 
Offline

Joined: Wed Nov 07, 2007 7:31 pm
Posts: 26
Location: Amsterdam
The latest code compiles and runs 100% under mingw, under visual studio it compiles also 100% ok, however there are runtime issues. The bad thing is that to fix it i need to build the php dll and i tried and it is a mess... it is not easy.

All the src code i used is here: http://www.scratchydreams.com/projects/ ... latest.zip

if you build without php support it works 100% under Visual Studio, with php it doesn't... sorry guys :(

If you like feel free to merge my changes.


Top
 Profile  
 
 Post subject: win32 sdk
PostPosted: Tue Dec 04, 2007 8:16 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,,

Since a long time i have to work on win32 sdk.

But your work, supersede even my futur work :(

I really don't have time t'ill now, but i follow this thread with interest.

Next week i'll begin to work on this new windows sdk, and i think it will be great to merge all of your work.

wait few days and thank you for all the huge post on this sdk.

Have a nice day
Ouille


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 09, 2007 9:47 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
I'm absolutely not trying to make the pressure up, but the windows SDK subject becomes quiet important for Raydium. There's currently no official way to use recent Raydium releases under windows, and we can't release any "stable" Raydium version until a proper WinSDK is ready ... 0.680 is two years old now :)

Short story : No hurry, we must take the needed time to create a real, simple but complete SDK. But we must provide it.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 09, 2007 9:52 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

I understand.

I have urgent work to finish with raydium ;o)

I'll make a good Windows Sdk before Holidays !


Is that ok ?

P.S.: Ouille_sdk7 work well on windows with last svn version, so if someone is blocked he can try this.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 10, 2007 7:55 am 
Offline

Joined: Wed Nov 07, 2007 7:31 pm
Posts: 26
Location: Amsterdam
well if you want it done quick, the easiest way (using what i've been woking on) is:

install mingw using their installer, pick the stable compiler it will install gcc 3.4.5 if i'm not mistaken. then download the dll and header files and you're ready to link your games against it.

downside, no IDE, but a codeblocks project can be added.


Top
 Profile  
 
 Post subject: win32 sdk first step.
PostPosted: Thu Dec 13, 2007 9:56 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

I manage to get paulo source code compiled, modifying code blocks projets. :D

Need to add -DRAYDIUM_BUILD_SHARED_LIBRARY to get the dll.

All the apps compile, but none run. :(

Log windows is corrupted, and quite all of the application fails, some (ragdoll) show graphic windows but can't go further. :cry:

No error and even warnings during build process, for both dll and application.

Mingw distribution is the same that compile dll and apps in the "old" way.

So i'm in trouble :(

Second problem, Vs "clean up" code, so all the file need to be update to the svn. It's a long work to validate each of them. I began, ... just began.

I note that:
Headers include change to raydium.h, it won't be a problem i think.

atexit fonction no more conditionnal with raydll.
atexit.h: no more proto for raydium_log why ?

Paulo: i'll make new test soon, did you enconter those kind of problem.

Please can you give me some informations:
Can you resume source code modification ?
Is there new specific build steps ?
Can you detail flags for dll ... if there are big changes ?

Hope i haven't stupidly miss something :?

Have a nice day
Ouille


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 14, 2007 12:44 pm 
Offline

Joined: Wed Nov 07, 2007 7:31 pm
Posts: 26
Location: Amsterdam
If i build a static lib it all works fine, if i build a DLL it will only work fine if i build the apps from VS from mingw all the global vars are not valid. I tryed to look on mingw website but i haven't found any anwser


Top
 Profile  
 
 Post subject: Windows Sdk
PostPosted: Mon Dec 17, 2007 12:11 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Paulo, I manage to get your sdk working using mingw.

A) the log windows is allways corrupted, the inline console (touch '²') doesn't show anything. But appliations works

Paulo Did you touch something about raydium_log ?

B) i prefer raydium.h include than the old way.

C) Compile flags RAYDIUM_BUILD_SHARED_LIBRARY and STATIC
seem's to work.

Some questions and i think we need to take some decision:

D) During your build process detailled in your post lot's of lib are static.
This is not the actual buil process of raydium.

    1) Why don't you compile all of them as static ?
    2) What are pro and cons between static and dynamic linking ?
    3) What do we choose for the "official" windows sdk ?

I think your sdk with few dll is better than old one and lot's of dll. Xfennec what do you think about that ?

E) You'r sdk (Paulo) doesn't include static libs, so it's not possible to recomplie raydium dll. But it's often needed, so i think it will be a good thing to find them in the sdk.

F) I propose this structure:

    /bin (or runtime) librairies, dll , executable, data files ...
    /raydium normal raydium source file from svn trunk
    /lib static libs needed for raydium lib build
    /appli (or whatever name ) test directory
    with Vs and Code Blocks sample projects
    /scripts Some scripts to copy blender export/import for example
    and copy php scripts to bn/runtime directory


G) Remarqs welcome.

Have a nice day
Ouille.

P.S.: I'm not an expert (far away) of build process, so please be kind.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group