Expanded Windows Compile Guide

Home Forums Development Expanded Windows Compile Guide

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 216 total)
  • Author
    Posts
  • #22831
    cadbusca
    Participant

    WARNING NOTE: Effective with WIIMC 1.1.9 SVN 992, this guide is now obsolete.
    Users wishing to compile WIIMC should follow the official instructions at http://www.wiimc.org/compiling-instructions/ which require the use of Devkitpro R24 and other libraries. Additionally users will find it necessary to compile and install the latest libogc, utilize the previous 1.4 version of libpng, and obtain the latest Freetype source and compile and install it using step 6 of the compile instructions, in order to successfully compile.

    ===============================================================================================
    For those of you using Windows who wish to compile WIIMC after making personal changes to the code or to just test the latest level of code prior to a new release, here is an updated and expanded guide to the instructions posted on the WIIMC site at http://www.wiimc.org/compiling-instructions/ and in this Development Forum.

    If you have zero knowledge of SVN’s, linux, configuring, make and make install then this guide is for you, because it attempts to cover all the things that knowledgeable developers already know and have left out.

    ================================================================================================
    WIIMC Expanded Windows Compile Guide
    ================================================================================================

    Step 1.


    The first step is to install a program caled “TortoiseSVN” which will get the current code and subsequent revisions for WIIMC from the code repository at Google.
    Download it from “http://tortoisesvn.net/downloads” and install both the 32 and 64 bit versions if you are on a 64 bit system.

    After installing, use Explorer to open your C: directory and create a subdirectory WIIMC. Then Right Click on that subdirectory and click on the context menu “SVN Checkout” entry. In the pop-up Box under URL of repository: enter “http://code.google.com/p/wiimc/source/checkout” or “http://wiimc.googlecode.com/svn/trunk” (The Checkout directory: will be prefilled with “C:WIIMC”, and “Fully Recursive” and “Head revision” will be set.) Click OK and the WII MC code will load into C:WIIMC, as required by step 3 of the WIIMC Compiling Instructions.

    The”Checkout” will give the latest SVN, so if you need to revert to an earlier SVN, right click and click “Turtoise SVN” then click “Update to revision…”, and in the Update Box, click “Revision” , enter the SVN number then click “OK”.

    Step 2.


    The second step is to create the environment on your Windows machine that will support the development of a WII application on a PowerPC. This is done by installing the Development Kit Updater. Download it from https://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitProUpdater-1.5.0.exe/downloadand install it. Note: Select Deselect devkitARM and devkitPSP when installing and install to C:devkitPro. This will install the latest devkitPPC (R22) and libogc (1.8.6) as required by Step 1 of the WIIMC Compiling Instructions.
    Then MinGW must be installed using the instructions in post http://www.wiimc.org/forum/viewtopic.php?f=5&t=489&p=3679#p3679

    Step 3.


    The third step is to get and compile the ported libraries that WIIMC uses so they will available to link with the WIIMC code when building the final WII application. First use Explorer and open the C:devkitPro subdirectory created in Step 2 and create a “portlibs” subdirectory within it. Then open this “portlibs” subdirectory and create a “ppc” subdirectory within it. Finally use the following links to download the 5 ported libraries to c:devkitProportlibsppc as required by step 2 of the WIIMC Compiling Instructions.

    Zlib = http://sourceforge.net/projects/devkitpro/files/portlibs/zlib-1.2.4-ppc.tar.bz2/download
    MXml = http://sourceforge.net/projects/devkitpro/files/portlibs/mxml-2.6-ppc.tar.bz2/download
    LibPng = http://sourceforge.net/projects/devkitpro/files/portlibs/libpng-1.4.1-ppc.tar.bz2/download
    Freetype = http://sourceforge.net/projects/devkitpro/files/portlibs/freetype-2.3.11-ppc.tar.bz2/download
    Edit: apparently this is now in:
    http://sourceforge.net/projects/devkitpro/files/portlibs/previous/freetype-2.3.11-ppc.tar.bz2/download
    Jpeg8a (in place of libjpeg) = http://sourceforge.net/projects/devkitpro/files/portlibs/jpeg8a-ppc.tar.bz2/download

    Finally extract all those ported libraries, using UniExtractor http://legroom.net/software/uniextract. Just Right Click on each .bz2 file and click “UniExtract Here”. Each extract will add its files to the 4 subdirectories within ppc.

    Step 4.


    The fourth step is to compile the libraries included with the WIIMC source code so they too will be available to link with the WIIMC code when building the final WII application, as required by Step 4 of the WIIMC Compiling Instructions. This is slightly more complicated since you will be compiling them within the development environment installed in Step 2, rather than as Windows commands. This is a “Command Prompt” environment similar to the Windows command prompt but it is started using the “devkitPro/Msys” program that will be found in your Windows Start Menu. Be sure to start it with a Right Click “Run as Administrator” if you don’t already have those permissions.

    Note that to compile, the ./configure, make and make install commands must each be entered at the default directory level for each library being compiled, so now in the devkitPro/Msys window enter the following commands which create the default directories and then ./configure, make and make install each library. The final commnds then move to the C:WIIMC directory and make WIIMC.
    (Note that the up and down keyboard arrow keys will recall previous command line entries, and the left right keyboard arrow keys will move the typing cursor within the command line so you can make changes, so you do not have to retype all of these commands.)

    Note Effective from SVN762 additional libraries must be installed as documented in the official compile guide and these user posts http://www.wiimc.org/forum/viewtopic.php?f=5&t=1042&start=10#p4611 and http://www.wiimc.org/forum/viewtopic.php?f=5&t=1167#p5248. This guide will no longer address these additional steps since users of WIIMC+ receive the necessary compiled library additions directly as part of the WIIMC+ distribution.

    PATH=$DEVKITPPC/bin:$PATH
    cd /c/wiimc/libs/fribidi/
    ./configure --host=powerpc-eabi --prefix="${DEVKITPRO}/portlibs/ppc" --libdir="${DEVKITPRO}/portlibs/ppc/lib" --disable-shared
    make
    make install
    cd ..
    cd libiconv/
    ./configure --host=powerpc-eabi --prefix="${DEVKITPRO}/portlibs/ppc" --libdir="${DEVKITPRO}/portlibs/ppc/lib" --disable-shared
    make
    make install
    cd ..
    cd pcre/
    ./configure --host=powerpc-eabi --prefix="${DEVKITPRO}/portlibs/ppc" --libdir="${DEVKITPRO}/portlibs/ppc/lib" --disable-shared
    make
    make install
    cd ..
    cd libexif/
    ./configure --host=powerpc-eabi --prefix="${DEVKITPRO}/portlibs/ppc" --libdir="${DEVKITPRO}/portlibs/ppc/lib" --disable-shared
    make
    make install
    cd ..
    cd /c/wiimc
    make clean
    make
    exit

    The compiled WIIMC.dol and WIIMC.elf will now be found in your C:WIIMC directory.

    Step 5.


    Future code revisions to WIIMC may be obtained by opening the C: directory in Explorer, Right Clicking on the WIIMC subdirectory and then clicking on the “SVN Update” context menu entry. Any code revisions will be downloaded. If you need to be at a specific SVN level follow the Revert process defined in Step 1. To recompile, start devkitPro/Msys again, and enter the following commands:

    cd /c/wiimc
    make clean
    make
    exit
    #25933
    cadbusca
    Participant

    Edit: Updated 3/08/11 to SVN903

    With the availability of the “WiiMC Enhancement Pack.patch”, its time to add Step 6 and 7 to this guide on how to apply a patch.

    After following the previous 5 steps, and either compiling the additional libraries now required or merging the library additions provided with WIIMC+, your C:WIIMC directory will contain a copy of the WiiMC source code to what ever SVN level you originally downloaded or updated to.

    The WiiMC+ Enhancement Pack Version 7 patch has been tested and is compatible with SVN903
    As new SVN’s are released, the patch may no longer be compatible so if you have updated to the latest SVN level using Step 5, it may be necessary to revert your copy of the code back to SVN903 using Step 6.

    Step 6:



    While Step 5 will always give you the latest level of SVN code, if you require a specific SVN level of the source code, it may also be obtained by opening the C: directory in Explorer, Right Clicking on the WIIMC subdirectory, hovering over “Turtoise SVN” context menu entry, and clicking on “Update to revision..”. Then in the box with the cursor type the SVN level you wish to change to. eg: 411 and click “OK”. Turtoise will then retreive that level of code and advise you of the new level when completed.

    Note that any code changes or patches you have applied to the existing level of SVN code will be retained when Updating using Step 5 or step 6, and Turtoise will advise you of any conflicts between the new updated code and these changes you have made. It is therefore recommended that if you have made code changes that you first save them by “creating a patch”, and then “reverting” to a clean copy of the currently installed SVN before updating.

    Patches and Reversions are done by opening the C: directory in Explorer, Right Clicking on the WIIMC subdirectory, hovering over “Turtoise SVN” context menu entry, and clicking on “Create patch..” or “Revert..” and selecting all the listed modules.

    Step 7:



    Now with your SVN code at the required level, you may apply the patch by the following steps:

    a) First copy the .patch file to your C:WIIMC directory.

    b) To display the patch contents, open the C:WIIMC directory in Explorer,and double click on the .patch file. The TurtoiseUDiff window will open showing the patch. (Note you may need to open Turtoise SVN/Settings and under External Programs/Diff Viewer select the TurtoiseMerge Diff Viewer)

    b) To apply the patch to the SVN code, open the C:WIIMC directory in Explorer, Right Click on the .patch file you want to apply, hover over “Turtoise SVN” context menu entry, and click “Apply patch..”

    c) The Turtoise Merge window will now open and may open a path match found message so just click “yes”.

    d) A small window will now open in the upper left hand corner of the Turtoise Merge window listing the SVN modules that the patch will update. Don’t be concerned if some are in red and others are grey.

    e) Drag that little window out of the way so you can see the “diskette icon” in the third line in the upper left corner. You will need to click on this to save the merged patches for each module.

    f) Now in turn, double click on each module listed in the small window, and after it loads, click on the diskette icon to save the merged changes, and then select the next module. Note that each module greys out after it is merged and saved. If not greyed out try again.

    g) Note that if there are conflicts in a module between the patch and the SVN code, Red Arrows will be displayed on the third line of the Turtoise Merge window and they will need to be resolved before you can save the merged module. (The Wii Enhancement Pack patch has no conflicts when merged with SVN411)

    h) After all modules are merged and saved close the “Turtoise Merge” window (using the upper right X icon 🙂 ).

    i) Your SVN code now includes the patched code and you can recompile it by starting the devkitPro/Msys program again that will be found in your Windows Start Menu., and entering the following commands:

    cd /c/wiimc
    make

    The compiled patched code can now be found in C:WIIMCwiimc.dol . Erase the companion C:WIIMCwiimc.elf file or it may prevent future compiles.

    j) Finally on your PC copy and paste the standard sd card or usb “appswiimc” folder to create an “appswiimc-copy” folder and rename it to appswii-plus. (Effective with WIIMC 1.1.1 the standard version will use files in appswiimc and the enhanced version will use files in appswiimc-plus). Use wordpad to edit the appswiimc-plusmeta.xml fille and change WiiMC to WiiMC Plus, then replace the standard boot.dol with the compiled c:WIIMCwiimc.dol by copying it to appwiimc-plus and renaming it to boot.dol (after deleting the existing boot.dol)

    The Homebrew menu will now display both the standard “WIIMC” and the enhanced “WIIMC Plus” application, so you can easily switch between them. Now you can start either the standard “WIIMC” or your compiled enhanced “WIIMC Plus”.

    #25935
    geegee
    Participant

    Mr. jhb50.

    This morning i started with your excellent compile guide and ran into a few issues.

    In MSys i’m stuck now, i started 3x from the start to be sure i did everything correct.

    cd liba52/
    ./configure –host=powerpc-eabi –prefix=”${DEVKITPRO}/portlibs/ppc” –libdir=”${DEVKITPRO}/portlibs/ppc/lib” –disable-shared

    Administrator@BAREBONE /c/wiimc/libs/liba52
    $ make

    Making all in autotools
    make[1]: Entering directory ‘/c/wiimc/libs/liba52/autotools’
    make[1]: Nothing to be done for ‘all’
    make[1]: Leaving directory ‘/c/libs/liba52/autotools’
    Making all in include
    make[1]: Entering directory ‘/c/wiimc/libs/liba52/include’
    make[1]: Leaving directory ‘/c/libs/liba52/include’
    Making all in liba52
    make[1]: Entering directory ‘/c/wiimc/libs/liba52/liba52’
    /bin/sh ../libtool –mode=link powerpc-eabi-gcc -g -03 -fomit-frame-pointer -prefer-non-pic -o liba52.la -rpath /c/devkitPro/portlibs/ppc/lib -no-undefined bitsrteam.lo imdct.lo bit_allocate.lo parse.lo downmix.lo -lm
    rm -fr .libs/liba52.la .libs.liba52.* .libs.liba52.*
    ar cru .libs/liba52.la bitstream.o imdct.o bit_allocate.o parse.o downmix.o
    ../libtool:line 4155: ar: command not found
    make[1]: *** [liba52.la] error 127
    make[1]: leaving directory ‘/c/wiimc/libs/liba52/liba52’
    make: *** [all-recursive] error 1

    Then it goes back to Administrator@BAREBONE /c/wiimc/libs/liba52
    What can i do to fix this?

    #25936
    cadbusca
    Participant

    The fix to theabove problem cited by hetfield was identified by ravex99. This link will skip over all the following misinformation and down to that post. I have deleted my subsequent responses to hetfield.

    Jump forward to fix: http://www.wiimc.org/forum/viewtopic.php?f=5&t=489&start=10#p2507

    #25938
    zany130
    Participant

    @hetfield wrote:

    4. In MSys i’m stuck now, i started 3x from the start to be sure i did everything correct.

    cd liba52/
    ./configure –host=powerpc-eabi –prefix=”${DEVKITPRO}/portlibs/ppc” –libdir=”${DEVKITPRO}/portlibs/ppc/lib” –disable-shared

    Administrator@BAREBONE /c/wiimc/libs/liba52
    $ make

    Making all in autotools
    make[1]: Entering directory ‘/c/wiimc/libs/liba52/autotools’
    make[1]: Nothing to be done for ‘all’
    make[1]: Leaving directory ‘/c/libs/liba52/autotools’
    Making all in include
    make[1]: Entering directory ‘/c/wiimc/libs/liba52/include’
    make[1]: Leaving directory ‘/c/libs/liba52/include’
    Making all in liba52
    make[1]: Entering directory ‘/c/wiimc/libs/liba52/liba52’
    /bin/sh ../libtool –mode=link powerpc-eabi-gcc -g -03 -fomit-frame-pointer -prefer-non-pic -o liba52.la -rpath /c/devkitPro/portlibs/ppc/lib -no-undefined bitsrteam.lo imdct.lo bit_allocate.lo parse.lo downmix.lo -lm
    rm -fr .libs/liba52.la .libs.liba52.* .libs.liba52.*
    ar cru .libs/liba52.la bitstream.o imdct.o bit_allocate.o parse.o downmix.o
    ../libtool:line 4155: ar: command not found
    make[1]: *** [liba52.la] error 127
    make[1]: leaving directory ‘/c/wiimc/libs/liba52/liba52’
    make: *** [all-recursive] error 1

    I get this error too. I solved it dowloading ar command from mingw’s binutils package and copying ar.exe (in /bin folder) to DevKitPro/msys /bin folder. Seems like devkitpro installer forgot it.

    Mingw binutils package link: http://sourceforge.net/downloads/mingw/MinGW/BaseSystem/GNU-Binutils/binutils-2.20.51/binutils-2.20.51-1-mingw32-bin.tar.lzma/

    #25939
    geegee
    Participant

    strangest thing.

    i tried it on my laptop this time, same thing.
    I compiled sneek on the laptop as well, got error missing msvcr100.dll, fixed that, sneek compilingl worked perfectly after that.
    sad to say, wiimc is still the same.
    The only difference between the 2 is that my laptop has .net framework 4 beta2, and the PC has the normal one.

    edit: okay, tried copied ar.exe in msys/bin, same error.
    Then in devkitpro/devkitppc/bin because that is the path.
    no acceptable c compiler found in $PATH.
    So what is an accaptable c compiler? and did i put it in the right place?

    I searched around and found ar.exe in powerpc-eabi-bin, wich could make sence because it refers to it with –host.
    and there stil is the error in ‘/c/wiimc/libs/fribidi’
    so there is something going wrong with the source download as well.
    I used svn check with tortoise which worked with sneek.

    Anyone more idea’s or answers to the above question?

    #25940
    cadbusca
    Participant
    #25941
    geegee
    Participant

    thanks for the info jhb50.
    that was very helpfull.
    I must admit i also installed devkitarm, because that was needed for sneek.
    But since they are independend compilers they should not interfere i think.
    Now i’ve compared the 2 devkitpro installer links, and they are from the exact same site :P.

    I checked the install files, and i have exactly the same, even the byte size matches in all of them.
    Then i checked the ar.exe files in the folders you said.

    Strange thing is, i do not have ar.exe files in
    c:DevkitProdevkitPPCpowerpc-eabi
    c:DevkitProdevkitPPCmn10200
    and do not have
    C:devkitProdevkitPPCpowerpc-eabi-ar.exe
    C:devkitProdevkitPPCmn10200-ar.exe

    On my laptop they are in
    c:DevkitProdevkitPPCpowerpc-eabibin
    c:DevkitProdevkitPPCmn10200bin

    and in
    C:devkitProdevkitPPCbinpowerpc-eabi-ar.exe
    C:devkitProdevkitPPCbinmn10200-ar.exe

    So i will do the following:
    Copy those files in the wright directories and try again.

    nope, still the same.
    Don’t know if this is normal, but every time i get a warning:
    configure: warning: if you wanted to set the –build type, don’t use –host
    So i tried : –build=powerpc-eabi, but in the end no difference (but no warning anymore).

    I think i’m giving up, its not that i need it that bad, i just like to experiment and its fullfilling if something works and you can help others with it.
    But first things first, there is more important work to do with sneek.
    maybe i’ll give it another go some other time.

    Thank you for the geat help so far.

    edit:
    i kept thinking and had 1 more question:
    what .net framework versions do you have installed?
    Maybe there is my problem?
    I’ve got, framework 1.1, 2.0sp2, 3.0sp2, 3.5sp1, 4 client profile and 4 extended.

    Uninstalled devkitpro and reinstalled only with devkitppc.
    all the .exe files were in the same folders again, so to be sure, i copied them again to the designated folders.
    unfortunally still the same errors.

    #25942
    cadbusca
    Participant
    #25943
    geegee
    Participant

    hmmm, i placed the question there

    I also looked at the config log.
    Strange thing is for example PATH: /mingw/bin (there is no such dir anywhere)
    msys batch is mingw, so i thought, change the name msys into mingw :P, but that did’nt change anything.

    btw, could it be that no acceptable C compiler found in $PATH means no c compiler in /fribidi? and not in devkitpro?

    #25944
    zany130
    Participant

    @hetfield wrote:

    hmmm, i placed the question there

    I also looked at the config log.
    Strange thing is for example PATH: /mingw/bin (there is no such dir anywhere)
    msys batch is mingw, so i thought, change the name msys into mingw :P, but that did’nt change anything.

    btw, could it be that no acceptable C compiler found in $PATH means no c compiler in /fribidi? and not in devkitpro?

    It means that in your $PATH variable there is no gcc compiler executable. You must change your PATH variable

    #25945
    cadbusca
    Participant
    #25946
    geegee
    Participant

    Please read the devkit forum, he also provided a solution which i didn’t try yet.

    the problem was not my installation, but yours 😮
    In my attempt to mimic your installs, i screwed up mine, so i have to start from scratch again.
    But i’ll save that for a rainy day.

    http://www.devkitpro.org/viewtopic.php?f=3&t=2053&sid=f31083634f230f1afbfcf2f74fa36499

        PATH=$DEVKITPPC/bin:$PATH
    CPPFLAGS="-mrvl -I$DEVKITPRO/portlibs/ppc/include" LDFLAGS=="-mrvl -L$DEVKITPRO/portlibs/ppc/lib"./configure --host=powerpc-eabi --disable-shared
    #25947
    cadbusca
    Participant
    #25948
    geegee
    Participant

    Well, i find it interesting that your devkit installation is different from the original.
    That is why wintermute suspects yours was faulted.
    And i read other posts of you on devkit.org, with some problems you discribed there, it looks like you keep running into problems.
    I wonder why.
    Did you ever compile anything without errors?

    On 3 different computers i did the following:
    1. Started from scratch with wiimc, but same thing all over again.
    2. I started from scratch with sneek source which was without any problems.

    So this strange problem cannot be on my side, there must be something wrong with the code.
    And since i am the first to report this here, i doubt that anyone else succeeded.
    As a matter a fact, i am the only one who replied here!!!
    If (many) others succeeded, there would be at least a few thank you posts, or not?

    Just for the fun of it, try your guide again yourself from the beginning, on a PC that never did any compiling stuf.
    Remember, everyone who starts from scratch with devkitpro install, do not have the corrections you did on your pc.

Viewing 15 posts - 1 through 15 (of 216 total)
  • You must be logged in to reply to this topic.

Login

Lost Password