How Can I Compile USB Loader GX

Discussion in 'Wii - Backup Loaders' started by macmel, Jul 21, 2009.

Jul 21, 2009

How Can I Compile USB Loader GX by macmel at 1:50 PM (18,046 Views / 0 Likes) 72 replies

  1. macmel
    OP

    Member macmel GBAtemp Regular

    Joined:
    Nov 18, 2008
    Messages:
    166
    Country:
    Philippines
    USB LOADER GX Compile GUIDE

    Can anyone help me or point me to a guide so that I can compile the USB Loader GX's latest revision. Updates are really fast and I don't have a connection for my Wii in our house that is why I can't use the update feature within USB Loader GX.

    Thank you.
    NOTE: I have added the GUIDE made by emupaul below as this topic is being link from the USB Loader GX ReadMiiv2.

    BY: emupaul
    This is my second attempt at writing a compile guide, sorry if its crappy, this method has worked on my version windows home premium but *should*
    work on windows xp. Not very sure about windows 7, I preorded a copy so maybe ill post more guides for other things for windows 7 later, I just
    pull this out of my arse so plz dont flame me.

    How Can I Compile USB Loader GX?
    Its very easy...

    First download and Install a svn client to check out a few sources. I recommend Tortoisesvn because it's explorer shell integrated but you can use whatever you desire.
    http://tortoisesvn.tigris.org/
    Link to download

    Next thing to do is download & install DevKitPro Tool Chain & Reboot (to apply environment variables)
    http://www.devkitpro.org/
    Link to download


    After the install navigate to your C drive or any folder you want to check the source tree too and check the sources out for libogc libfat and usb loader
    https://devkitpro.svn.sourceforge.net/svnro...o/trunk/libogc/
    https://devkitpro.svn.sourceforge.net/svnro...o/trunk/libfat/

    http://usbloader-gui.googlecode.com/svn/trunk/


    Warning: Spoilers inside!

    Next launch Msys located in the devkitpro folder and navigate to the folder libogc and type make then press enter and wait about 5 mins, do the same for libfat


    Warning: Spoilers inside!


    Next type make install, make sure you type make install in the libfat folder too!

    Warning: Spoilers inside!


    Next Navigate to the usb loader folder in msys then type make, ignore the first two warnings about svn command and wait for it to finish build and locate your dols


    Warning: Spoilers inside!

    Done. [​IMG]

    Download link to binary

    Issues
    that may occur during the build procress could be caused by a few things in vista so the first few things do should be to disable UAC

    How to Disable UAC

    Also check if your environment variables installed properly

    Warning: Spoilers inside!

    If i left something out or is unclear just ask. Ill update.

    YOU MAY WANT TO TRY THE BELOW AS ADDED BY giantpune


    Some stuff to add...
    1 If you use the libogc required for compiling USB Loader GX, you won't be able to compile lots of other apps, as we use a different version and it has conflicting definitions for vector/guvector. you will have to just go through the source and change most (or all) or Vector to say guVector. I did it with cfg loader and it works fine.

    2 you need to have a command line based svn client installed for the rev# to show up in the credits screen. So, what I do is just install sliksvn but never use it. I still checkout with tortoisesvn.

    3 don't do the last 3 steps listed. instead, use this URL http://usbloader-gui.googlecode.com/files/...-08-07-2009.zip to get the libraries that we use and copy them into your X:\devkit\libogc folder and merge these folders with the ones already there. then, when you checkout the source, double-click the "gui.pnproj" file and it should open up in programmer's notepad. then press alt+1 and wait 3-5 minutes and it will do the last 3 steps for you. when it is done, you will have boot.dol and boot.elf

    4 the folder you checkout the source code to cannot have ANY SPACES IN THE FULL PATH NAME. this means that you can't put it on the desktop as it is a child of the "documents and settings" folder which has spaces. best to put it right on the root or close to it.
     


  2. DKAngel

    Member DKAngel GBAtemp Advanced Fan

    Joined:
    Jan 5, 2009
    Messages:
    659
    Location:
    Perth,Australia
    Country:
    Australia
    i cant get the update feature to work anyway, it allways downloads the same revision over and over again, it reconds it allways needs to update, just use a card reader and manual put the build on the card yourself
     
  3. macmel
    OP

    Member macmel GBAtemp Regular

    Joined:
    Nov 18, 2008
    Messages:
    166
    Country:
    Philippines

    Yeah, that's the way I usually do whenever someone compile the latest dol. If you look at the sites belw

    http://sites.google.com/site/usbloadergui/...loads/revisions

    at the time of this posting the revision there is r630

    While the below site is already at r635

    http://code.google.com/p/usbloader-gui/source/list

    That is why I wanted to learn how to compile it rather asking someone to compile it.
     
  4. emupaul

    Member emupaul GBAtemp Fan

    Joined:
    Jun 26, 2009
    Messages:
    416
    Location:
    space
    Country:
    United States
    Give me like 10 - 15 mins ill write you a guide and post it here.
     
  5. Logan

    Member Logan GBAtemp Advanced Fan

    Joined:
    Nov 21, 2003
    Messages:
    599
    Location:
    Northampton, UK
    Country:
    United Kingdom
    GX aside, it would be interesting to see a guide for compiling DOL's.

    Look forward to it Emupaul.
     
  6. tj_cool

    Supervisor tj_cool Stuff

    Joined:
    Jan 7, 2009
    Messages:
    9,942
    Location:
    This planet
    Country:
    Belgium
    Only thing I know is that you need Devkitpro and LibOGC
    and of course the source [​IMG]
     
  7. emupaul

    Member emupaul GBAtemp Fan

    Joined:
    Jun 26, 2009
    Messages:
    416
    Location:
    space
    Country:
    United States
    ok its going to take longer than 10 mins but ill post it, its few extra steps becauase u need the lastest svn version libogc, i never built this before but its going smooth.
     
  8. emupaul

    Member emupaul GBAtemp Fan

    Joined:
    Jun 26, 2009
    Messages:
    416
    Location:
    space
    Country:
    United States
    edit: longer slightly more detailed version here
    http://www.megaupload.com/?d=AOU8QXAZ

    This is my second attempt at writing a compile guide, sorry if its crappy, this method has worked on my version windows home premium but *should*
    work on windows xp. Not very sure about windows 7, I preorded a copy so maybe ill post more guides for other things for windows 7 later, I just
    pull this out of my arse so plz dont flame me.

    How Can I Compile USB Loader GX?
    Its very easy...

    First download and Install a svn client to check out a few sources. I recommend Tortoisesvn because it's explorer shell integrated but you can use whatever you desire.
    http://tortoisesvn.tigris.org/
    Link to download

    Next thing to do is download & install DevKitPro Tool Chain & Reboot (to apply environment variables)
    http://www.devkitpro.org/
    Link to download


    After the install navigate to your C drive or any folder you want to check the source tree too and check the sources out for libogc libfat and usb loader
    https://devkitpro.svn.sourceforge.net/svnro...o/trunk/libogc/
    https://devkitpro.svn.sourceforge.net/svnro...o/trunk/libfat/

    http://usbloader-gui.googlecode.com/svn/trunk/


    Warning: Spoilers inside!

    Next launch Msys located in the devkitpro folder and navigate to the folder libogc and type make then press enter and wait about 5 mins, do the same for libfat


    Warning: Spoilers inside!


    Next type make install, make sure you type make install in the libfat folder too!

    Warning: Spoilers inside!


    Next Navigate to the usb loader folder in msys then type make, ignore the first two warnings about svn command and wait for it to finish build and locate your dols


    Warning: Spoilers inside!

    Done. [​IMG]

    Download link to binary

    Issues
    that may occur during the build procress could be caused by a few things in vista so the first few things do should be to disable UAC

    How to Disable UAC

    Also check if your environment variables installed properly

    Warning: Spoilers inside!

    If i left something out or is unclear just ask. Ill update.
     
  9. WiiPower

    Member WiiPower GBAtemp Guru

    Joined:
    Oct 17, 2008
    Messages:
    8,165
    Country:
    Germany
    You forgot the reboot after installing devkitpro. It never worked for me without reboot. Also you should note that Vista and/or Windows 7 can cause a lot of trouble when trying to use devkitpro.(don't know if running as admin is enough on Vista)
     
  10. emupaul

    Member emupaul GBAtemp Fan

    Joined:
    Jun 26, 2009
    Messages:
    416
    Location:
    space
    Country:
    United States
    thanks for pointing that out wiipower, my laptop is programming power house so I did probably do some extra things like release UAC auto elavate command prompt and set some enviroment variables , but that was a long while ago pre guide.
     
  11. giantpune

    Member giantpune GBAtemp Addict

    Joined:
    Apr 10, 2009
    Messages:
    2,860
    Country:
    United States
    Some stuff to add...
    1 If you use the libogc required for compiling USB Loader GX, you won't be able to compile lots of other apps, as we use a different version and it has conflicting definitions for vector/guvector. you will have to just go through the source and change most (or all) or Vector to say guVector. I did it with cfg loader and it works fine.

    2 you need to have a command line based svn client installed for the rev# to show up in the credits screen. So, what I do is just install sliksvn but never use it. I still checkout with tortoisesvn.

    3 don't do the last 3 steps listed. instead, use this URL http://usbloader-gui.googlecode.com/files/...-08-07-2009.zip to get the libraries that we use and copy them into your X:\devkit\libogc folder and merge these folders with the ones already there. then, when you checkout the source, double-click the "gui.pnproj" file and it should open up in programmer's notepad. then press alt+1 and wait 3-5 minutes and it will do the last 3 steps for you. when it is done, you will have boot.dol and boot.elf

    4 the folder you checkout the source code to cannot have ANY SPACES IN THE FULL PATH NAME. this means that you can't put it on the desktop as it is a child of the "documents and settings" folder which has spaces. best to put it right on the root or close to it.
     
  12. tj_cool

    Supervisor tj_cool Stuff

    Joined:
    Jan 7, 2009
    Messages:
    9,942
    Location:
    This planet
    Country:
    Belgium
    Probably unneeded, but you can press ALT + 2 (the 2 thats not on the numpad) in the prog. notepad to delete previous boot.dol and elf files before you compile the new ones with ALT + 1.
     
  13. fabi280

    Member fabi280 GBAtemp Regular

    Joined:
    Feb 28, 2008
    Messages:
    182
    Location:
    Somewhere in Europe
    Country:
    Germany
    Since r584 i cant compile it anymore on my linux shell.
    I updated libogc but it didnt work
    It was showing vector errors at video.cpp as far as i can remeber.
    If some1 is using linux, could you hand me a tar, dpkg.... please?
     
  14. emupaul

    Member emupaul GBAtemp Fan

    Joined:
    Jun 26, 2009
    Messages:
    416
    Location:
    space
    Country:
    United States
    if its still showing errors about guVector i dont think you updated to the lastest svn versions of libogc & libfat 1.7.1 of libogc is not the lastest
    sorry if i jumped to a false conclusion
     
  15. macmel
    OP

    Member macmel GBAtemp Regular

    Joined:
    Nov 18, 2008
    Messages:
    166
    Country:
    Philippines
    I'm very grateful to you emupaul, I'll be trying the steps tomorrow as I am out now. Is it possible to edit my first post and add your Guide there? Thanks to everyone who contributed. [​IMG]
     
  16. emupaul

    Member emupaul GBAtemp Fan

    Joined:
    Jun 26, 2009
    Messages:
    416
    Location:
    space
    Country:
    United States
    Sure, im tired right now, but ill revise it later too so, you may need to repost a fresh one or ill make a new thread if people want it, its not the best thing ever its just a little common sense.
     
  17. tj_cool

    Supervisor tj_cool Stuff

    Joined:
    Jan 7, 2009
    Messages:
    9,942
    Location:
    This planet
    Country:
    Belgium
    Added the link to this topic in the readmii

    Its under [2a]Compiling the loader
     
  18. macmel
    OP

    Member macmel GBAtemp Regular

    Joined:
    Nov 18, 2008
    Messages:
    166
    Country:
    Philippines
    I've updated my 1st post to show the guide made by emupaul.
     
  19. macmel
    OP

    Member macmel GBAtemp Regular

    Joined:
    Nov 18, 2008
    Messages:
    166
    Country:
    Philippines
    Hi,

    I just compiled the r636.dol & elf, I will be trying it when I get hold of my Wii tomorrow. Just a few clarifications for the below step;

    Should I make a new folder for libogc as it exist in the devkitpro folder. I made new folders for the gx and libfat in the root.

    After the install navigate to your C drive or any folder you want to check the source tree too and check the sources out for libogc libfat and usb loader
    https://devkitpro.svn.sourceforge.net/svnro...o/trunk/libogc/
    https://devkitpro.svn.sourceforge.net/svnro...o/trunk/libfat/
    http://usbloader-gui.googlecode.com/svn/trunk/

    And the below is the output I got, noticed a few text that are different in color. Does this means that I made something wrong, although the dol and elf were created?
    CODE> "make"
    "make": svnversion: Command not found
    make[1]: svnversion: Command not found
    FreeTypeGX.cpp
    Metaphrasis.cpp
    audio.cpp
    buffer.cpp
    input.cpp
    main.cpp
    menu.cpp
    sys.cpp
    video.cpp
    gui_button.cpp
    gui_customoptionbrowser.cpp
    gui_diskcover.cpp
    gui_element.cpp
    gui_gamebrowser.cpp
    gui_gamecarousel.cpp
    gui_gamegrid.cpp
    gui_image.cpp
    gui_imagedata.cpp
    gui_keyboard.cpp
    gui_optionbrowser.cpp
    gui_sound.cpp
    gui_text.cpp
    gui_tooltip.cpp
    gui_trigger.cpp
    gui_window.cpp
    getentries.cpp
    networkops.cpp
    Settings.cpp
    SettingsPrompts.cpp
    DiscBrowser.cpp
    c:/gx/source/prompts/DiscBrowser.cpp:237:3: warning: multi-line comment
    ProgressWindow.cpp
    PromptWindows.cpp
    gameinfo.cpp
    wad.cpp
    c:/gx/source/wad/wad.cpp: In function 's32 Wad_Install(FILE*)':
    c:/gx/source/wad/wad.cpp:409: warning: dereferencing type-punned pointer will break strict-aliasing rules
    c:/gx/source/wad/wad.cpp:418: warning: dereferencing type-punned pointer will break strict-aliasing rules
    c:/gx/source/wad/wad.cpp:428: warning: dereferencing type-punned pointer will break strict-aliasing rules
    c:/gx/source/wad/wad.cpp:437: warning: dereferencing type-punned pointer will break strict-aliasing rules
    c:/gx/source/wad/wad.cpp:445: warning: dereferencing type-punned pointer will break strict-aliasing rules
    c:/gx/source/wad/wad.cpp: In function 's32 Wad_Uninstall(FILE*)':
    c:/gx/source/wad/wad.cpp:610: warning: dereferencing type-punned pointer will break strict-aliasing rules
     
  20. giantpune

    Member giantpune GBAtemp Addict

    Joined:
    Apr 10, 2009
    Messages:
    2,860
    Country:
    United States
    the first 2 things you got are because you didn't install a command-line based SVN client like i said on page 1.

    the warnings about dereferencing type-punned pointer are just there because of the way we changed the c wad installation stuff for use in c++. everybody gets those, its fine.

    as far as compiling libogc, you can make a folder anywhere as long as you don't have spaces in the full path name and you can name it anything you want. basically, when you install devkit, it puts a libogc folder in X:\devkit. for apps that use the the svn version of libogc, you will either need to compile it yourself or use a link (like the one i put on page 1) to get a version somebody else has compiled. unless you rae going to change it before you compile or you just want to do it cause you like that sort of stuff, there is no real reason to do it yourself.

    the libogc folder you are making and checking out the source code to is only to hold the source for libogc. when compiled, it creates a lib folder and an include folder. these 2 folders then go inside the libogc folder in X:\devkit. then every app compiled on this toolchain use the svn version of devkit. the same applies for libfat.
     

Share This Page