1 Reply Latest reply on Sep 10, 2010 10:14 AM by Flex harUI

    Compiling for MX only

    Richard Barber

      Hi,

       

      I'm trying to compile an existing Flex 3 project (using the MX components/Halo theme) with the Flex 4 SDK (we've got it working in Flash Builder, but this is a nant - unfortunately not ant! - based automated build script)

       

      I'm finding that when compiling my CSS styles to SWF, I'm unable to prevent the spark and sparkskins RSLs from being included in my compiled package. In Flash Builder, this seems to be as easy as ticking the "MX only" radio button in the compiler, but in mxmlc it doesn't seem so easy.

       

      I'm using the command line:

      mxmlc.exe src\appStyle.css -load-config+=compilerConfig.xml -theme=themes/Halo/halo.swc -o bin/appStyle.swf

       

      But regardless of what I add to the library-path and external-libraries sections of my compilerConfig.xml file, the generated .as file for mx.core.FlexModuleFactory contains the following:


          override    public function info():Object
          {
              return {
                  cdRsls: [{"rsls":["http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/textLayout_1.1.0.604.swz","textLayout_1.1.0.604.swz"],
      "policyFiles":["http://fpdownload.adobe.com/pub/swz/crossdomain.xml",""]
      ,"digests":["381814f6f5270ffbb27e244d6138bc023af911d585b0476fe4bd7961bdde72b6","381814f6f5270ffbb27e244d6138bc023af911d585b0476fe4bd7961bdde72b6"],
      "types":["SHA-256","SHA-256"],
      "isSigned":[true,true]
      },
      {"rsls":["http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/osmf_flex.4.0.0.13495.swz","osmf_flex.4.0.0.13495.swz"],
      "policyFiles":["http://fpdownload.adobe.com/pub/swz/crossdomain.xml",""]
      ,"digests":["c3306b26751d6a80eb1fcb651912469ae18819aba42869379acb17e49ec1f9f0","c3306b26751d6a80eb1fcb651912469ae18819aba42869379acb17e49ec1f9f0"],
      "types":["SHA-256","SHA-256"],
      "isSigned":[true,true]
      },
      {"rsls":["http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/framework_4.1.0.16076.swz","framework_4.1.0.16076.swz"],
      "policyFiles":["http://fpdownload.adobe.com/pub/swz/crossdomain.xml",""]
      ,"digests":["871f12af0853c06e4eb80a1ccab295ceadbb817ad3332c20b5d986d3db5bfe6d","871f12af0853c06e4eb80a1ccab295ceadbb817ad3332c20b5d986d3db5bfe6d"],
      "types":["SHA-256","SHA-256"],
      "isSigned":[true,true]
      },
      {"rsls":["http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/spark_4.1.0.16076.swz","spark_4.1.0.16076.swz"],
      "policyFiles":["http://fpdownload.adobe.com/pub/swz/crossdomain.xml",""]
      ,"digests":["6344dcc80a9a6a3676dcea0c92c8c45efd2f3220b095897b0918285bbaef761d","6344dcc80a9a6a3676dcea0c92c8c45efd2f3220b095897b0918285bbaef761d"],
      "types":["SHA-256","SHA-256"],
      "isSigned":[true,true]
      },
      {"rsls":["http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/sparkskins_4.1.0.16076.swz","sparkskins_4.1.0.16076.swz"],
      "policyFiles":["http://fpdownload.adobe.com/pub/swz/crossdomain.xml",""]
      ,"digests":["440ae73b017a477382deff7c0dbe4896fed21079000f6af154062c592a0c4dff","440ae73b017a477382deff7c0dbe4896fed21079000f6af154062c592a0c4dff"],
      "types":["SHA-256","SHA-256"],
      "isSigned":[true,true]
      },
      {"rsls":["http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/rpc_4.1.0.16076.swz","rpc_4.1.0.16076.swz"],
      "policyFiles":["http://fpdownload.adobe.com/pub/swz/crossdomain.xml",""]
      ,"digests":["6ddb94ae3365798230849fa0f931ac132fe417d1cab1d2f47d334f8a47d097a7","6ddb94ae3365798230849fa0f931ac132fe417d1cab1d2f47d334f8a47d097a7"],
      "types":["SHA-256","SHA-256"],
      "isSigned":[true,true]
      }]


       

       

      I've also tried spitting out the mxmlc config file from Flash Builder, using -dump-config, but this produces the same result. So, Flash Builder is clearly passing some other arguments to mxmlc when performing the build to prevent the spark and sparkskins.swcs being referenced. Does anyone have any ideas? This is crippiling me at the moment, as I get an error every time I load the SWF, looking for the 'components' resource bundle that isn't included, because nothing's referencing spark in the project.

       

      Yours fretfully, Richard