Question
Error running source setup.sh
This is my first time to get in touch with flex at all. So I am a blind rookie, hungry fro some action. I had two problems sourcing the setup.sh
1. The source.sh was unable to find the flash player gz.
# 2. I dont have the default ant and jdk on my ubuntu. and it always points to the defaults where as I even set them in the environment for this session. The error trace is at the bottom of the post.
Solution to first problem: I gave a path for the player. Does this mean the path is incorrect in the current version
Solution to second problem: I am checking if the HOME paths are missing only then use the defaults otherwise dont.
Changes are as follows:
Currently I have solved like this, Applications compile and run fine.
It could be wrong and thats why I am posting here.
=============================================
# This was tested on Ubuntu
elif [ $OS = "Linux" ]; then
#If ANT_HOME is not there then take the default one.
if [ ! -d "$ANT_HOME" ]; then
ANT_HOME=/usr/share/ant
fi
#If JAVA_HOME is not there then take the default one.
if [ ! -d "$JAVA_HOME" ]; then
JAVA_HOME=`readlink /etc/alternatives/javac | sed -n 's/[\\\/]bin[\\\/]javac$//p'`
fi
# Add player PATH for reuse eliminate chances of copy errors.
PLAYER_PATH=in/player/10/lnx
# Don't unpack the player every time, unless it's been updated
find $PLAYER_PATH -name flashplayer ! -cnewer $PLAYER_PATH/flashplayer.tar.gz -exec rm {} \;
if [ ! -f "$PLAYER_PATH/flashplayer" ]; then
echo "setup.sh: Unpacking player to in/player/lnx/flashplayer"
tar zxf $PLAYER_PATH/flashplayer.tar.gz
mv flashplayer $PLAYER_PATH/flashplayer
fi
=============================================
Trace of errors from the console, faced before changes.
/media/data/dev/flex-sdk/branches/gumbo_alpha$ source setup.sh
find: in/player/lnx/flashplayer.tar.gz: No such file or directory
setup.sh: Unpacking player to in/player/lnx/flashplayer
tar: in/player/lnx/flashplayer.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
mv: cannot stat `flashplayer': No such file or directory
setup.sh: Setting default ANT_HOME=/usr/share/ant
setup.sh: Setting default JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
setup.sh: WARNING: ANT_HOME does not exist:
/usr/share/ant
1. The source.sh was unable to find the flash player gz.
# 2. I dont have the default ant and jdk on my ubuntu. and it always points to the defaults where as I even set them in the environment for this session. The error trace is at the bottom of the post.
Solution to first problem: I gave a path for the player. Does this mean the path is incorrect in the current version
Solution to second problem: I am checking if the HOME paths are missing only then use the defaults otherwise dont.
Changes are as follows:
Currently I have solved like this, Applications compile and run fine.
It could be wrong and thats why I am posting here.
=============================================
# This was tested on Ubuntu
elif [ $OS = "Linux" ]; then
#If ANT_HOME is not there then take the default one.
if [ ! -d "$ANT_HOME" ]; then
ANT_HOME=/usr/share/ant
fi
#If JAVA_HOME is not there then take the default one.
if [ ! -d "$JAVA_HOME" ]; then
JAVA_HOME=`readlink /etc/alternatives/javac | sed -n 's/[\\\/]bin[\\\/]javac$//p'`
fi
# Add player PATH for reuse eliminate chances of copy errors.
PLAYER_PATH=in/player/10/lnx
# Don't unpack the player every time, unless it's been updated
find $PLAYER_PATH -name flashplayer ! -cnewer $PLAYER_PATH/flashplayer.tar.gz -exec rm {} \;
if [ ! -f "$PLAYER_PATH/flashplayer" ]; then
echo "setup.sh: Unpacking player to in/player/lnx/flashplayer"
tar zxf $PLAYER_PATH/flashplayer.tar.gz
mv flashplayer $PLAYER_PATH/flashplayer
fi
=============================================
Trace of errors from the console, faced before changes.
/media/data/dev/flex-sdk/branches/gumbo_alpha$ source setup.sh
find: in/player/lnx/flashplayer.tar.gz: No such file or directory
setup.sh: Unpacking player to in/player/lnx/flashplayer
tar: in/player/lnx/flashplayer.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
mv: cannot stat `flashplayer': No such file or directory
setup.sh: Setting default ANT_HOME=/usr/share/ant
setup.sh: Setting default JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
setup.sh: WARNING: ANT_HOME does not exist:
/usr/share/ant
