Page 1 of 1

Win-osx-linux zip version chmod +x problem

Posted: Wed Jun 06, 2012 9:50 am
by Keul
Hi,

Would be great to add :

Code: Select all

chmod u+x -R "`dirname \"$0\"`/lib/"
before the last "exec" line.

Zip files does not store exec flags. Wouldn't it be better to tell the user to check the "enable execution of the file as a program" on the launcher ".sh" than to say him to make a chown -R 755 or do it manually with the GUI?

the launcher ".sh" file would then be :

Code: Select all

#!/bin/sh

# We assume Darwin means Mac OS X. Sorry, Darwin guys.
if [ "x`uname -s`" = "xDarwin" ]; then
  dir=`dirname "$0"`
  dir=`cd "$dir"; pwd`
  base=`basename "$0"`

  export RENPY_LAUNCHER_DIR="$dir"

  if [ -e "$dir/${base%.sh}.app/Contents/MacOS/${base%.sh}" ] ; then
      launcher="$dir/${base%.sh}.app/Contents/MacOS/${base%.sh}"
  else
      launcher="$dir/${base%.sh}.app/Contents/MacOS/Ren'Py Launcher"
  fi

  exec "$launcher" "${0%.sh}.py" "$@"
fi

chmod u+x -R "`dirname \"$0\"`/lib/"
exec "`dirname \"$0\"`/lib/python" "-OO" "${0%.sh}.py" "$@"

Re: Win-osx-linux zip version chmod +x problem

Posted: Wed Jun 06, 2012 10:26 am
by PyTom
Keul wrote:Zip files does not store exec flags.
The format supports it, and the zip files generated by Ren'Py should set the executable bit in the appropriate places. Are you having problems with this?

Re: Win-osx-linux zip version chmod +x problem

Posted: Wed Jun 06, 2012 3:00 pm
by Keul
I have a custom icon for the .exe, so I re-compress it with 7z, who isn't able to set it under windows :/

Re: Win-osx-linux zip version chmod +x problem

Posted: Wed Jun 06, 2012 3:46 pm
by AnthonyHJ
If your web-server is Linux based, you can upload the contents of the zip and compress it on the server.

Alternatively, assuming you don't want to dual-boot, I think you could just install Cygwin and compress it from the command line.

Re: Win-osx-linux zip version chmod +x problem

Posted: Thu Oct 11, 2012 5:59 am
by Keul
I was using ressource editors to change the icons but I found a simpler solution:
http://www.renpy.org/wiki/renpy/doc/FAQ ... s_icons.3F