Getting this to build on Linux
marcellmueller opened this issue · comments
Does anyone know if this is doable?
Okay after trying for a couple days I gave up and used Vmware to make a Windows virtual machine. Definitely not ideal but I really want to use zgb, I have it building out of my Dropbox folder so I just have to use Windows to build.
Anyways if any Linux users see this that could point me in the right direction that would be greatly appreciated. If not I'll make do! Thanks for creating zgb by the way, it is awesome.
I know it can be done (one of the guys in the zgbjam was using it) but never tried it myself. Sorry I can't help
This is a feature, not a but. I might take a look at it in the future
Sounds good, I'm still compiling my builds in VMware. I set my environment path correctly when I was trying it, I need to try building with an older version of make.
Building on Mac would be nice as well, I understand you're busy though. Either way I've been having fun with zgb, my project is coming along nicely :)
I have an interest in getting it to work under Linux. So in the name of documentation I'll chime in here even though it is closed.
Using directions from this forum thread + some additional edits, I got it to work on Linux Mint.
http://gbdev.gg8.se/forums/viewtopic.php?pid=3507
I think all of these are required, but I haven't tested on a completely clean system.
- Install sdcc with your package manager (it may also install sdcc-doc and sdcc-libraries)
sdasgb is at least one dependency that isn't in the SourceForge gbdk linux releases, but is in included with the OS package manager package.
- download gbdk-2.96a-i586-pc-linux2.2.tar.gz
(the 2.95-3 sdcc binary segfaults for me on Linux)
unpack to /opt/gbdk
2-A. Set:
GBDK_HOME="/opt/gbdk"
2-B.
nano -w /opt/gbdfev/gbdk
# SDCC_ROOT = /usr/lib/$(SDCC_OR_GBDK)
SDCC_ROOT = /opt/$(SDCC_OR_GBDK)
And/Or do...
sudo ln -s /opt/gbdk /usr/lib/gbdk
- git clone ZGB & ZGB template
git clone https://github.com/Zal0/ZGB.git
git clone https://github.com/Zal0/ZGB-template.git
3-A. Set:
ZGB_PATH="/gbdev/ZGB/common"
- Make some source changes
4-A. In the game Template, change all #includes with \ to / (e.g in StateGame.c)
4-B. in ZGB
common/src/Makefile
@@ -1,3 +1,8 @@
+PROJECT_NAME = Common
+include ../../common/src/MakefileCommon
+
+all: build_lib
common/src/MakefileCommon
@@ -1,5 +1,5 @@
ZGB_PATH_UNIX :=
-GBDK_HOME := $(ZGB_PATH_UNIX)/../env/gbdk
+#GBDK_HOME := $(ZGB_PATH_UNIX)/../env/gbdk
- Then use the makefiles to build the project:
Open up a terminal in ZGB/common/src/ and type make
Then go to ZGB-template/src and type make
This will then build the ROM and put it in ZGB-template/bin/
Thanks for the info
I'll take a look when I find some time and add proper support for Linux (and probably MacOStoo, since they are very similar)
5. Then use the makefiles to build the project: Open up a terminal in ZGB/common/src/ and type make Then go to ZGB-template/src and type make This will then build the ROM and put it in ZGB-template/bin/
Can confirm, this worked flawles on debian. Thanks @bbbbbr.