HomeForumsWhat's newResources 
 
 
Setting Up Linux Dev Environment?
slinga - Aug 7, 2019
 slinga Aug 7, 2019
Hi all,

I'm interested in making an entry for the Saturn programming contest. What's the easiest way to get a dev environment setup on Linux? Jo Engine claims support for Linux, but it's not obvious to me how to use it. Any advice? Thanks in advance.

 mrkotfw Aug 11, 2019
What steps have you taken? Have you cloned the repo?

 slinga Aug 28, 2019
Sorry for the delayed reply. Yes I cloned the git repo:

git clone johannes-fetz/joengine...

In /jo/joengine/Compiler/SH_NONE_ELF/bin there appears to be a compiler sh-none-elf-gcc-8.2.0. I think tried to compile a empty main file that includes jo/jo.h:

./sh-none-elf-gcc-8.2.0 main.c -I ~/jo/joengine/jo_engine

And that fails. Any advice? Thanks in advance.

 antime Aug 29, 2019
What fails? How? What errors do you get?

 slinga Aug 30, 2019
Hi Antime,

The first errors are related to #defines:
Code:
  
error: #error "JO_FRAMERATE must be greater than zero"
error: #error "JO_FRAMERATE must be greater than zero"

At the command line I tried defining those two values:

Code:
  
./sh-none-elf-gcc-8.2.0 main.c -I ~/jo/joengine/jo_engine -DJO_FRAMERATE=30 -DJO_MAX_SPRITE=10

But now I get other errors:

Code:
  
jo/joengine/jo_engine/jo/sprites.h: In function 'jo_sprite_get_width':
jo/joengine/jo_engine/jo/sprites.h:369:39: error: 'jo_texture_definition' {aka 'struct '} has no member named 'width'
     return (__jo_sprite_def[sprite_id].width);

Lots of those. So not quite sure what's going on.

 antime Aug 31, 2019
Can you build one of the bundled demo apps?

 slinga Sep 2, 2019
Thank you, it was embarrassingly simple. All I had to do was run "compile.sh" in one of the sample dirs.

 vexatious Sep 19, 2019

slinga said:



Unfortunately there isn't a straight forward way. Each variant of Linux has a different system. Slackware is possibly easiest since you just write a .SlackBuild and let it compile the program; Slackware is pretty much a GNU BASH driven system so it's transparent to GNU Linux.

I'd recommend you make a .spec file for rpmbuild, for rpm based Linux variants. Or at least an Ebuild for Gentoo's Portage.

 slinga Sep 20, 2019
Actually it was pretty simple for me on Linux Mint:


  
	
	
git clone johannes-fetz/joengine...
cd joengine/Samples/demo\ -\ sonic/
./compile.sh


And that successfully compiled the demo and created an .ISO for me.

 vexatious Sep 20, 2019
That's great things worked for you. Usually you want a sane resulting installable program so you can avoid git and keep track of installed software (e.g. deb, rpm, tbz2, txz, etc). Integrity keeps things transparent under Linux; Linux can be nasty against user preference.

EDIT:
You said any dev environment under Linux so not just Joengine? Consider "Codewarrior" version 4; this one and some others work in Linux.