About Monkey 2 › Forums › Monkey 2 Programming Help › Making MSVC portable
Tagged: msvc
This topic contains 19 replies, has 6 voices, and was last updated by
Mark Sibly
1 year, 5 months ago.
-
AuthorPosts
-
September 11, 2017 at 9:16 pm #10406
UPDATE: This now works perfectly fine.
So feel free to use this.- Original post:
I move between a lot of computers, and I generally don’t like things that places files all over my computer.
And MSVC has always caused a lot of trouble for me when it comes to this.
So I’ve tried to get it portable by just copying the needed stuff into the Monkey 2 ‘devtools’ folder and edit the env txt.
I’ve got it working, but there’s an annoying problem with it only working with ‘fresh’ compiles.
Basically, you can compile once with MSVC in Ted2Go, but if you edit the code and try to compile again, it’ll complain about g++ not existing.
Perhaps anyone can help me with that?
- Portable MSVC:
You can grab my portable MSVC pack over at: http://hezkore.com/msvc/
All you have to do it unpack it in your ‘devtools’ folder and set the path in ‘env_windows.txt’
Here’s a simple 3 step guide, with an easy copy-paste config for ‘env_windows.txt’:
http://hezkore.com/msvc/instructions.txt
September 11, 2017 at 9:22 pm #10407The MSVC version still needs g++ to generate dependancies, so you’ll need this in devtools too.
September 11, 2017 at 9:26 pm #10408Alright, I’ve figured it out.
Turns out I forgot ;${PATH} at the very end!September 11, 2017 at 9:30 pm #10409Is your bin/env_windows.txt file correct, or have you set system PATH to mingw binaries?
Can you dump bin/env_windows.txt file here, along with full path to devtools.
September 11, 2017 at 9:31 pm #10410Sorry Mark
Read my previous post, I’ve updated itSeptember 11, 2017 at 9:34 pm #10411Turns out I forgot ;${PATH} at the very end!
Aha!
September 11, 2017 at 10:41 pm #10413I get the following error:
Mx2cc version 1.1.06
***** Making module ‘assimp’ *****
Parsing…
Semanting…
Translating…
Compiling…
gzclose.c
c:\monkey2-v1.1.06\modules\assimp\assimp\contrib\zlib\gzguts.h(29): fatal error C1083: Cannot open include file: ‘unistd.h’: No such file or directory
Build error: System command ‘cl -c -EHs -W0 -MT -Ox -DNDEBUG -I”C:/Monkey2-v1.1.06/modules/” -I”C:/Monkey2-v1.1.06/modules/monkey/native” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/include/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/code/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/unzip/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/irrXML/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/rapidjson/include/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/openddlparser/include/” -Fo”C:/Monkey2-v1.1.06/modules/assimp/assimp.buildv1.1.06/windows_release_msvc/build/_1_1_1assimp_2contrib_2zlib_2gzclose.c.obj” “C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/zlib/gzclose.c”‘ failed.cl -c -EHs -W0 -MT -Ox -DNDEBUG -I”C:/Monkey2-v1.1.06/modules/” -I”C:/Monkey2-v1.1.06/modules/monkey/native” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/include/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/code/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/unzip/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/irrXML/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/rapidjson/include/” -I”C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/openddlparser/include/” -Fo”C:/Monkey2-v1.1.06/modules/assimp/assimp.buildv1.1.06/windows_release_msvc/build/_1_1_1assimp_2contrib_2zlib_2gzclose.c.obj” “C:/Monkey2-v1.1.06/modules/assimp/assimp/contrib/zlib/gzclose.c”
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
***** Fatal mx2cc error *****
Internal mx2cc build error
Update modules failed.
Total time elapsed: 0 m 0 s.September 11, 2017 at 11:30 pm #10415That doesn’t seem to be related to my portable MSVC since ‘unistd.h’ comes with emscripten and mingw.
Make sure you have the Mingw-6.2.0 build tools for Windows along with Emscripten-1.37.9 build tools for Windows if you’re trying to compile for those.
You can find those under ‘Files’ here on the this webpage, though Mark hasn’t updated the links names to this webpage so you’ll have to correct that yourself heh.September 11, 2017 at 11:44 pm #10416This has been fixed in more recent versions of monkey2. There’s a new binary build on its way – this week sometime for sure!
September 12, 2017 at 3:46 am #10424As MSVC user I got a bit confused with upgrading monkey2 until the penny dropped that I would need to change some paths in common.bat to have _msvc suffix
Shell123456789101112131415set mx2cc=..\bin\mx2cc_windows.exeset mx2cc_new=..\src\mx2cc\mx2cc.buildv1.1.07\windows_release_msvc\mx2cc.exerem set mx2cc_new=..\src\mx2cc\mx2cc.buildv1.1.07\windows_release\mx2cc.exeset mx2cc_raspbian_new=..\src\mx2cc\mx2cc.buildv1.1.07\raspbian_release\mx2ccset ted2=..\bin\ted2_windowsrem set ted2_new=..\src\ted2\ted2.buildv1.1.07\windows_releaserem set ted2go_new=..\src\ted2go\Ted2.buildv1.1.07\windows_releaseset ted2_new=..\src\ted2\ted2.buildv1.1.07\windows_release_msvcset ted2go_new=..\src\ted2go\Ted2.buildv1.1.07\windows_release_msvcset launcher="..\Monkey2 (Windows).exe"rem set launcher_new=..\src\launcher\launcher.buildv1.1.07\windows_release\launcher.exeset launcher_new=..\src\launcher\launcher.buildv1.1.07\windows_release_msvc\launcher.exeNovember 10, 2017 at 8:12 am #11613@hezkore thanks for your prepared version!
I tried to repack files into 7z format and I got 252 mb, in zip it is 752 mb.
But… Less size + MORE expensive extraction time = small profit (or not).
I think it would be good to have precompiled msvc-ish version on itch.io.
November 10, 2017 at 2:55 pm #11618Yeah I did also pack it into 7z heh, problem was that I didn’t know if people actually use 7zip or if they just use the default Windows zip extractor, in which case they can’t open Rar or 7z.
So I just kept it as a Zip file to be sure everyone could use it.You can probably clean the content up a bit if you know what M2 actually uses from MSVC, I have no idea though so I just left everything in it.
I think if the itch.io version contains MSVC, it’d be a very big download and I don’t know if people would like that.
One thing you could do though is perhaps make a Ted2Go option where you can turn MSVC ‘on’, and if it doesn’t detect MSVC it downloads the zip (or 7z?) and extracts it into the ‘devtool’ folder for the user.
So people who want to use it can easily get it installed, but it’ll take a bit to download.November 10, 2017 at 5:17 pm #11619Maybe 7z compression by SFX format (self extracting).
November 10, 2017 at 5:29 pm #11620I tried optimizing the MSVC folder a bit, everything still compiles fine (at least on my machine)
You can probably cut out some other stuff too if you know what you’re doing.
I also made another attempt at compressing it and managed to get it down to about 50mb.It’s using the SFX format, so here’s an “installer”/self extracting version of it:
http://hezkore.com/msvc/portable_msvc_installer.exeI’ve updated the instructions, and the old zip version is still there (See first post)
November 11, 2017 at 3:08 am #11628Very nice file size.
- Original post:
-
AuthorPosts
You must be logged in to reply to this topic.