Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A1B66D222 for ; Thu, 23 Aug 2012 16:17:12 +0000 (UTC) Received: (qmail 14128 invoked by uid 500); 23 Aug 2012 16:17:11 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 14086 invoked by uid 500); 23 Aug 2012 16:17:11 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 14078 invoked by uid 99); 23 Aug 2012 16:17:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Aug 2012 16:17:11 +0000 X-ASF-Spam-Status: No, hits=-1.3 required=5.0 tests=FRT_ADOBE2,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aharui@adobe.com designates 64.18.1.21 as permitted sender) Received: from [64.18.1.21] (HELO exprod6og108.obsmtp.com) (64.18.1.21) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Aug 2012 16:17:06 +0000 Received: from outbound-smtp-2.corp.adobe.com ([193.104.215.16]) by exprod6ob108.postini.com ([64.18.5.12]) with SMTP ID DSNKUDZXbZ3Ua859OPTy8/6u8M3uR6EB1tfG@postini.com; Thu, 23 Aug 2012 09:16:45 PDT Received: from inner-relay-4.eur.adobe.com (inner-relay-4b [10.128.4.237]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q7NGGibK025716 for ; Thu, 23 Aug 2012 09:16:44 -0700 (PDT) Received: from nacas01.corp.adobe.com (nacas01.corp.adobe.com [10.8.189.99]) by inner-relay-4.eur.adobe.com (8.12.10/8.12.9) with ESMTP id q7NGGTZ0023752 for ; Thu, 23 Aug 2012 09:16:43 -0700 (PDT) Received: from NAMBX02.corp.adobe.com ([10.8.127.96]) by nacas01.corp.adobe.com ([10.8.189.99]) with mapi; Thu, 23 Aug 2012 09:16:37 -0700 From: Alex Harui To: "flex-dev@incubator.apache.org" Date: Thu, 23 Aug 2012 09:16:34 -0700 Subject: Re: Getting Mustella to work. Thread-Topic: Getting Mustella to work. Thread-Index: Ac2BSi8ISe8kwDdZQN6o8s6rpZvfegAAHrFs Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-Entourage/13.11.0.110726 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org I think I found that quotes are ok even on Mac. Isn't the code that makes the initial command line building it up out of pieces? If so, I'd add the quotes as the initial command line is getting built up. You might need to test if quotes already exist in the piece. But anyway, let's table the actual work for that until we get the tests running. On 8/23/12 9:13 AM, "Peter Ent" wrote: > The code makes an initial command line, then separates them into String[]= . > A bit later it joins the String[] back to string, adds more arguments, an= d > splits it again. I think it sounds simpler than it is, but that's the gis= t > of it. I think the code should have been written to just create an > ArrayList of all the arguments and then turn that into an Array when read= y > to launch the compiler; that's how I would ultimately solve it. >=20 > --peter >=20 > On 8/23/12 12:01 PM, "Alex Harui" wrote: >=20 >> It might be better to figure out how to quote those entries. Why was it >> hard to do that as the command line gets built up? >>=20 >>=20 >> On 8/23/12 8:55 AM, "Peter Ent" wrote: >>=20 >>> Certainly appreciate the help. Here's a typical one when running >>> Mustella: >>>=20 >>> -debug -define=3DCONFIG::skaha,false >>>=20 >>> -compiler.fonts.managers=3Dflash.fonts.JREFontManager,flash.fonts.AFEFo= ntMa >>> na >>> ger,flash.fonts.BatikFontManager,flash.fonts.CFFFontManager >>> -source-path=3D/Users/pent/apache/flex/mustella/Assets >>> -includes=3DExcludeFileLocation -includes=3DSetShowRTE >>> -includes=3DSaveBitmapFailures >>> -includes=3Ddatagrid_properties_lockedColumnCount_mxml >>>=20 >>> -source-path=3D/Users/pent/apache/flex/mustella/tests/components/DataGr= id/D >>> at >>> aGrid_SparkSkin/Properties --allow-source-path-overlap=3Dtrue >>> -includes=3DSendResultsToRunner -includes=3DExitWhenDone -source-path= =3D. >>> -source-path=3D/Users/pent/apache/flex/mustella/../frameworks/ >>> -source-path=3D/Users/pent/apache/flex/mustella/as3/src/mustella >>>=20 >>> Try changing my path, "/Users/pent/apache/" to something like >>> "/Users/pent/apache with spaces/" to get a better example. >>>=20 >>> What happens in the code is that groups of these options may be coming >>> from the environment, so you might find "-debug >>> -define=3DCONFIG::skaha,false" being added as a single entity. Then cod= e >>> turns what it has at the moment into a String[] and passes that to >>> another >>> function that might add more arguments. If that function does, it will >>> turn the String[] back into a String, add the arguments, then turn it >>> back >>> into String[].=20 >>>=20 >>> But if you can make something that will convert the args into an >>> acceptable String[] it would be super-helpful. >>>=20 >>> Thanks! >>> --peter >>>=20 >>> On 8/23/12 11:44 AM, "Kessler CTR Mark J" >>> wrote: >>>=20 >>>> String.split(regexpattern) can match pretty much anything. Definitel= y >>>> would be able to comeup with a pattern to match embedded dashes. >>>>=20 >>>> I'll see if I can come up with something that can properly strip down = a >>>> completed command with arguments. If you would give me a more complex >>>> command line that would be great. I can test against it. >>>>=20 >>>> Currently my setup uses few command line arguments and instead adds to >>>> the "-load-config+=3Dmycustomconfig.xml" >>>>=20 >>>> -----Original Message----- >>>> From: Peter Ent [mailto:pent@adobe.com] >>>> Sent: Thursday, August 23, 2012 10:52 >>>> To: flex-dev@incubator.apache.org >>>> Subject: Re: Getting Mustella to work. >>>>=20 >>>> I tried something like that, but there are options like: -source-path= =3D >>>> with a hyphen in the option and a couple that begin with double >>>> hyphens. >>>> I started to switch over to String.split(" -") to break apart on the >>>> space+dash but then ran into this mysterious problem of mxmlc not >>>> liking >>>> the arguments it was given, even though, as far as I can tell, it was >>>> getting the same ones in the same order. Obviously that wasn't the >>>> case, >>>> but had trouble tracking it down, so it is on hold for now while we ge= t >>>> the tests to run, unless someone else wants to take a stab at it. >>>>=20 >>>> --peter >>>>=20 >>>> On 8/23/12 10:43 AM, "Kessler CTR Mark J" >>>> wrote: >>>>=20 >>>>> I'm not sure what Mustella is written in, but would something generic >>>>> like this work? >>>>>=20 >>>>> If a string needs to be turned into an array then maybe... Use the "-= " >>>>> as the first delimiter to break apart the options and use a temp >>>>> array. >>>>> Then use the "=3D" to break out the names from the values. >>>>>=20 >>>>> Keeping two arrays with the same number of elements. One array store= s >>>>> the argument name and the second argument value. >>>>>=20 >>>>> //Declare arrays/string >>>>> string [] saNames =3D {"Option1", "Option2", "Option3"}; string [] >>>>> saValues =3D {"My value with spaces", "test2", "test 3"}; string >>>>> sCombinedOptions =3D ""; >>>>>=20 >>>>> //Loop through all elements in arrays >>>>> for (;;) >>>>> { >>>>> //Combine names / values. >>>>> sCombinedOptions +=3D saNames[currentItem] + "=3D""" + >>>>> saValues[currentItem] + """ "; } >>>>>=20 >>>>>=20 >>>>> //Add the command line and options. >>>>> "path\mxmlc.exe" + " " + sCombinedOptions; >>>>>=20 >>>>>=20 >>>>> -----Original Message----- >>>>> From: Peter Ent [mailto:pent@adobe.com] >>>>> Sent: Thursday, August 23, 2012 9:33 >>>>> To: flex-dev@incubator.apache.org >>>>> Subject: Re: Getting Mustella to work. >>>>>=20 >>>>> That ought to work, but does not. The Mustella code pieces together a >>>>> large string with all of the options on it, then turns the string int= o >>>>> a String[] by using space as the delimiter. Thus >>>>>=20 >>>>> -source-path=3D"C:\Program Files\Common Files\Microsoft >>>>> Shared\MSInfo\MSInfo32.exe" >>>>>=20 >>>>> turns into >>>>> [] =3D -source-path=3D"C:\Program Files\Common [] =3D Files\Microsoft= [] =3D >>>>> Shared\MSInfo\MSInfo32.exe" >>>>>=20 >>>>> And it does this several times (turning the array into a string, >>>>> inserting other args, back to an array) to build up the argument list= . >>>>> Ultimately, the array of options is passed over to mxmlc to execute, >>>>> so >>>>> it does need to turn into an array of options. I was working on >>>>> putting >>>>> everything into an ArrayList but more and more code needed to change >>>>> and then I was getting errors from mxmlc saying parameters were being >>>>> mixed which I didn't understand since it was getting the same >>>>> parameters in the same order. >>>>>=20 >>>>> So I have to re-think the approach. >>>>>=20 >>>>> --peter >>>>>=20 >>>>> On 8/23/12 6:59 AM, "Kessler CTR Mark J" >>>>> wrote: >>>>>=20 >>>>>> I know this may sound silly, but windows deals with the spaces in >>>>>> path >>>>>> using quotes around the whole path. Is there something similar with >>>>>> Mustella? >>>>>>=20 >>>>>> So a windows command prompt example, I could do something like the >>>>>> following... >>>>>> "C:\Program Files\Common Files\Microsoft Shared\MSInfo\MSInfo32.exe" >>>>>>=20 >>>>>>=20 >>>>>> Whereas the old non spaced dos style naming convention would do this >>>>>> without quotes.. >>>>>> c:\progra~1\common~1\micros~1\msinfo\MSInfo32.exe >>>>>>=20 >>>>>>=20 >>>>>> r/s >>>>>> -Mark >>>>>>=20 >>>>>> -----Original Message----- >>>>>> From: Peter Ent [mailto:pent@adobe.com] >>>>>> Sent: Wednesday, August 22, 2012 9:20 >>>>>> To: flex-dev@incubator.apache.org >>>>>> Subject: Re: Getting Mustella to work. >>>>>>=20 >>>>>> I have not have luck solving the problem. It is much trickier than I >>>>>> anticipated. I am going to jump back into getting more tests to run >>>>>> and think more about the problem. Operating systems have allowed >>>>>> spaces in file names for many, many years and you'd think would be a= n >>>>>> easily solvable problem (or not even a problem at all). >>>>>>=20 >>>>>> --peter >>>>>>=20 >>>>>> On 8/21/12 11:12 PM, "Justin Mclean" >>>>>> wrote: >>>>>>=20 >>>>>>> Hi, >>>>>>>=20 >>>>>>> If the space path issue was fixed you have more to add. Any luck >>>>>>> with >>>>>>> that yet? >>>>>>>=20 >>>>>>> Justin >>>>>>=20 >>>>>=20 >>>>=20 >>>=20 >>=20 >> --=20 >> Alex Harui >> Flex SDK Team >> Adobe Systems, Inc. >> http://blogs.adobe.com/aharui >>=20 >=20 --=20 Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui