Writing a batch file for MacOSX

Started by Sormuras, April 22, 2006, 11:23:21

Previous topic - Next topic

Sormuras

Referring to http://lwjgl.org/installation.php#macosx and reading a lot of examples in the iNet, I came up with this start.command script. It took me already 2 days to change the suffix to .command instead of .sh. :)

#!/bin/sh
CP="-classpath .:classes:lwjgl.jar:lwjgl_util.jar"
VM="-Djava.library.path=native"
java $CP $VM mygame.Main


The similar start.bat works like hell and the Linux start.sh smooth as ice cream. So here are my questions:

1. Is the syntax correct?
2. Do I need to convert the line ending from CRLF to CR oder LF only?
3. Does "start.command" need an "executable flag"? If yes, how do I set under Windows with Ant? Like this?
   <fixcrlf srcdir="${dist}" eol="crlf" includes="*.bat" />
    <chmod dir="${dist}" perm="ugo+rx" includes="*.command" />
    <chmod dir="${dist}" perm="ugo+rx" includes="*.sh" />


Sor