BlitzMax NG on Ubuntu/DebianDebian is actually untested but it really shouldn't be much different to Ubuntu. A new issue is that with the latest Ubuntu Blitzmax apps are now sandboxed. I don't know the correct solution to this yet but you should still be able to launch apps from the Terminal.
Install 32/64-bit dependenciesFirst update the packages list. These packages are correct for Ubuntu 16 but should also work for 14 and should be the same for 32 or 64-bit. The extra packages are for Gtkmaxgui, dbus was due to a missing dependency error.
sudo apt-get update
sudo apt-get install g++-multilib libglu1-mesa-dev libfreetype6-dev libxft-dev libxpm-dev libasound2-dev libpulse-dev libopenal-dev libxxf86vm-dev
sudo apt-get install libdbus-1-dev libwebkitgtk-dev libwebkitgtk-3.0-dev
You may want to use subversion as this lets you download single modules in
bah Maxmods with:
svn checkout https://github.com/user/repo/EDIT tree/master TO trunk/code.mod
Another tool you may want is apt-file, which lets you search for missing dependencies, see below.
sudo apt-get install subversion
sudo apt-get install apt-file
Install 32-bit in 64-bit dependenciesThese packages enable BlitzMax OS to build modules and console apps for NG but won't build Gtkmaxgui since Ubuntu 14. So if you want to build 32-bit linux apps you should definitely use a 32-bit linux, or VM.
sudo apt-get install g++-multilib libglu1-mesa:i386 libfreetype6:i386 libxft2:i386 libxpm4:i386 libasound2:i386 libpulse0:i386 libopenal1:i386
sudo apt-get install libwebkitgtk-1.0-0:i386
Search for dependenciesYou can use apt-cache to list what dependencies are installed or apt-file to list the paths of all files, you only need apt-file if you get errors like "No such file or directory" and the related package is installed, it helped me resolve Blitzmax compiler include paths. First you use "update" to build a cache then "search" for part of a name, look at the version numbers as you will need the right one. You can also use the
Ubuntu Packages site to search for dependencies, just type in the keyword and make sure you have the right distribution selected.
sudo apt-cache search libwebkitgtk
OR
apt-file update
apt-file search libwebkitgtk
Install BlitzMax OSDownload and extract
BlitzMax OS somewhere - or you can use
BlitzMax Legacy and go to the next step. We don't actually need to run install.bat so just copy "_src/linux_x86/bin" to the main folder and rename "mod/maxgui.mod" as we only need pub.mod and brl.mod for bcc and bmk.
If you do run the installer you may get an error about "ftheader.h: No such file or directory" so to resolve it edit fltkmaxgui.bmx and straight after "?Linux" add this line:
ModuleInfo "CC_OPTS: -I/usr/include/x86_64-linux-gnu/freetype2"
Build brl and pub MaxmodsDownload and extract the
brl Maxmods and
pub Maxmods to OS "mod", these allow you to build NG apps. Rename and replace the default brl and pub modules with these ones and build modules with threading to speed up bmk, if bmk or bcc don't build threaded then just build without threads.
cd blitzmax-os/bin
./bmk makemods -a -r
./bmk makemods -a -r -h
Build bmk and bcc NGDownload and extract the
bmk NG and
bcc NG source to OS "src", I like to rename “-master” to the generation it is, like “-ng” or “-os” so I don’t get confused. Build the apps and test they work with -v version number:
./bmk -v
./bcc -v
./bmk makeapp -a -r -h -t console ../src/bmk-ng/bmk.bmx
./bmk makeapp -a -r -t console ../src/bcc-ng/bcc.bmx
Install BlitzMax NGDownload and extract the
bmx-ng cross-compiler installer somewhere. Copy the OS "bin" folder over to NG and then copy the NG bcc and bmk plus core.bmk and make.bmk, also create an empty "lib" folder to avoid warnings. Don't run setup_install.script, just download and extract
brl NG and
pub NG, as the installer currently doesn’t finish setup and may delete bmk and bcc from "bin". In Terminal build the modules again, since threading is the default option in NG you don't need -h, also remember to always enable -w overload warnings in NG to skip non-critical errors:
cd ../../bmx-ng/bin
./bmk makemods -a -w -g x86
./bmk makemods -a -w -g x64
Build bmk and bcc NG in 64-bitIf you're in 32-bit linux the compilers are already 32-bit so skip this step. Otherwise extract or copy "bmk-ng" and "bcc-ng" over to NG "src", rebuild them in 64-bit and copy to the "bin" folder, this is not essential but it should be faster:
./bmk makeapp -a -r -w -g x64 -t console ../src/bmk-ng/bmk.bmx
./bmk makeapp -a -r -w -g x64 -t console ../src/bcc-ng/bcc.bmx
Build Maxgui NG and GtkmaxguiDownload and extract
maxgui NG to NG "mod" and build with:
./bmk makemods -a -w -g x86 maxgui
./bmk makemods -a -w -g x64 maxgui
Maxgui NG now contains Gtkmaxgui but if you're using Blitzmax OS and want to try Gtk+3 instead of the older, slower Gtk+ (v1) in bah.mod then download
gtk Maxmods and build with:
./bmk makemods -a gtk
If you have an older PC and can't use Gtk+3 then you can use subversion to checkout Gtk+ (v1) gtkmaxgui, gtkwebkitgtk and maxguitextareascintilla to "bah.mod" - or just download all of
bah and extract the modules. To use svn, just "cd" to where you want to download to, then remember to edit the git url part "tree/master" to "trunk":
cd ../mod
mkdir bah.mod
cd bah.mod
svn checkout https://github.com/maxmods/bah.mod/trunk/gtkmaxgui.mod
svn checkout https://github.com/maxmods/bah.mod/trunk/gtkwebkitgtk.mod
svn checkout https://github.com/maxmods/bah.mod/trunk/maxguitextareascintilla.mod
cd ../../bin
./bmk makemods -a bah
Build maxide NGDownload and extract
maxide NG to NG "src". Open maxide.bmx in a text editor and check it's importing the right Gtk+ modules. Then build the IDE, this compiles to the main folder:
./bmk makeapp -a -r -w -g x64 -t gui -o ../MaxIDE ../src/maxide-ng/maxide.bmx
What to do if NG is brokenIf you get an error building the latest modules or compilers you should have a look at the file and line and if you can't fix it then post a bug report to Brucey on
Github by opening a new issue on the related repository, or if you're not sure then by
email or posting to
Brucey's Modules board.
You should download the latest
release, any release from v0.70 onwards is fairly stable or try the older source I used:
bcc 0.90 and
bmk 3.18 (2017-06-20). In releases v0.87 and below threading will need enabled:
./bmk makemods -a -h -w -g x64