About Monkey 2 › Forums › Monkey 2 Programming Help › Monkey2 Build From Source Help
This topic contains 14 replies, has 4 voices, and was last updated by
slenkar 7 months, 2 weeks ago.
-
AuthorPosts
-
November 17, 2016 at 8:56 pm #5169
This post will contain various information about contributing to Monkey 2, with various subjects such as:
- downloading from source
- building it from source
- download latest changes from git
Downloading Monkey
Enter this link to one of the git clients: https://github.com/blitz-research/monkey2.git- Github Desktop
https://help.github.com/desktop-classic/guides/contributing/cloning-a-repository-from-github-desktop/ - Sourcetree
https://confluence.atlassian.com/bitbucket/clone-a-repository-223217891.html
(See Nerobot’s notes below for more information) - Alternatively, just download the zip repository from github without any client.
Building Monkey In Windows
- Let’s assume you have downloaded the repository somewhere e.g. D:\Programming\monkey2\ .
- Now you will have to use a C++ compiler, there is the MinGW toolchain which is open source and the Microsoft C++ 2017 which is free for non-commercial usage (you can use it for open source and educational purposes).
- For MinGW you will have to get this one specific toolchain: http://monkeycoder.co.nz/monkey2-files , have it available in the system (set the directory of where g++.exe is located), normally you would type g++ in the command prompt and see compiler output.
- For Microsoft Visual Studio 2017 , download the installer client and run it.
https://docs.microsoft.com/en-us/cpp/build/vscpp-step-0-installation
Once everything is set, go to this file monkey2\bin\env_windows.txt and have this value set MX2_USE_MSVC=1 , and optionally use MX2_ARCH_WINDOWS=x64. - Now since you have a C++ compiler (either [3] or [4]) you are ready to go. Head over to monkey2\scripts and run this file rebuildted2go.bat and wait about 25 minutes to let everything built from scratch which includes the compiler (mx2cc), modules, IDE, etc.
Download Latest Changes From git
- Github Desktop
Having selected the branch you are interested in, hit Fetch Origin and wait a few seconds to let it download.
For more information: https://services.github.com/on-demand/github-desktop/push-with-github-desktop - Sourcetree
Press the pull button from the main toolbar
https://confluence.atlassian.com/sourcetreekb/commit-push-and-pull-a-repository-on-sourcetree-785616067.html
(see Nerobot’s notes for more details)
November 19, 2016 at 6:00 am #5230I use SourceTree for git. I prefer gui instead of command line.
May post short ‘howto’ if someone is interested in.
November 19, 2016 at 7:45 pm #5252It will be a good idea, won’t hurt to post it. Can you make a huge image (i.e. 1500×1500) that explains it?
Generally I use “gihub for windows” but I consider switching to sourcetree, lots of people like this one.
November 20, 2016 at 9:57 pm #5282November 23, 2016 at 10:01 am #5374There is a short article “How to use SourceTree app for managing git repository”.
Install & Account
Install app from here: https://www.sourcetreeapp.com
Enter your git account info to get access to github (there is a prompt for first start).
Clone monkey2
Start app and press Clone/Add (see st-1.png).
In clone dialog (see st-2.png):
- paste monkey2 repository url,
- select folder to copy into (if folder exists it must be empty),
- enter name for repo (it’s bookmark for soursetree),
- and press Clone button.
- wait loading
App overview
See st-3.png
After loading you will stay on default branch – master.
To use develop or any other branch, you need to checkout it.
- Look at Remotes list below master branch.
- Right-click on remotes::origin::develop and choose “Checkout origin/develop…” and press Ok.
- Ok, now you stay on develop branch (bold font).
To change local branch simply double-click on one of them.
To grab new stuff – just press Pull button on main toolbar.
Pull and run rebuildall script if needed.
Any questions?
November 27, 2016 at 12:47 pm #5457Nice one, thanks.
November 28, 2017 at 7:50 am #12010There is a cool feature in SourceTree App named “Log selected” – it shows us all changes for selected files.
For example, I want to inspect latest changes in MainWindow.monkey2 file.
Look at screenshots.
Attachments:
January 13, 2018 at 12:32 pm #12846I did an update to the original first post to get rid of the directions regarding the raw git command set, since GUI applications are much more useful and the process of working repositories is streamlined. Also the title of the post is renamed to include various tips and tricks generally regarding to building and contributing to monkey2.
One upcoming post would be to mention ways about compiling monkey2 with MSVC2017, if anyone has tried it can do a post here.
Another one is to clone and sync the repository from github-to-github (without involving your client).
April 3, 2018 at 2:56 am #14213when compiling on linux i got:
./rebuildted2.sh
***** Rebuilding ted2 *****
Mx2cc version 1.1.12
***** Making app ‘/home/slenkar/Downloads/monkey2/src/ted2/ted2.monkey2’ (linux release x64 gcc) *****
Parsing…
Semanting…
/home/slenkar/Downloads/monkey2/src/ted2/scenedocument.monkey2 [47] : Error : Can’t find overload for ‘Render’ with argument types (mojo.graphics.Canvas,mojo3d.Camera)
/home/slenkar/Downloads/monkey2/src/ted2/ted2.monkey2 [101] : Error : Can’t find overload for ‘new’ with argument types (std.collections.Map<monkey.types.String,monkey.types.String>)April 3, 2018 at 3:43 am #14215ted2 is out of dated (I suppose), but there is ted2go that is up to date.
Try to start rebuildted2go.sh.
April 4, 2018 at 7:42 am #14231I did some updates to the original post to include directions for MSVC2017, currently I have switched to MSVC and it seems good.
July 6, 2018 at 5:14 pm #15002Due to Visual Studio getting updated here and there, you will have to set the correct versions in the configuration file as well.
MX2_MSVC_TOOLS_DIR=${MX2_MSVC_DIR}\Tools\MSVC\14.xx.xxxxx
Go to this directory and see the version (there should be one folder with a name 14.etc.etc):
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVCMX2_WINDOWS_KIT=10.0.xxxxx.x
Open this file and see what version it says on the PlatformIdentity field:
C:\Program Files (x86)\Windows Kits\10\SDKManifest.xmlJuly 7, 2018 at 1:54 am #15003Simple gui app for setuping environment would be nice, it could fix some paths automatically looking at file system.
And also be External tool for IDE.
July 7, 2018 at 11:42 am #15005This reminds me of the CMAKE gui where you place the variables you want.
September 7, 2018 at 6:46 am #15383got this error on linux:
./rebuildmx2cc.sh: 2: ./rebuildmx2cc.sh: source: not found
EDIT-
problem solved
its Ubuntu, you have to do chmod x+u *
to make all the .sh files executable
then
./rebuildall.sh
-
AuthorPosts
You must be logged in to reply to this topic.




