Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
Adobe Flex SDK 4.5.1 (Release)
-
None
-
None
-
Affected OS(s): Windows
Affected OS(s): Windows
Language Found: English
Description
Steps to reproduce:
1. Cygwin environment, run these commands:
set FLEX_HOME=/cygdrive/d/Flex/SDK/4.5.1
export PATH=$PATH:$FLEX_HOME/bin
2. Type mxmlc and hit enter
Actual Results:
"Unable to access jarfile /cygdrive/d/Flex/SDK/4.5.1/lib/mxmlc.jar"
Expected Results:
The normal flex compiler bootstrap message
Workaround (if any):
Run mxmlc.exe directy (Ugly)
Fix:
Change bash script file: $FLEX_HOME/bin/mxmlc
from this:
if [ $OS = "Windows" ]; then
- set FLEX_HOME relative to mxmlc if not set
test "$FLEX_HOME" = "" && { FLEX_HOME=`dirname $0`/.. FLEX_HOME=`cygpath -m $FLEX_HOME` }
to this:
if [ $OS = "Windows" ]; then
- set FLEX_HOME relative to mxmlc if not set
test "$FLEX_HOME" = "" && { FLEX_HOME=`dirname $0`/.. }FLEX_HOME=`cygpath -m $FLEX_HOME`
reason:
The cygpath path must always be calculated, not only when the FLEX_HOME is empty.
It is not that easy though, because a previously set FLEX_HOME environment variable can come from 2 places in cygwin.
One is from Windows environment directly.
The other is from cygwin bootstrap.
kosher solutions:
hard: Detect if path is not cygwin path the call cygpath over it, otherwise leave it alone as it is an Windows path
easy: Never rely on existing paths, always overwrite FLEX_HOME as dirname $0`/..