-
Notifications
You must be signed in to change notification settings - Fork 6
Compiling Level‐Headed via Qt Creator
Level-Headed is written in C++ with Qt. This should compile without issues on Windows, Mac, and Linux. In order to compile Level-Headed, Qt will need to be installed on your specified platform.
The Qt Framework and SDK can be installed from here. From that link, choose the open source option, download, then run the installer. Make sure to install the latest version of Qt, Qt Creator, and MinGW (if you're on Windows) as that will make compiling Level-Headed easy.
Next, you'll need to pull the source code down. In order for all the features of Level-Headed to work properly, source code from some other repositories will be necessary. The following commands will prepare the folders and pull down the necessary code.
mkdir Level-Headed_Project
cd Level-Headed_Project
git clone https://github.com/Coolcord/Level-Headed.git
git clone https://github.com/Coolcord/Level-Headed_Data.git
git clone https://github.com/Coolcord/Hexagon.git
git clone https://github.com/Coolcord/Sequential_Archive.git
git clone https://github.com/Coolcord/C_Common_Code.git
After running these commands, your folder structure should look like this:
Level-Headed_Project/
--> Level-Headed
--> Level-Headed_Data
--> Hexagon
--> Sequential_Archive
--> C_Common_Code
Once the environment is prepared and the source code is ready, the projects can be opened in Qt Creator. Run Qt Creator and open the following project files. When asked what configuration to use, MinGW is recommended, but others may work fine. Open each project file below via File -> Open File or Project...
Level-Headed/Level-Headed/Level-Headed.pro
Level-Headed/SMB1/SMB1_Compliance_Generator/SMB1_Compliance.Generator.pro
Level-Headed/SMB1/SMB1_Compliance_To_SMB1/SMB1_Compliance_To_SMB1.pro
Level-Headed/SMB1/SMB1_Writer/SMB1_Writer.pro
Hexagon/Hexagon/Hexagon.pro
Sequential_Archive/Sequential_Archive/Sequential_Archive.pro
Change each project setting from "Debug" to "Release". Then, click "Build" -> "Rebuild All" to compile. If everything is set up correctly, the projects will start compiling! This process will take a few minutes.
Next, the graphics and music archives will need to be created. This can be done with SAM (Sequential Archive Manager), a graphical interface for interacting with Sequential Archives. Run SAM, click "Pack", and select the "Graphics" folder that can be found in "Level-Headed_Data". This should generate a "Graphics.sa" file. Next, select the "Music" folder that is also in "Level-Headed_Data". This will generate the "Music.sa" file.
Finally, we can setup the runtime folder. Create the necessary folders and copy the files over to match the tree below. The runtime folder structure should look like this when finished:
Level-Headed/
--> Data/
----> SMB1/
------> Graphics.sa
------> Music.sa
--> Levels/
--> Plugins/
----> Generators/
------> SMB1_Compliance.dll
----> Interpreters/
------> SMB1_Compliance_To_SMB1.dll
----> Writers/
------> SMB1_Writer.dll
----> Hexagon.dll
----> Sequential_Archive.dll
--> Level-Headed.exe
If you're on Mac or Linux, the folder structure will be mostly the same, but note that Mac and Linux use *.so files instead of *.dll, so keep that in mind when copying the plugins over.
If you're on Windows, Level-Headed.exe may need a few additional DLL files from Qt to run on its own. These can be copied from the bin folder inside of your Qt installation (e.g. Qt/5.11.1/mingw53_32/bin). Place these DLL files in the same directory as Level-Headed.exe.
At this point, if you did everything correctly, Level-Headed should run properly! From here, you'll need to acquire and install a SMB1 ROM if you want to play the levels in the SMB1 engine. Once you do that, you can start generating games!