In Unix shells:
|
1 |
export MX2_MODULE_DIRS="/users/name/monkey2/mymodules/" |
You can add more than one directory. Separate the directories with a semicolon “;”:
|
1 |
export MX2_MODULE_DIRS="/users/name/monkey2/mymodules/;/users/name/monkey2/myothermodules/" |
I think on Windows OS it was the command SET:
|
1 |
SET MX2_MODULE_DIRS=d:\monkey2\mymodules |
Alternatively you can add the line to your env_linux.txt / env_macos.txt / env_windows.txt in bin/
|
1 |
MX2_MODULE_DIRS=/users/name/monkey2/mymodules/ |
Looking to get MX2 fully up and running, including Ted2go.
]]>I’m trying to get MX2 running on Samsung’s ‘Linux on Dex’. For anyone who doesn’t know, Linux on Dex is a full ARM Ubuntu installation on some of their high end phones.
The first thing that I notice is that echo $OSTYPE return linux-gnu instead of linux-gnueabihf. Hacking common.sh to force the raspbian version to run does get a little action, but it quickly bombs out. I can manually run mx2cc_raspbian with no issues (I get the default options message anyways)
Any ideas on how I can get this up and running on my Samsung phone? I actually use Dex and Linux on Dex a lot and this would give me a ton of productivity!
Here is the result of rebuildall.sh (after hacking common.sh to force the raspbian version to run)
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
dextop@localhost:~/monkey2/scripts$ ./rebuildall.sh ***** Rebuilding mx2cc ***** mx2cc version 1.0.9 ***** Making module 'monkey' ***** Parsing... Semanting... Translating... Compiling... Build error: System command 'arm-linux-gnueabihf-g++ -std=c++11 -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -O3 -DNDEBUG -I"/home/dextop/monkey2/modules/monkey/native" -I"/home/dextop/monkey2/modules/" -c -o "/home/dextop/monkey2/modules/monkey/monkey.buildv1.0.9/raspbian_release/build/_1src_2monkey_0monkey.cpp.o" "/home/dextop/monkey2/modules/monkey/monkey.buildv1.0.9/raspbian_release/src/monkey_monkey.cpp"' failed. arm-linux-gnueabihf-g++ -std=c++11 -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -O3 -DNDEBUG -I"/home/dextop/monkey2/modules/monkey/native" -I"/home/dextop/monkey2/modules/" -c -o "/home/dextop/monkey2/modules/monkey/monkey.buildv1.0.9/raspbian_release/build/_1src_2monkey_0monkey.cpp.o" "/home/dextop/monkey2/modules/monkey/monkey.buildv1.0.9/raspbian_release/src/monkey_monkey.cpp" /home/dextop/monkey2/modules/monkey/monkey.buildv1.0.9/raspbian_release/src/monkey_monkey.cpp:14:1: error: ‘bbInit’ does not name a type bbInit mx2_monkey_monkey_init("monkey_monkey",&mx2_monkey_monkey_init_f); ^ ***** Fatal mx2cc error ***** Internal mx2cc build error mx2cc version 1.0.9 ***** Building app '/home/dextop/monkey2/src/mx2cc/mx2cc.monkey2' ***** Parsing... /home/dextop/monkey2/src/mx2cc/builder.monkey2 [616] : Error : Expecting end of line /home/dextop/monkey2/src/mx2cc/block.monkey2 [31] : Error : Expecting expression but encountered 'else' /home/dextop/monkey2/modules/std/misc/digest.monkey2 [226] : Error : Expecting expression but encountered ' ' /home/dextop/monkey2/modules/std/misc/digest.monkey2 [227] : Error : Expecting end of line /home/dextop/monkey2/modules/std/audio/load_vorbis.monkey2 [32] : Error : Unexpected token 'internal' /home/dextop/monkey2/modules/std/audio/load_wav.monkey2 [100] : Error : Unexpected token 'internal' /home/dextop/monkey2/modules/std/graphics/pixmaploader.monkey2 [7] : Error : Unexpected token 'internal' /home/dextop/monkey2/modules/std/resource/resource.monkey2 [18] : Error : Unexpected token 'internal' cp: cannot stat 'mx2cc.products/mx2cc_raspbian': No such file or directory ***** Rebuilding modules ***** mx2cc version 1.0.9 ***** Making module 'monkey' ***** Parsing... Semanting... Translating... Compiling... Build error: System command 'arm-linux-gnueabihf-g++ -std=c++11 -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -O3 -DNDEBUG -I"/home/dextop/monkey2/modules/monkey/native" -I"/home/dextop/monkey2/modules/" -c -o "/home/dextop/monkey2/modules/monkey/monkey.buildv1.0.9/raspbian_release/build/_1src_2monkey_0monkey.cpp.o" "/home/dextop/monkey2/modules/monkey/monkey.buildv1.0.9/raspbian_release/src/monkey_monkey.cpp"' failed. arm-linux-gnueabihf-g++ -std=c++11 -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -O3 -DNDEBUG -I"/home/dextop/monkey2/modules/monkey/native" -I"/home/dextop/monkey2/modules/" -c -o "/home/dextop/monkey2/modules/monkey/monkey.buildv1.0.9/raspbian_release/build/_1src_2monkey_0monkey.cpp.o" "/home/dextop/monkey2/modules/monkey/monkey.buildv1.0.9/raspbian_release/src/monkey_monkey.cpp" /home/dextop/monkey2/modules/monkey/monkey.buildv1.0.9/raspbian_release/src/monkey_monkey.cpp:14:1: error: ‘bbInit’ does not name a type bbInit mx2_monkey_monkey_init("monkey_monkey",&mx2_monkey_monkey_init_f); ^ ***** Fatal mx2cc error ***** Internal mx2cc build error mx2cc version 1.0.9 ***** Making module 'monkey' ***** Parsing... Semanting... Translating... Compiling... Build error: System command 'arm-linux-gnueabihf-g++ -std=c++11 -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -Os -I"/home/dextop/monkey2/modules/monkey/native" -I"/home/dextop/monkey2/modules/" -c -o "/home/dextop/monkey2/modules/monkey/monkey.buildv1.0.9/raspbian_debug/build/_1src_2monkey_0monkey.cpp.o" "/home/dextop/monkey2/modules/monkey/monkey.buildv1.0.9/raspbian_debug/src/monkey_monkey.cpp"' failed. arm-linux-gnueabihf-g++ -std=c++11 -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -Os -I"/home/dextop/monkey2/modules/monkey/native" -I"/home/dextop/monkey2/modules/" -c -o "/home/dextop/monkey2/modules/monkey/monkey.buildv1.0.9/raspbian_debug/build/_1src_2monkey_0monkey.cpp.o" "/home/dextop/monkey2/modules/monkey/monkey.buildv1.0.9/raspbian_debug/src/monkey_monkey.cpp" /home/dextop/monkey2/modules/monkey/monkey.buildv1.0.9/raspbian_debug/src/monkey_monkey.cpp:14:1: error: ‘bbInit’ does not name a type bbInit mx2_monkey_monkey_init("monkey_monkey",&mx2_monkey_monkey_init_f); ^ ***** Fatal mx2cc error ***** Internal mx2cc build error ***** Rebuilding ted2go ***** mx2cc version 1.0.9 ***** Building app '/home/dextop/monkey2/src/ted2go/Ted2.monkey2' ***** Parsing... /home/dextop/monkey2/src/ted2go/MainWindow.monkey2 [77] : Error : Expecting expression but encountered '.' /home/dextop/monkey2/src/ted2go/MainWindow.monkey2 [80] : Error : Expecting 'end' but encountered 'endif' /home/dextop/monkey2/src/ted2go/MainWindow.monkey2 [85] : Error : Unexpected token '_docsManager' /home/dextop/monkey2/src/ted2go/MainWindow.monkey2 [87] : Error : Unexpected token 'if' /home/dextop/monkey2/src/ted2go/MainWindow.monkey2 [88] : Error : Unexpected token 'SaveState' /home/dextop/monkey2/src/ted2go/MainWindow.monkey2 [91] : Error : Unexpected token '_recentViewedFiles' /home/dextop/monkey2/src/ted2go/MainWindow.monkey2 [96] : Error : Unexpected token '_buildConsole' /home/dextop/monkey2/src/ted2go/MainWindow.monkey2 [98] : Error : Unexpected token '_buildConsole' /home/dextop/monkey2/src/ted2go/MainWindow.monkey2 [101] : Error : Locals can only be declared in a statement block /home/dextop/monkey2/src/ted2go/MainWindow.monkey2 [102] : Error : Unexpected token '_buildActions' /home/dextop/monkey2/src/ted2go/Tree.monkey2 [17] : Error : Expecting expression but encountered '.' /home/dextop/monkey2/src/ted2go/Tree.monkey2 [65] : Error : Expecting end of line /home/dextop/monkey2/src/ted2go/PathsProvider.monkey2 [17] : Error : Expecting expression but encountered '.' /home/dextop/monkey2/src/ted2go/PathsProvider.monkey2 [20] : Error : Expecting expression but encountered '.' /home/dextop/monkey2/src/ted2go/PathsProvider.monkey2 [64] : Error : Expecting expression but encountered '.' /home/dextop/monkey2/src/ted2go/view/ExamplesView.monkey2 [207] : Error : Expecting expression but encountered ' |
Being a long time Subversion user and new to Git, I’m wondering what the best approach would be for managing my own code within the monkey2 modules directory? Does someone have some kind of reasonable workflow they could share? For now I’m just using symbolic links, but I’m wondering if there is a better way?
Thanks!
]]>
Thanks!
]]>The only problem I got till now is endian.h on Mac (not system agnostic but every monkey2 system is “little endian” so you can bypass it) or sources that includes some other libs that are not especially available on every platform (not system agnostic again).
For non cross-platform things, I’ve seen no Limits.
Note that Unions, Generics and other things cannot be imported from C++ (Monkey2 is not C++). You’ll have to wrap it in some C++ code if you really need that part of your lib into monkey2. The frequent std::string and std::vector are a bit problematic and would deserve a convenience interfacing like CString/libc.char_t[] exists for const char*/char *.
My wrapper for box2d has successfully been tested on every available system I have (i.e. Windows, Mac, Linux, Android, IOS, Emscriptem). (box2d is C++)
]]>So I did take a look at the build references table, and it seems just list what file types Monkey2 can interface with. There’s really nothing, directly, indicating what exports each file type/language supports.
So right now, the easiest thing for me to ask is, if cross-compatible code is my goal then I should stick with Monkey2 and C++ as though both work on every export right now, right?
Thanks!
]]>