GuideMe is written in Java and therefore also runs on Linux and Mac OSX. (I only tested Linux, but MacOSX should work in the same way). Only requirements are a recent Oracle Java installation.
Running
Download the latest windows binary package which can be found in the signature of philo (currently 3.8) create a new directory and unpack it there.
Remove the `Java` directory, change to `GuideMe_lib` and remove `*swt*.jar` and `*.dll`
Install the SWT libs: Go to https://download.eclipse.org/eclipse/downloads/ click on the latest release -> scroll down to the SWT binaries section -> download the archive for your platform (Linux, MacOSX and Windows are supported) -> unpack it and copy the .jar file (`swt.jar` in my case) to directory `GuideMe_lib`
Copy this script the the main directory and start it.
#!/bin/bash
jars=`ls GuideMe_lib/*.jar *.jar | while read a; do echo -n ":$a"; done`
java -cp .$jars org.guideme.guideme.App $@
Compiling
Go to https://github.com/guide-me/GuideMe and download the repository (I tested the `philo` branch which seems to be the newest one), create a new directory and unpack it there.
Link or copy the directory `GuideMe_lib` from the binary directory (see above) to the source directory
Copy this Makefile to the main directory and run 'make'.
Warnings can be ignored and `GuideMe.jar` should be build. Copy this file to the binary directory (see above) or find out which files are needed and copy them to the source directory.
Broken link checker
Here is a little utility which checks the .xml files for broken links. It's a bash script, i.e. it requires a Unix environment:
#!/bin/bash
TARGETS=targets.txt
FILES=files.txt
# rm -fr new
#1: xml file
#2: old string
#3: new string
fix () {
install -d new
inf=$1
outf=new/$1
if [ -f $outf ]; then
inf=$outf.orig
mv $outf $inf
fi
a=$(echo $2 | sed "s/\//\\\\\//")
b=$(echo $3 | sed "s/\//\\\\\//")
sed "s/$a/$b/" $inf > $outf
}
# generate list of targets
for f in *.xml; do
grep -i "<Page.*id=\"" $f | sed "s/.*id=\"//;s/\".*//"
done | sort -n > $TARGETS
# generate list of files
find -type f | sed "s/.\///" > $FILES
# check for non-existing files
for f in *.xml; do
(
(
grep -ni "<Image.*id=" $f
grep -ni "<audio.*id=" $f
) | sed "s/:.*id=\"/ /;s/\".*//"
grep -n "setAudio(\"" $f | sed "s/:.*setAudio(\"/ /;s/\".*//"
) | while read a b; do
if ! grep -q "$b" $FILES; then
r=`grep -i -m 1 "$b" $FILES`
if [ "$r" = "" ]; then
echo "$f($a): File not found '$b'"
else
echo "$f($a): Replacing '$b' by '$r"
fix $f $b $r
fi
fi
done
done
# check broken targets
for f in *.xml; do
grep -ni "target=\"" $f | sed "s/:.*target=\"/ /;s/\".*//" | \
while read a b; do
if [ ${b:0:1} = "(" ]; then
b=${b:1:-1}
bz=${b#*..}
ba=${b%..*}
b=$ba
# only check whether there is at least one valid target in range
while [ $b != - ] && [ $b -le $bz ]; do
if grep -q "$b" $TARGETS; then
b=-
else
let "b++"
fi
done
[ $b != - ] && echo "$f($a): No existing target within range '$ba..$bz'"
else
grep -q "$b" $TARGETS || echo "$f($a): Target '$b' does not exist"
fi
done
done
Usage: Copy this script and the main .xml file into the data directory of the tease and run the script. Case errors are are fixed automatically (file names under Unixes are case sensitive). The corrected files are written to the directory 'new'. The script also generates a sorted list of all targets ('targets.txt') which may be helpful.
Updates
2019-02-21: Broken link checker added
2019-02-22: Broken link checker updated: First version did not recognized all errors
Last edited by mantrid on Fri Feb 22, 2019 3:23 pm, edited 1 time in total.
GAsm -- A guide assembler with EStim support to generate interactive teases that run in a browser.
I wrote a small script which checks for broken links and fixes case errors (filenames under Unixes are case sensitive). Because I do not want of create another thread that no one reads I appended it to this topic (see the initial).
GAsm -- A guide assembler with EStim support to generate interactive teases that run in a browser.
Thank you for taking the time to post these excellent instructions!
Using Linux Mint, I also had to:
apt install libjson-simple-java
cp /usr/share/java/json-simple.jar GuideMe_lib
This allowed it to compile with warnings, but no errors.
When I run the startup script you included in your post, it pauses for 2-3 seconds, then drops back to the prompt. No errors or other messages, but no GuideMe either.
sbdx wrote: ↑Mon Aug 12, 2019 12:19 am
Thank you for taking the time to post these excellent instructions!
Using Linux Mint, I also had to:
apt install libjson-simple-java
cp /usr/share/java/json-simple.jar GuideMe_lib
You are compiling version 0.4.0 which has that additional dependency.
This version uses a new state file format, i.e. delete all .state files in the data directory.
There are a few dependencies which are not required at compiling time. But usually they cause error messages. If deleting state files does not work, first make sure that the binaries run:
Download and install Windows package for version 0.3.8 and convert it to Linux as mentioned in the initial post, test it
Upgrade it to 0.4.0 as described in this post and make sure that it work (delete .state files)
What Linux distro are you using?
Debian.
GAsm -- A guide assembler with EStim support to generate interactive teases that run in a browser.
FWIW I also got this to work on a Raspberry Pi 3B+ running the latest Raspbian "Buster" using the "Raspbian Buster with desktop and recommended software" image.
The RPI still uses a 32 bit OS, so the SWT download won't work here. Fortunately a version is available through the distro installer.
I got a dependency error I can not seem to get past. Lonf time Linux user, but not well versed in Java. Running Kubuntu 18 Bionic and getting no swt-win32-4626 in java.library.path error. From what I can tell of the /usr/share/java selection, I am missing some module or another to make this compatible. Running default Ubuntu Java:
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
computergeek wrote: ↑Sat Feb 01, 2020 5:12 pm
Running Kubuntu 18 Bionic and getting no swt-win32-4626 in java.library.path error.
See the initial post:
Install the SWT libs: Go to https://download.eclipse.org/eclipse/downloads/ click on the latest release -> scroll down to the SWT binaries section -> download the archive for your platform (Linux, MacOSX and Windows are supported) -> unpack it and copy the .jar file (`swt.jar` in my case) to directory `GuideMe_lib`
If that does not work, switch to Oracle Java before you try OpenJDK because their API's are not fully compatible.
GAsm -- A guide assembler with EStim support to generate interactive teases that run in a browser.
PsuedoxXx wrote: ↑Fri Feb 07, 2020 1:59 pm
Is there no way to build GuideMe_lib from scratch?
Probably not. GuideMe has a lot of strange dependencies and some of them may not be open source. (IMHO that could be avoided if GuideMe would produce HTML output which can be viewed in a browser)
PsuedoxXx wrote: ↑Fri Feb 07, 2020 1:59 pm
This seems sketchy, I don't want to use precompiled libs without knowing what's in them.
Correct, never allow programs that haven't compiled by yourself or a trustworthy and indepenent 3rd party unrestricted access to local resources. That's why GuideMe runs in a firejail sandbox on my computers. Alternatives are apparmor or a virtual machine.
GAsm -- A guide assembler with EStim support to generate interactive teases that run in a browser.
The source code is all here, you should be able to compile it up using eclipse.
It uses maven for the third party dependencies, which are all in the pom file. https://github.com/guide-me/GuideMe/tree/Philo
I wrote GuideMe partly to learn Java (the project was started in 2013), but work in c# now.
If I wrote it now I would probably write it in dotnet core and have the UI browser based
computergeek wrote: ↑Sat Feb 01, 2020 5:12 pm
I got a dependency error I can not seem to get past. Lonf time Linux user, but not well versed in Java. Running Kubuntu 18 Bionic and getting no swt-win32-4626 in java.library.path error. From what I can tell of the /usr/share/java selection, I am missing some module or another to make this compatible. Running default Ubuntu Java:
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
I have the same problem... Were you able to fix your issues after switching to Oracle? For me it does not change anything and I don't really know how to compile a Java Project from Eclipse.
Does anyone know how to deal with this?
In my case, I'm running on Lubuntu 18.04