Win-osx-linux zip version chmod +x problem

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
Keul
Regular
Posts: 49
Joined: Wed May 06, 2009 3:42 am
Location: France - Strasbourg
Contact:

Win-osx-linux zip version chmod +x problem

#1 Post by Keul » Wed Jun 06, 2012 9:50 am

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" "$@"

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

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

#2 Post by PyTom » Wed Jun 06, 2012 10:26 am

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?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Keul
Regular
Posts: 49
Joined: Wed May 06, 2009 3:42 am
Location: France - Strasbourg
Contact:

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

#3 Post by Keul » Wed Jun 06, 2012 3:00 pm

I have a custom icon for the .exe, so I re-compress it with 7z, who isn't able to set it under windows :/

User avatar
AnthonyHJ
Regular
Posts: 103
Joined: Thu May 03, 2012 3:46 pm
Projects: Past Mistakes
Organization: Freya's Aett
Location: Milton Keynes, UK
Contact:

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

#4 Post by AnthonyHJ » Wed Jun 06, 2012 3:46 pm

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.
Recent work - iSchool Dreams: First Semester / iSchool Dreams: My Valentine (iPhone / iPad, dating sims)

User avatar
Keul
Regular
Posts: 49
Joined: Wed May 06, 2009 3:42 am
Location: France - Strasbourg
Contact:

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

#5 Post by Keul » Thu Oct 11, 2012 5:59 am

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

Post Reply

Who is online

Users browsing this forum: No registered users