You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using this small utility you can compile code from Haxe to PowerPC and finally the Nintendo Wii U using [DevKitPro](https://devkitpro.org/) and [reflaxe.CPP](https://github.com/SomeRanDev/reflaxe.CPP).
4
+
Using this small utility you can compile code from Haxe to PowerPC and finally the Nintendo Wii U using [DevKitPro](https://devkitpro.org/) and [reflaxe.CPP](https://github.com/SomeRanDev/reflaxe.CPP), for creating homebrew for the Wii U.
5
5
6
6
Currently supported libraries to be used in conjunction with HxCompileU:
7
7
8
-
-[hxWUT](https://github.com/Slushi-Github/hxWUT): the toolchain or SDK used to create homebrew on the Wii U.
9
-
-[hxLibNotifications](https://github.com/Slushi-Github/hxLibNotifications): a library to create notifications on the Wii U (Useful for mostly plugins).
10
-
-[hxLibMappedMemory](https://github.com/Slushi-Github/hxLibMappedMemory): a library to create mapped memory on the Wii U.
8
+
-[HxU_WUT](https://github.com/Haxe-WiiU/HxU_WUT): the toolchain or SDK used to create homebrew on the Wii U.
9
+
-[HxU_LibNotifications](https://github.com/Haxe-WiiU/HxU_LibNotifications): a library to create notifications on the Wii U (Useful for mostly plugins).
10
+
-[HxU_LibMappedMemory](https://github.com/Haxe-WiiU/HxU_LibMappedMemory): a library to create mapped memory on the Wii U.
11
11
-[SlushiUtilsU](https://github.com/Slushi-Github/slushiUtilsU): a library to facilitate the use of certain Wii U libraries.
12
-
-[hxSDL2](https://github.com/Slushi-Github/hxSDL2): SDL2 (SDL2, SDL2_Image, SDL2_mixer...) @:native bindings for Haxe, for use SDL2 on the Wii U.
13
-
-[hxSDL_FontCache](https://github.com/Slushi-Github/hxSDL_FontCache): SDL_FontCache @:native bindings for Haxe to do homebrew on Wii U.
14
-
-[hxJansson](https://github.com/Slushi-Github/hxJansson): Jansson @:native bindings for Haxe to do homebrew on Wii U.
15
-
-[hxVorbis](https://github.com/Slushi-Github/hxVorbis): Vorbis @:native bindings for Haxe to do homebrew on Wii U.
12
+
-[HxU_SDL2](https://github.com/Haxe-WiiU/HxU_SDL2): SDL2 (SDL2, SDL2_Image, SDL2_mixer...) @:native bindings for Haxe, for use SDL2 on the Wii U.
13
+
-[HxU_SDL_FontCache](https://github.com/Haxe-WiiU/HxU_SDL_FontCache): SDL_FontCache @:native bindings for Haxe to do homebrew on Wii U.
14
+
-[HxU_Jansson](https://github.com/Haxe-WiiU/HxU_Jansson): Jansson @:native bindings for Haxe to do homebrew on Wii U.
15
+
-[HxU_Vorbis](https://github.com/Haxe-WiiU/HxU_Vorbis): Vorbis @:native bindings for Haxe to do homebrew on Wii U.
16
16
17
17
-[Leafy Engine](https://github.com/Slushi-Github/leafyEngine): A 2D engine for the Wii U made with Haxe.
18
18
19
19
## How?
20
20
The magic really comes from [reflaxe.CPP](https://github.com/SomeRanDev/reflaxe.CPP), being an alternative to [HXCPP](https://github.com/HaxeFoundation/hxcpp) when you want to compile Haxe to C++.
21
-
By default, if you would try to make Haxe with HXCPP compile to PPC... the results are not nice, there are many errors. With reflaxe.CPP we avoid this because it generates a cleaner code without dependencies!
21
+
By default, if you would try to make Haxe with [HXCPP](https://github.com/HaxeFoundation/hxcpp) compile to PowerPC... the results are not nice, there are many errors. With [Reflaxe/C++](https://github.com/SomeRanDev/reflaxe.CPP) we avoid this because it generates a cleaner code without dependencies!
22
22
23
-
This project is simple, **yet incomplete**.
23
+
This project is simple... But it works!
24
24
25
-
This program what it does, is that by means of some data stored in a JSON file (``hxCompileUConfig.json``), it generates a MakeFile and a [HXML](https://haxe.org/manual/compiler-usage-hxml.html) file with those data of the JSON, of normal first it will try to execute the [HXML](https://haxe.org/manual/compiler-usage-hxml.html) with Haxe, [reflaxe.CPP](https://github.com/SomeRanDev/reflaxe.CPP) is in charge of generating the C++ code, if the compilation with Haxe is successful, it executes the MakeFile with Make and starts the normal compilation of a C++ code, if this is also successful, that's it, you have your homebrew for the Nintendo Wii U made with Haxe!
25
+
This program what it does, is that by means of some data stored in a JSON file (``hxCompileUConfig.json``), it generates a MakeFile and a [HXML](https://haxe.org/manual/compiler-usage-hxml.html) file with those data of the JSON, of normal first it will try to execute the [HXML](https://haxe.org/manual/compiler-usage-hxml.html) with Haxe, [Reflaxe/C++](https://github.com/SomeRanDev/reflaxe.CPP) is in charge of generating the C++ code, if the compilation with Haxe is successful, it executes the MakeFile with Make and starts the normal compilation of a C++ code, if this is also successful, that's it, you have your homebrew for the Nintendo Wii U made with Haxe!
26
+
27
+
Currently there is only support focused on creating homebrew applications for the Wii U, but we are working on support for creating [WUPS](https://github.com/wiiu-env/WiiUPluginSystem) plugins using this utility.
26
28
27
29
## Why?
28
30
Well, since I got a Nintendo Wii U a while ago I've been interested in bringing Haxe to this console.
29
31
Officially it's not possible mainly due to Nintendo NDA (Non-Disclosure Agreement) issues, and that actually it can't even be developed for this console anymore.
30
32
31
33
So... why not experiment to do it taking advantage of the homebrew that exists for the Wii U? hehe! well this is the project for it!
First, you need compilate this project, or you can use the precompiled version that is in the [releases](https://github.com/Slushi-Github/hxCompileU/releases), or you can download it from the [GitHub Actions](https://github.com/Slushi-Github/hxCompileU/actions).
47
53
@@ -54,32 +60,46 @@ cd hxCompileU
54
60
haxe build.hxml
55
61
```
56
62
57
-
After that, you will get your executable “haxeCompileU” in the ``export`` folder, for the moment, copy it to the root of the project you need it.
63
+
After that, you will get your executable ``haxeCompileU`` in the "export" folder, for the moment, copy it to the root of the project folder you need it.
64
+
58
65
66
+
## How to use
59
67
#### First, initialize your project, that is, create the configuration JSON file that HxCompileU will use, you can create it using this command:
60
68
``{haxeCompileUProgram} --prepare``
61
69
70
+
-----
71
+
62
72
#### Once you have configured your JSON file to what your project needs, you can use the following command to compile it:
63
73
``{haxeCompileUProgram} --compile``
64
74
65
-
If you want to compile only Haxe but not to Wii U, you can use the following command:
75
+
- If you want to compile only Haxe but not to Wii U,
76
+
you can use the following command:
66
77
67
-
``{haxeCompileUProgram} --compile --onlyHaxe``
78
+
``{haxeCompileUProgram} --compile --onlyHaxe``
68
79
69
80
70
-
You can also use the following command to compile only Wii U but not Haxe:
81
+
-You can also use the following command to compile only Wii U but not Haxe:
71
82
72
-
``{haxeCompileUProgram} --compile --onlyCafe``
83
+
``{haxeCompileUProgram} --compile --onlyCafe``
73
84
85
+
-----
74
86
75
-
You can also use the following command search a line of code in the ``.elf`` file from a line address of some log using DevKitPro's ``powerpc-eabi-addr2line`` program:
87
+
#### You can also use the following command search a line of code in the ``.elf`` file from a line address of some log using DevKitPro's ``powerpc-eabi-addr2line`` program:
#### You can also use the following command send the ``.rpx`` or ``.wps`` file to the Wii U using DevKitPro's ``wiiload`` program:
94
+
95
+
``{haxeCompileUProgram} --send``
96
+
97
+
-----
79
98
80
-
You can also use the following command send the ``.rpx`` file to the Wii U using DevKitPro's ``wiiload`` program:
99
+
### You can also use the following command to start a UDP server to view the logs from the Wii U:
81
100
82
-
``{haxeCompileUProgram} --sendRPX``
101
+
``{haxeCompileUProgram} --udpServer``
83
102
103
+
-----
84
104
85
-
and that's it! if your compilation was successful on both Haxe and Wii U side, your ``.rpx`` and ``.elf`` will be in ``yourOuputFolder/wiiuFiles``.
105
+
and that's it! if your compilation was successful on both Haxe and Wii U side, your ``.rpx``or ``.wps``and ``.elf`` will be in ``yourOutputFolder/wiiuFiles``.
// No need to print the version here, it's already printed at the start of the program
43
43
return;
44
44
case"--help":
45
-
SlushiUtils.printMsg("Usage: hxCompileU [command]\nCommands:\n\t--prepare: Creates hxCompileUConfig.json\n\t--compile: Compiles the project (use \"--compile --onlyHaxe\" for compiling only the Haxe part)\n\t--searchProblem: search for a line of code in the [.elf] file from a line address of some log using DevKitPro's powerpc-eabi-addr2line program\n\t--udpServer: Starts the UDP server to view logs from the Wii U\n\t--sendRPX: Sends the .rpx file to the Wii U\n\t--version: Shows the version of the compiler\n\t--help: Shows this message",
45
+
SlushiUtils.printMsg("Usage: hxCompileU [command]\nCommands:\n\t--prepare: Creates hxCompileUConfig.json\n\t--compile: Compiles the project (use \"--compile --onlyHaxe\" for compiling only the Haxe part, \"--compile --onlyCafe\" for compiling only the Wii U part)\n\t--searchProblem: search for a line of code in the [.elf] file from a line address of some log using DevKitPro's powerpc-eabi-addr2line program\n\t--udpServer: Starts the UDP server to view logs from the Wii U\n\t--send: Sends the .rpx or .wps file to the Wii U\n\t--version: Shows the version of the compiler\n\t--help: Shows this message",
46
46
NONE);
47
47
default:
48
48
SlushiUtils.printMsg("Invalid argument: ["+args[0] +"], use --help for more information", NONE);
0 commit comments