Re: Steps 6 and 7 – Applying and Compiling a Patch

Home › Forums › Development › Expanded Windows Compile Guide › Re: Steps 6 and 7 – Applying and Compiling a Patch

#25933
cadbusca
Member

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”.