4 Replies Latest reply on Sep 6, 2012 12:59 PM by jason itb

    Compiling with compc.exe works but fails with compc.jar

    jason itb

      Using flex_sdk_4.1.0.16076A and compiled with compc.exe using following command line and works.

       

      compc +flexlib="%FLEX_HOME%\frameworks" -output=target/model.swc -load-config=generated/lib2ant-flex-config.xml -source-path=flex_src,generated/flex/src,"%FLEX_HOME%/frameworks/locale/en_US" -library-path="%FLEX_HOME%/frameworks/libs/datavisualization.swc","%FLEX_HOME%/frameworks /libs/flash-integration.swc","%FLEX_HOME%/frameworks/libs/utilities.swc","%FLEX_HOME%/fram eworks/locale/en_US","C:/repos/itbrepo/trunk/clear4/target/clear4.swc" -external-library-path="%FLEX_HOME%/frameworks/libs/player/10.0/playerglobal.swc","%FLEX_ HOME%/frameworks/libs/textLayout.swc","%FLEX_HOME%/frameworks/libs/osmf.swc","%FLEX_HOME%/ frameworks/libs/framework.swc","%FLEX_HOME%/frameworks/libs/spark.swc","%FLEX_HOME%/framew orks/libs/sparkskins.swc","%FLEX_HOME%/frameworks/libs/rpc.swc"

       

      output:

      Loading configuration file C:\repos\itbrepo\trunk\model\generated\lib2ant-flex-config.xml

      C:\repos\itbrepo\trunk\model\target\model.swc (540634 bytes)

       

       

       

      Using flex_sdk_4.1.0.16076A and compiled with compc.jar using following command line and fails.

       

      java -jar "%FLEX_HOME%\lib\compc.jar" +flexlib="%FLEX_HOME%\frameworks" -output=target/model.swc -load-config=generated/lib2ant-flex-config.xml -source-path=flex_src,generated/flex/src,"%FLEX_HOME%/frameworks/locale/en_US" -library-path="%FLEX_HOME%/frameworks/libs/datavisualization.swc","%FLEX_HOME%/frameworks /libs/flash-integration.swc","%FLEX_HOME%/frameworks/libs/utilities.swc","%FLEX_HOME%/fram eworks/locale/en_US","C:/repos/itbrepo/trunk/clear4/target/clear4.swc" -external-library-path="%FLEX_HOME%/frameworks/libs/player/10.0/playerglobal.swc","%FLEX_ HOME%/frameworks/libs/textLayout.swc","%FLEX_HOME%/frameworks/libs/osmf.swc","%FLEX_HOME%/ frameworks/libs/framework.swc","%FLEX_HOME%/frameworks/libs/spark.swc","%FLEX_HOME%/framew orks/libs/sparkskins.swc","%FLEX_HOME%/frameworks/libs/rpc.swc"

       

      output:

      Loading configuration file C:\repos\itbrepo\trunk\model\generated\lib2ant-flex-config.xml

      Error: null

       

      The command line args are all the same and from what I understand compc.exe calls compc.jar internally anyway.  Can someone point me in the right direction?  I tried all sorts of options to output more info but none worked.

        • 1. Re: Compiling with compc.exe works but fails with compc.jar
          Flex harUI Adobe Employee

          In the bin folder next to compc.exe is a unix shellscript call compc.  Open it in a text editor.  It might be setting up some JVM params you need.

          • 2. Re: Compiling with compc.exe works but fails with compc.jar
            jason itb Level 1

            Thanks for the reply.  I looked in there and have not noticed anything as I have set FLEX_HOME in my env vars.  I also tried the jvm args in the shell script without any success.  Btw I'm using Windows 7 so I am using compc.exe instead of the shell script but that was a good place to check.  I want to do the same check on compc.exe to see if there is anything getting set there as well... Is there a place where I can get the source code for compc.exe?  Thanks.

             

            compc shell source code below:

             

            #!/bin/sh

             

             

            ################################################################################

            ##

            ##  ADOBE SYSTEMS INCORPORATED

            ##  Copyright 2007 Adobe Systems Incorporated

            ##  All Rights Reserved.

            ##

            ##  NOTICE: Adobe permits you to use, modify, and distribute this file

            ##  in accordance with the terms of the license agreement accompanying it.

            ##

            ################################################################################

             

             

            #

            # compc launch script for unix.  On windows, compc.exe is used and

            # java settings are managed in jvm.config in this directory.

            #

             

             

            case `uname` in

                                CYGWIN*)

                                          OS="Windows"

                                ;;

                                *)

                                          OS=Unix

            esac

             

             

            D32=''

             

             

            if [ $OS = "Windows" ]; then

                      # set FLEX_HOME relative to compc if not set

                      test "$FLEX_HOME" = "" && {

                      FLEX_HOME=`dirname $0`/..

                          FLEX_HOME=`cygpath -m $FLEX_HOME`

                      }

             

             

            elif [ $OS = "Unix" ]; then

             

             

                      # set FLEX_HOME relative to compc if not set

                      test "$FLEX_HOME" = "" && {

                      FLEX_HOME=`dirname "$0"`/..

                      }

             

                      check64="`java -version 2>&1 | grep -i 64-Bit`"

                      isOSX="`uname | grep -i Darwin`"

             

                      if [ "$isOSX" != "" -a "$HOSTTYPE" = "x86_64" -a "$check64" != "" ]; then

                                D32='-d32'

                      fi

             

            fi

             

             

            # don't use $FLEX_HOME in this variable because it may contain spaces,

            # instead put it on the java args directly, with double-quotes around it

            VMARGS="-Xmx384m -Dsun.io.useCanonCaches=false  "

             

             

            java $VMARGS $D32 $SETUP_SH_VMARGS -jar "$FLEX_HOME/lib/compc.jar" +flexlib="$FLEX_HOME/frameworks" "$@"

            • 3. Re: Compiling with compc.exe works but fails with compc.jar
              Flex harUI Adobe Employee

              I’m not sure the source for the .exe if publicly available.  I’ll look again, but I didn’t find it on the first search.  Another option you have is to look at how compc is used in the ant scripts.

              • 4. Re: Compiling with compc.exe works but fails with compc.jar
                jason itb Level 1

                Ok thanks for the help.  Will look at some ant scripts, but if you can find the source for compc.exe that would be awesome.