Forum Replies Created
-
AuthorPosts
-
It would be a real luxury if ted2 could make exe’s on Linux too
It should be possible to use the mingw64w cross-compiler, but there could be a few caveats.
- The cross-compiler chosen has to be able to compile the generated C++, so it has to support any C++11 features Mark has implemented. This is tricky on Linux as each distribution and their release will use a version of GCC that they consider to be stable at the time of release. Installing a different one requires a bit of work.
- You will need to ensure that you have compatible Windows versions of any external dynamic link library built and setup in the search path.
- Both mx2cc and Ted2 will need to be modified. mx2cc will have to be tricked as it were, into believing that it was compiling in a Windows environment. Ted would just need a few addition menu items to pass a cross-compile switch to mx2cc.
- You will need WINE installed to test out cross compiled application, but the WINE configuration files will need to be manually tweaked to stop issues where key run-time dynamic link libraries cannot be found.
As an example check out https://github.com/dawlane/dawlane-monkeyx-custom
Note that you will have to build the MonkeyX stuff from scratch.
Well after a lot of swearing with installing the wrong nvidia drivers and fighting with the xorg config file. I’ve finally got ArchLinux installed on the old Sony AR laptop with all the hardware . So far 1.0.8 is working.
@arpie: Not everyone will want to use git. But I do believe that a git repository can store the file permissions. I think that you use git config core.filemode true or was it git bundle with a meta file? It been a while since I used git.
In any case I would just write a script to automate the task of cloning and setting permissions. If I want to be really lazy. I would just use the command line and use recursive option parameter with chmod, chgrp and chown.
Works in debug, but not release. Sound very much like BlitzMax under Linux with the later versions of GCC greater than 4.8.4. If I remember ArchLinux is a rolling release and would be using GCC 6.1.
@Mark: I would look at installing Manjaro as it’s based off ArchLinux and a hell of a lot simpler to setup, but still a pain when it comes to updates breaking the system.
If you don’t already know to see what optimisation are enabled by the -Ox switch use (x being the switch number:
Monkey1gcc -Ox -Q --help=optimizersto isolate individual optimisations use
Monkey1234gcc -O1 -Q --help=optimizers -xc - < /dev/null | grep vrp-ftree-vrp [disabled]gcc -O2 -Q --help=optimizers -xc - < /dev/null | grep vrp-ftree-vrp [enabled]Due to how mx2cc works, passing the -S option as part off the GCC command line to stop generation at the assembly stage will not work. You have to use objdump on a binary with symbols not stripped.
Monkey12objdump -S -d <app> > dump.txtOn a side note, another of Linux’s quirks annoys me every time I do a fresh Monkey install. All the *.sh files in /scripts, and the binary /bin/mx2cc all require the exec flag setting before I can run them(chmod a+x …).
If you download it as zip archive; then execute permissions are not saved. The same should be for cloning off of git.
Me being me. All I did was write a script to do the dirty work.
if [ -f master.zip ]; then rm -r master.zip; fi
if [ -d monkey2 ]; then rm -rf monkey2; fiwget -q https://github.com/blitz-research/monkey2/archive/master.zip
unzip master.zip
mv monkey2-master monkey2
SCRIPT_DIR=”$( cd “$( dirname “$0″ )” && pwd )”
ln -s $HOME/monkeyx/MonkeyX $SCRIPT_DIR/monkey2/devtools/MonkeyXFree86c
cd monkey2/scripts
chmod +x *
./rebuildall.sh@Mark: You will only see output if there are errors with -fsanitize. If, anything. I would be looking at why Jack is a requirement. That to me would seem to be the problem.
You have to be a hard core Linux user to be able to set the Arch Linux distribution up correctly.
I would suspect that it depends on what directory you were in when the process was started. At a guess you ran the program via the IDE, so try changing directory into where the application is.
Edit: Or use the command Mark has mentioned.
had to add sdl2-dev to the libs.
If you are having to add the sdl development libraries then there is something wrong. You shouldn’t need to add the libsdl2-dev libraries, as the mx2 SDL module has it’s own source code copy with fixes.
This should be all you need to get up and running on Ubuntu/Linux Mint/Debian.
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install g++-multilib libglu1-mesa-dev libopenal-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev libxxf86vm-dev libx11-dev libgl1-mesa-dev libpulse-dev
To be fiar, that guide is very complex, there is lots of stuff in there that doesn’t apply to M2.
With Mark’s cross-platform tools, there is no simple way to do the installation; hence the complex guide that has to go into some detail. Any tool that tries to automate the installation of external libraries and tools will fail at some point through lack of regular updates.
Should I install some other things before launching rebuildall.sh?
You will find notes on how to setup Monkey2 in the MonkeyX guide.
Note that the guide is slightly out of date for Monkey2, as the scripts are now in their own directory and there is a Ted2.
The sections you need from the guide are Installing Packages On Debian Based Linux Distributions and Monkey2 Setup Notes. Some of the fun stuff like desktop launches will not work with Monkey2 yet.
wich version of linux is best for monkey2 dev? Should I install it in English?
You can install any language version of a Linux distribution you like, but stick to one of the Ubuntu/Debian based distributions. But remember that generally all tools will use English for output text.
@Mark: This is one of the things that needs to be explained in the language docs.
I take it Richard that you didn’t click on the HWE August 2016 link? It relates to the support for a particular kernel with a particular DVD ISO release (aka point of release). They are basically saying, “If you have one of these point of releases installed; then you should consider upgrading the kernel or download a new point of release DVD ISO”. Linux Mints updater allows you to switch between kernels much easier than Ubuntu, but any kernel module drivers have to be rebuilt.
As you can see from the graph charts in the link. The next point of release DVD ISO for 14.04 will be 14.04.5 supported until April 2019. If you have the original release with the 3.13 kernel (14.04/14.04.1). Then you do not have to worry about it. All LTS versions are supported for five years. So any software you download from the repository tailored for that LTS version will get updates.
Here’s another web page for you to have a look at.
I’m interested in maintaining kernel compatibility on Monkey 2 applications I build so I’m thinking that I should stick with 14.04 LTS in that regard for a while longer. I’m fairly new to Linux so I could use some advice.
If that was the case; then you should be using a distribution that’s running the 3.13 kernel. What matters most for distribution, is which version of glibc/libstdc++ was used to build applications.
- A struct is a ‘value type’, whereas a class is a ‘reference type’. This means that when you assign a struct to a variable, pass a struct to a function or return a struct from a function, the entire struct is copied in the process. —– what does this mean ?
I will assume here that Mark is saying that the struct data type in MX2 is being passed by value. Very expensive in time and memory when you pass a large data object to and from a function or method, as the whole data object is copied to the stack.
Where as a data object that’s being passed by reference will only need the address of the object in memory to be copied onto the stack. A lot faster and more memory efficient.
July 18, 2016 at 8:07 am in reply to: V1.0.1 and V1.0.2 give "VCRUNTIME140.dll is missing" when launching Ted2 #2253Make sure that you have Microsoft Visual C++2015 redistributable run-time installed.
@therevills: What Mark has said relates to Monkey2 Structs, not C/C++ structs. The mx2cc compiler from what I can see, outputs Monkey2 Classes as a C/C++ struct. But when you initialise that Monkey2 Class for use, it gets allocated to the memory heap via GC. Monkey2 Structs gets put onto the memory stack.
Basically both Monkey2 Classes and Structs become C/C++ structs. What gets allocated to the heap depends on whether is a Monkey2 Class or not. Which I think was the answer you was looking for with your topic title.
In any computer language you should never go mad and put everything on the memory stack. The stack has a size limit and exceeding this limit will crash the application or if your unlucky the Operating System as well.
Both structs and class can be allocated to the heap. There’s very little difference between a struct and a class. My C/C++ is rusty, but if I remember the other difference apart from public/private, is to do with template<>. You could do template<class T>, but not template<struct T>.
-
AuthorPosts