'Distribute Game': can't start linux file

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
marionline
Metal Slime
Posts: 673
Joined: Sat Feb 26, 2011 9:23 pm

'Distribute Game': can't start linux file

Post by marionline »

Hello!
There are problems with the linux file (dependencies) that the engine creates in the 'Distribute Game' menu.
What exactly are the dependencies to run this file?

If the dependencies are the same as for the OHR-Editor, where can I look them up?
The wiki is not very detailed (and talking about the editor): http://rpg.hamsterrepublic.com/ohrrpgce ... quirements.

I never noticed because I've got the game editor installed, but friends I gave the game to test it, can't start it. :o

They get errors like this:

Code: Select all

earlydemo-linux$ ./Magic_and_Monsters
./Magic_and_Monsters: error while loading shared libraries:
libSDL_mixer-1.2.so.0: cannot open shared object file: No such file or
directory
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

You used the 'Export Linux Tarball' option, which currently doesn't include the needed libraries (mainly SDL 1.2 and SDL-mixer 1.2). This is a known problem; if I find the time I would fix it. If your friends have Debian, Ubuntu, or one of the many GNU/Linux distros that are based on Debian or Ubuntu then you could use the 'Export Debian Linux Package' option instead.

Otherwise, to use the tarball, they will have to install the libSDL-mixer 1.2 (and maybe libSDL 1.2) 32bit libraries themselves. For example, if they are using Ubuntu or Debian they should run:

Code: Select all

sudo apt-get install libsdl1.2debian:i386 libsdl-mixer1.2:i386
Last edited by TMC on Sat Dec 31, 2016 1:01 pm, edited 1 time in total.
User avatar
marionline
Metal Slime
Posts: 673
Joined: Sat Feb 26, 2011 9:23 pm

Post by marionline »

It's good to learn that the error is known. :)


Here's another one. I used 'export Debian Linux Package'.
The option gives errors:
c_debug.txt wrote: OHRRPGCE callipygous+1 20160606.8060 gfx_sdl+fb/music_sdl FreeBASIC 0.90.1 (07-17-2013) Linux 32-bit
Runtime info: gfx_sdl "SDL 1.2.15 (0 joysticks) Driver:x11" music_sdl, SDL_Mixer 1.2.12 (22050Hz)
exepath: /usr/games, exe: /usr/games/ohrrpgce-custom
12-31-2016 15:07:01
curdir: /home/username
tmpdir: /home/username/.ohrrpgce/
settings_dir: /home/username/.ohrrpgce
Editing game /home/username/Magic_and_Monsters.rpg ( )
Full game data upgrade...
Last edited by: OHRRPGCE callipygous+1 20160606.8060 gfx_sdl+fb/music_sdl FreeBASIC 0.90.1 (07-17-2013) Linux 32-bit
archinym creation info: OHRRPGCE wip 20140225
Prepare package data files...
Copy rpg file
Copy linux game player
Create menu file
Create desktop file
Create docs
spawn_and_wait "/bin/gzip" "/home/username/debpkg.tmp/usr/share/doc/earlydemo/README.txt"
! ERROR: gzip completed but /home/username/debpkg.tmp/usr/share/doc/earlydemo/README.txt.gz was not created
spawn_and_wait "/bin/gzip" "/home/username/debpkg.tmp/usr/share/doc/earlydemo/LICENSE-CC-BY.txt"
! ERROR: gzip completed but /home/username/debpkg.tmp/usr/share/doc/earlydemo/LICENSE-CC-BY.txt.gz was not created
Calculate Installed-Size
Create debian-binary version file
Create debian control file
chmod +x "/home/username/debpkg.tmp/postinst"
chmod +x "/home/username/debpkg.tmp/postrm"
chmod -R g-w "/home/username/debpkg.tmp/control"
chmod -R g-w "/home/username/debpkg.tmp/postinst"
chmod -R g-w "/home/username/debpkg.tmp/postrm"
spawn_and_wait "/bin/gzip" "/home/username/debpkg.tmp/control.tar"
! ERROR: gzip completed but /home/username/debpkg.tmp/control.tar.gz was not created
! Could not create /home/username/debpkg.tmp/control.tar.gz
By the way: The Mac export also did not work. Yesterday (on another PC), it even said it might have corrupted the .rpg file.
Now I am told download does not work. Maybe that's two different bugs on two different PCs, (or something changed meanwhile?)
c_debug.txt wrote: spawn_and_wait "/usr/bin/wget" -N -P "/home/username/.ohrrpgce/_gameplayer" "http://hamsterrepublic.com/dl/ohrrpgce- ... mal.tar.gz"
! ERROR: Failed to download Mac OHRRPGCE
! ERROR: OHRRPGCE-Game.app is not available
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Gah!
From reading that debug log, I have no idea what is wrong, because it doesn't include the actual error messages. A few months ago I improved it so that it would print the error messages to the debug log, so could you please download a recent nightly build and try again?

However, lately I have been making major internal changes to the sprite editor, so there are likely to some bugs in that. (Unfortunately, old Linux nightlies weren't being archived, as other nightly builds are, so I can't link you to a previous one.)
By the way: The Mac export also did not work. Yesterday (on another PC), it even said it might have corrupted the .rpg file.
I'm not sure what you mean. When you or someone else ran the packaged game on a Mac it said the .rpg file might be corrupt? Or did you get the "Unsupported RPG file" error when starting it?
Last edited by TMC on Sat Dec 31, 2016 9:00 pm, edited 1 time in total.
User avatar
marionline
Metal Slime
Posts: 673
Joined: Sat Feb 26, 2011 9:23 pm

Post by marionline »

Hello and happy new year!

I tried to create a deb package with the nightly version (wip 20163112) on Linux Mint Mate.
Good thing, there was no error this time. :D
I had to install xterm and the libraries you spoke of (sudo apt-get install libsdl1.2debian:i386 libsdl-mixer1.2:i386) first to get the editor running. Bad thing, now there still is no error log. I'll try the deb-package next on a linux mint cinnamon live system.
And maybe I can try to reproduce the error.

About the Mac-Error, it still (somewhat?) exists in the nightly version (wip 20163112) on Linux Mint Mate.
Each times, I used the "Mac OS X App Bundle" in the "Distribute Game" Menu.
The editor asked it it could download the needed files, i said okay, it did.
After that there is this box:
Image
Followed by this box:
Image
But then it continued and made a mac-bundled game? :o
Image

c_debug.txt lookes like this:
---start_new_debug---
01-01-2017 18:00:16
curdir: /home/mint/Desktop
tmpdir: /home/mint/.ohrrpgce/
settings_dir: /home/mint/.ohrrpgce
Editing game /home/mint/Desktop/Magic_and_Monsters.rpg ( )
Full game data upgrade...
Last edited by: [[OHRRPGCE wip 20161231.8291 gfx_sdl+fb/music_sdl FreeBASIC 1.05.0 (01-31-2016) x86 Linux 32-bit]]
archinym creation info: OHRRPGCE wip 20140225
SHELL(which wine)=1
Prepare package data files...
Copy rpg file
Copy linux game player
Create menu file
Create desktop file
Create docs
spawn_and_wait "/bin/gzip" "/home/mint/Desktop/debpkg.tmp/usr/share/doc/earlydemo/README.txt"
spawn_and_wait "/bin/gzip" "/home/mint/Desktop/debpkg.tmp/usr/share/doc/earlydemo/LICENSE-CC-BY.txt"
Calculate Installed-Size
Create debian-binary version file
Create debian control file
chmod +x "/home/mint/Desktop/debpkg.tmp/postinst"
chmod +x "/home/mint/Desktop/debpkg.tmp/postrm"
chmod -R g-w "/home/mint/Desktop/debpkg.tmp/control"
chmod -R g-w "/home/mint/Desktop/debpkg.tmp/postinst"
chmod -R g-w "/home/mint/Desktop/debpkg.tmp/postrm"
spawn_and_wait "/bin/tar" -c --owner=root --group=root -f "/home/mint/Desktop/debpkg.tmp/control.tar" control postinst postrm
spawn_and_wait "/bin/gzip" "/home/mint/Desktop/debpkg.tmp/control.tar"
chmod -R g-w "/home/mint/Desktop/debpkg.tmp/usr"
spawn_and_wait "/bin/tar" -c --owner=root --group=root -f "/home/mint/Desktop/debpkg.tmp/data.tar" usr
spawn_and_wait "/bin/gzip" "/home/mint/Desktop/debpkg.tmp/data.tar"
spawn_and_wait "/usr/bin/ar" qcD "/home/mint/Desktop/earlydemo_2017.01.01_i386.deb" debian-binary control.tar.gz data.tar.gz
earlydemo_2017.01.01_i386.deb was successfully created!
SHELL(which wine)=1
Rename mac game player
spawn_and_wait "/usr/bin/wget" -N -P "/home/mint/.ohrrpgce/_gameplayer" "http://hamsterrepublic.com/ohrrpgce/nig ... mal.tar.gz"
! ERROR: killdir: refusing to delete directory '/home/mint/.ohrrpgce/_gameplayer/OHRRPGCE-Game.app'
! showerror: user continued
spawn_and_wait "/bin/gzip" -d -f "/home/mint/.ohrrpgce/_gameplayer/ohrrpgce-mac-minimal.tar.gz"
spawn_and_wait "/bin/tar" -x -f "/home/mint/.ohrrpgce/_gameplayer/ohrrpgce-mac-minimal.tar" OHRRPGCE-Game.app LICENSE-binary.txt
Copy rpg file
Create bundledgame file
spawn_and_wait "/usr/bin/zip" -r -9 "/home/mint/Desktop/earlydemo-mac.zip" *.app *.txt
earlydemo-mac.zip was successfully created!
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

A prosperous new year! :)

Oh, was xterm not installed? Yes, now I remember that the download won't work then. And also, that was the reason I added the better error checking in the first place, to figure out why downloads weren't working for someone. We ought to check whether xterm is installed and handle it properly.

Thanks, I get the same error, and will fix it. I'll also make it show a less scary error message if it can't cleanup some files.
Last edited by TMC on Mon Jan 02, 2017 12:50 pm, edited 1 time in total.
User avatar
marionline
Metal Slime
Posts: 673
Joined: Sat Feb 26, 2011 9:23 pm

Post by marionline »

So, xterm was (part of) the problem.
That explains why I got error messages on some Linux distros, while on others everything worked.

I looked at the source code (https://bitbucket.org/rbv/ohrrpgce-svn/ ... .sh?at=wip), and copy-paste-changed the line to check for wget to check for xterm:

Code: Select all

if [ ! -x "`which xterm`" ] ; then
  echo "xterm is not installed. Please install it first."
  exit 1
fi
Could such a script also check for the libsdl1.2debian:i386 and libsdl-mixer1.2:i386?
I couldn't figure out how to do that.

A less scary error message for the mac error sounds cool. :D
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Heh, that was an .sh I wasn't even aware we had.

I just added a check for whether xterm is installed:

Code: Select all

+ IF LEN(find_helper_app("xterm")) = 0 THEN
+  RETURN "Could not continue because xterm is not installed, please install it. For example run 'yum install xterm' or 'apt-get install xterm'."
+ END IF
find_helper_app is a function that runs 'which', it does nearly the same thing as the code that you posted, except in FreeBasic instead of shell scripts. Doing this sort of thing in a shell script is far, far easier.

SDL and SDL_mixer are libraries, not executables, so it isn't possible to use 'which', but it can be done in another way: running 'ldd' on the ohrrpgce-game file. It will print a line with the text "not found" if there is a library missing. A bit more difficult.

I hadn't thought of just checking and showing a helpful error message. It would be an easier temporary solution until we do include SDL/SDL_mixer. And even when we do include them, we will need to include a shell script anyway which causes those libraries to be used, so your idea is a good first step.
Post Reply