Compiling Smart Tutorial
Background:
- This tutorial will teach you how to compile Smart from its source.
- This will be useful if you decide to make your own changes to Smart or simply want to build it yourself.
- Building it yourself can solve many problems specific to your situation. One such problem is the socket not pairing. Compiling it yourself seems to be a work around for such a problem.
Requirements:
What you downloaded:
- Cross platform x32 and x64 compiler. If you use SEH instead of SJLJ, you will NOT be able to compile x32 code. SEH is better for x64 builds by a lot. However, since Simba uses x32 modules, we need SJLJ.
- Msys command-line is a shell that allows us to run unix/linux like commands on Windows.. grep, bash, make, etc..
- Java JDK is of course needed to compile Smart's java classes. JDK 6 is deprecated and JDK7 or JDK8+ must be used to compile the latest Smart.
- Smart's source is what we will be compiling using the above tools and environments.
Installing Mingw:
- Unzip the downloaded .7z file to the C drive.
- Rename the folder to mingw64.
Once done, it should look like the following:
ShowImages
Installing MSYS:
- Run the MSYS Installer and press yes on the Setup prompt.
- Click Next and then YES to the agreement.
- Click Next.
- Leave the path as: C:\msys\1.0 and click Next.
- Put a checkmark in the Don't create any icons check-box and click Next.
- Press install.
- After a second or two a command-line interface pops up and asks you: Do you wish to continue with the post install? [yn ]
- Type y and press Enter.
- It will now ask you: Do you have MinGW installed? [yn ].
- Type y and press Enter.
- Finally, it asks: Where is your MinGW installation?
- You will type: C:/Mingw64 and press Enter.
- Finally, press any key to continue...
- Uncheck the two boxes on the end of the screen and Finish the installation.
Lost or Confused?
See the following Image tutorial for the above steps:
ShowImages
Modifying the PATH environment variable:
Adding entries to the PATH is normally harmless. However, if you delete any existing entries, you may mess up your PATH, and you could compromise the functioning of your computer. Please be careful.
This part of the tutorial is ONLY if your Java installation is NOT configured properly. Follow along and check if it is. If it isn't you will need to make some changes as shown.
- Right-click Computer and click properties. Otherwise navigate to: Control Panel\System and Security\System
- Click Advanced system settings
- Click Environment Variables...
- Scroll down the System Variables panel, select the PATH variable and click Edit.
- Press Ctrl+A to select all and Copy paste it into a text editor.
- Check to see if 'Java' and 'Mingw' is in it by pressing Ctrl + F and typing Java and Ctrl + F and typing Mingw.
---Modifications (Does NOT delete anything)---- If Java or Mingw is missing, we will add them to the end of the path. Each path is separated by a semi-colon as shown below:
PATH Code:...OtherPaths...;C:\Mingw64\bin;C:\Program Files\Java\jdk1.8.0\bin- If you are unsure, please see the images in the image tutorial below! You do NOT want to mess this up.
- When finished modifying the PATH, copy paste it from your text editor back into your environment variable.
---Modification finished.---- If all is well, click OK 3 times to exit all the interfaces and save any changes.
Lost or Confused?
See the following Image tutorial for the above steps:
ShowImages
Compiling Smart:
- Navigate to the folder containing SMART's source.
- Open the Makefile using a text editor.
- Change WIN_GPP to g++ and WIN64_GPP to g++ (This step may be confusing, if so see the images tutorial below or copy this makefile).
- Save your changes.
- Navigate to C:\msys\1.0
- Run msys.bat
- Change directory to Smart's source using the CD command. (cd "LocationOfSmart's source here" with quotes.)
- Run the make command. (make clean windows)
Lost or Confused?
See the following Image tutorial for the above steps:
ShowImages
Makefile I used: http://pastebin.com/raw.php?i=6uX3N8Eb
ShowMake
Your plugins and jar file should now be in the dist folder. Copy paste them to your C:/Simba/Plugins folder and enjoy.