shoes/shoes — Issue #168: Set env variable pointing to home dir
Author: nachokb
Created: 2011-12-12 14:51:12+00:00
State: open

When you package a Shoes app, the script gets embedded in a container which runs in the target platform (tried on Windows). It basically unpacks the script in a temp dir and runs it.

Inside the script however, Dir.pwd points to the temp dir. I couldn't find any way to get the real "current directory" which would be the directory the users executed the exe package (and similar in different platforms).

A simple way, I think, would be to update the runtime to set an env variables, somethings like ENV['SHOES_APP_DIR'] or Shoes.app_dir or something...

This is useful to access files which can be distributed besides the package (e.g. a conf file).

nachokb