20.06.2010, 16:31
(20.06.2010, 08:42)hvdwolf Wrote: Macosx: The macosx gpsbabel is located in "mac_os_x/x86/gpsbabel". The gpsbabel version is a Universal (i386/ppc) static compiled version and works as such after having set the execute bit. It does not work from inside routeConverter though. Maybe it is just as simple as setting the execute byte for gpsbabel inside the svn trunk.
I do set the execute bit. See BabelFormat:
private String considerShellScriptForBabel(String babel, String command) throws IOException {
if (Platform.isLinux() || Platform.isMac()) {
File shellScript = createShellScript(babel, command);
command = "/bin/sh " + shellScript.getAbsolutePath();
}
return command;
}
private File createShellScript(String babelPath, String command) throws IOException {
File temp = File.createTempFile("gpsbabel", ".sh");
temp.deleteOnExit();
BufferedWriter writer = new BufferedWriter(new FileWriter(temp));
writer.write("#!/bin/sh");
writer.newLine();
writer.write("`which chmod` a+x \"" + babelPath + "\"");
writer.newLine();
writer.write(command);
writer.newLine();
writer.flush();
writer.close();
return temp;
}
(20.06.2010, 08:42)hvdwolf Wrote: linux: The linux version is a dynamically compiled version. A linux binary is always dependent on the Linux distribution and the version of that distribution. It means that packing "a" linux gpsbabel into the linux jar is not usefull. It might be better to note on the download page (and in the FAQs?) that linux users should download the gpsbabel binary via the package manager for their distribution (synaptic/apt-get for Ubuntu, yam for Suse, etc. etc.).
To accomplish this, there is a lookup mechanism, that prefers a locally installed gpsbabel before calling the internal one.
(20.06.2010, 08:42)hvdwolf Wrote: I do not know for which linux version this gpsbabel was originally compiled, but it was compiled against a very old expat library which makes me think that the gpsbabel binary itself is very old as well. As it didn't run I couldn't do a version check.
I think I compiled it against Ubuntu 8.04, but I'm not sure.
(20.06.2010, 08:42)hvdwolf Wrote: @Christian: If you want to add this to the FAQs and you need some more info for the OSX or Linux way of working: just let me know and I write the neccessary info.
I'm somehow lost in this thread - what's the problem/question and what is the answer? Is this an FAQ or a problem I can fix in the code?
--
Christian
Christian
