Line 3:
Line 3:
These directions target a Windows environment.
These directions target a Windows environment.
−
== First steps ==
+
== Procedure ==
1. Grab the latest version of the [http://sourceforge.net/projects/devkitpro/files/ devkitpro automatic updater] and run it. Choose "keep downloaded files" as it frees you from having to redownload should something go bad with the installation / you screw up the toolchain somehow.
1. Grab the latest version of the [http://sourceforge.net/projects/devkitpro/files/ devkitpro automatic updater] and run it. Choose "keep downloaded files" as it frees you from having to redownload should something go bad with the installation / you screw up the toolchain somehow.
Line 44:
Line 44:
<code><pre>https://devkitpro.svn.sourceforge.net/svnroot/devkitpro/trunk/libogc</pre></code>
<code><pre>https://devkitpro.svn.sourceforge.net/svnroot/devkitpro/trunk/libogc</pre></code>
−
To keep things simple, specify c:\libogc as the checkout directory. Like before, don't use a path with spaces in it. Keep '''checkout depth''' as '''fully recursive''' and leave '''Omit externals''' unchecked. '''HEAD revision''' simply means the latest revision, which is what we want. Whack '''OK''' and take a break while the sources are downloaded.
+
To keep things simple, specify c:\libogc as the checkout directory. Like before, don't use a path with spaces in it. Keep '''checkout depth''' as '''fully recursive''' and leave '''Omit externals''' unchecked. '''HEAD revision''' simply means the latest revision, which is what we want. Whack '''OK''' and take a break while the sources are downloaded.
−
5. Once the sources are downloaded, let's try and compile libogc. Close the status window and open a command prompt. Browse to the libogc folder and use this arcane command to make the new libraries:
+
5. Once the sources are downloaded, let's try and compile libogc. Close the TortoiseSVN status window and open a command prompt. Browse to the libogc folder and use this arcane command to make the new libraries:
<code><pre>make</pre></code>
<code><pre>make</pre></code>
Line 59:
Line 59:
Go ahead and open the template project from step 3 again. Press alt-2 to '''make clean''', which deletes all of the object files and compiled executables, and press alt-1 to '''make''' again, with the new libraries this time. Again, hopefully everything goes well.
Go ahead and open the template project from step 3 again. Press alt-2 to '''make clean''', which deletes all of the object files and compiled executables, and press alt-1 to '''make''' again, with the new libraries this time. Again, hopefully everything goes well.
+
+
6. Go and grab the [http://code.google.com/p/sdl-wii/downloads/list SDL Dependencies] archive, and extract the files into libogc (i.e. c:\devkitpro\libogc\). These files are needed for the next step, which is:
+
+
7. Go back to Windows Explorer and choose '''SVN checkout...''' again. The repository URL for SDL-Wii is:
+
+
<code><pre>http://sdl-wii.googlecode.com/svn/trunk/</pre></code>
+
+
I suggest c:\sdl_wii as the checkout directory.
+
+
Once the sources are downloaded, browse to the folder via command prompt and use '''make''' to build the SDL libraries, then '''make install''' to copy the libs to the devkitpro hierarchy.
+
+
WARNING: SDL_mixer has to be made separately (as of 7-26-09) - before you close the command window, browse into the SDL_mixer folder (i.e. c:\sdl_wii\SDL_mixer) and do '''make''' / '''make install''' again.
+
+
8. Back to the Programmer's Notepad and the template project. Let's make two simple modifications to make sure SDL can be linked properly:
+
+
First, double-click on template.c under the source folder, and add this below the last #include:
+
+
<code><pre>#include <SDL/sdl.h></pre></code>
+
+
Now, double-click on makefile and change the LIBS:= line as follows:
+
+
<code><pre>LIBS := -lSDL -lwiiuse -lbte -logc -lm -lwiikeyboard</pre></code>
+
+
Whack '''File->Save All''', then alt-2 ('''make clean''') and alt-1 ('''make'''). Hopefully, everything should work well.
+
+
9. You may now proceed to the [[SDL Wii/tutorial|SDL Wii tutorial]] page and play with the examples. Of course, you don't need to do any of the installation steps (you've done them already!) For maximum enjoyment, I recommend the following:
+
+
* Make a project folder for the tutorials (i.e. c:\projects\sdl_tutorial_1) and make a '''source''' folder under the project root (i.e. c:\projects\sdl_tutorial_1\source)
+
* Use the template makefile (copy it to the project root folder you just made)
+
* Grab the source code and save it in the '''source''' folder you made
+
* Modify the makefile LIBS line as recommended by the tutorial.
+
+
== Updating the SVN working sets ==
+
+
If you use Windows Explorer to browse to the folders you created with TortoiseSVN (i.e. libogc and svn_wii) you will see that they have extra icons (green checkmarks). Right-click on one of these folders, and you will see (among other options) '''SVN Update''' - this will go and grab newer versions of any files for you automatically. Sweet! Once you've updated (assuming that new files were downloaded), browse to the folders with command prompt and use '''make clean''', '''make''' and '''make install''' to update the toolchain with the newer libraries.
+
+
==More help==
+
Google is your friend. Also, you can use the talk pages on this site.
+
+
[[User:Madmanguruman|Madmanguruman]] 02:28, 28 July 2009 (UTC)