You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Paul Barnes-Hoggett <pb...@adobe.com> on 2007/06/12 18:15:50 UTC

Running .app on Mac OSX

Hi all,
 I have an ant script that's been working on Win XP, and I'm trying to get
it working on a Mac.

Basically, I want to run an app (its a swf player) that writes contents out
to a file, then closes. Ant waits till the process has finished, then reads
the file. So, on Win XP, this works:

<target name="runTest" description="runs the test harness"
depends="compileTest">
            <exec executable="${debugPlayer}" spawn="no" >
             <arg line="'${testHarness.swf}'"/>
            </exec>
</target>

But from what I have found on a mac, I have to use the 'open' command like
this:

    <target name="runtestosx" description="runs the test harness">
            <exec executable="open" spawn="no" >
                <arg line="${debugPlayer}}"/>
                 <arg line="'${testHarness.swf}'"/>
            </exec>
    </target>

The problem is that the ant script continues when the 'open' command
completes, not when the app actually closes.
Does anyone have any suggestions for how I might attack this problem? Quite
new to ANT, so any help would be much appreciated

Thx

PBH
    


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: [solved] Re: Running .app on Mac OSX

Posted by RADEMAKERS Tanguy <Ta...@swift.com>.
happy to help!

Regs,
/t 

>-----Original Message-----
>From: Paul Barnes-Hoggett [mailto:pbh@adobe.com] 
>Sent: Tuesday, June 12, 2007 9:25 PM
>To: Ant Users List
>Subject: [solved] Re: Running .app on Mac OSX
>
>Hi there,
> your solution worked great, thanks! I actually needed to add 
>a little extra
>into it so that I waited until the right content had been 
>written into the
>file:
>
><target name="testRunMac" depends="compileTest">
>         <parallel>
>             <exec executable="open" spawn="no">
>                  <arg line="${debugPlayer}"    />
>
>                 <arg line="'${testHarness.swf}'"/>
>
>             </exec>
>             <sequential>
>                 <waitfor>
>                     <available file="${ flashlog.location}"/>
>                 </waitfor>
>                 <waitfor>
>                     <isfileselected file="${flashlog.location}">
>                         <contains text="theTextIWant"/>
>                     </isfileselected>
>                 </waitfor>
>             </sequential>
>        </parallel>
>    </target>
>
>Re the other responses I got - I tried reaching into the .app on the
>terminal to launch the player, but unfortunately that didn't work.
>Re thr other response, the only options for 'open' are -a to 
>specify the
>app, and -e to open the file in textEdit
>
>Cheers all
>
>PBH
>
>
>On 6/12/07 12:29 PM, "RADEMAKERS Tanguy" <Ta...@swift.com>
>wrote:
>
>> Hello Paul,
>> 
>> You should be able to get around this by using the "waitfor" 
>task with a
>> nested "available" check on the output file.
>> 
>> Regs,
>> /t
>> 
>> 
>>> -----Original Message-----
>>> From: Paul Barnes-Hoggett [mailto:pbh@adobe.com]
>>> Sent: Tuesday, June 12, 2007 6:16 PM
>>> To: user@ant.apache.org
>>> Subject: Running .app on Mac OSX
>>> 
>>> Hi all,
>>> I have an ant script that's been working on Win XP, and I'm
>>> trying to get
>>> it working on a Mac.
>>> 
>>> Basically, I want to run an app (its a swf player) that writes
>>> contents out
>>> to a file, then closes. Ant waits till the process has
>>> finished, then reads
>>> the file. So, on Win XP, this works:
>>> 
>>> <target name="runTest" description="runs the test harness"
>>> depends="compileTest">
>>>            <exec executable="${debugPlayer}" spawn="no" >
>>>             <arg line="'${testHarness.swf}'"/>
>>>            </exec>
>>> </target>
>>> 
>>> But from what I have found on a mac, I have to use the 'open'
>>> command like
>>> this:
>>> 
>>>    <target name="runtestosx" description="runs the test harness">
>>>            <exec executable="open" spawn="no" >
>>>                <arg line="${debugPlayer}}"/>
>>>                 <arg line="'${testHarness.swf}'"/>
>>>            </exec>
>>>    </target>
>>> 
>>> The problem is that the ant script continues when the 'open' command
>>> completes, not when the app actually closes.
>>> Does anyone have any suggestions for how I might attack this
>>> problem? Quite
>>> new to ANT, so any help would be much appreciated
>>> 
>>> Thx
>>> 
>>> PBH
>>>    
>>> 
>>> 
>>> 
>---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>> For additional commands, e-mail: user-help@ant.apache.org
>>> 
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>> 
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


[solved] Re: Running .app on Mac OSX

Posted by Paul Barnes-Hoggett <pb...@adobe.com>.
Hi there,
 your solution worked great, thanks! I actually needed to add a little extra
into it so that I waited until the right content had been written into the
file:

<target name="testRunMac" depends="compileTest">
         <parallel>
             <exec executable="open" spawn="no">
                  <arg line="${debugPlayer}"    />

                 <arg line="'${testHarness.swf}'"/>

             </exec>
             <sequential>
                 <waitfor>
                     <available file="${ flashlog.location}"/>
                 </waitfor>
                 <waitfor>
                     <isfileselected file="${flashlog.location}">
                         <contains text="theTextIWant"/>
                     </isfileselected>
                 </waitfor>
             </sequential>
        </parallel>
    </target>

Re the other responses I got - I tried reaching into the .app on the
terminal to launch the player, but unfortunately that didn't work.
Re thr other response, the only options for 'open' are -a to specify the
app, and -e to open the file in textEdit

Cheers all

PBH


On 6/12/07 12:29 PM, "RADEMAKERS Tanguy" <Ta...@swift.com>
wrote:

> Hello Paul,
> 
> You should be able to get around this by using the "waitfor" task with a
> nested "available" check on the output file.
> 
> Regs,
> /t
> 
> 
>> -----Original Message-----
>> From: Paul Barnes-Hoggett [mailto:pbh@adobe.com]
>> Sent: Tuesday, June 12, 2007 6:16 PM
>> To: user@ant.apache.org
>> Subject: Running .app on Mac OSX
>> 
>> Hi all,
>> I have an ant script that's been working on Win XP, and I'm
>> trying to get
>> it working on a Mac.
>> 
>> Basically, I want to run an app (its a swf player) that writes
>> contents out
>> to a file, then closes. Ant waits till the process has
>> finished, then reads
>> the file. So, on Win XP, this works:
>> 
>> <target name="runTest" description="runs the test harness"
>> depends="compileTest">
>>            <exec executable="${debugPlayer}" spawn="no" >
>>             <arg line="'${testHarness.swf}'"/>
>>            </exec>
>> </target>
>> 
>> But from what I have found on a mac, I have to use the 'open'
>> command like
>> this:
>> 
>>    <target name="runtestosx" description="runs the test harness">
>>            <exec executable="open" spawn="no" >
>>                <arg line="${debugPlayer}}"/>
>>                 <arg line="'${testHarness.swf}'"/>
>>            </exec>
>>    </target>
>> 
>> The problem is that the ant script continues when the 'open' command
>> completes, not when the app actually closes.
>> Does anyone have any suggestions for how I might attack this
>> problem? Quite
>> new to ANT, so any help would be much appreciated
>> 
>> Thx
>> 
>> PBH
>>    
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Running .app on Mac OSX

Posted by RADEMAKERS Tanguy <Ta...@swift.com>.
Hello Paul,

You should be able to get around this by using the "waitfor" task with a
nested "available" check on the output file. 

Regs,
/t


>-----Original Message-----
>From: Paul Barnes-Hoggett [mailto:pbh@adobe.com] 
>Sent: Tuesday, June 12, 2007 6:16 PM
>To: user@ant.apache.org
>Subject: Running .app on Mac OSX
>
>Hi all,
> I have an ant script that's been working on Win XP, and I'm 
>trying to get
>it working on a Mac.
>
>Basically, I want to run an app (its a swf player) that writes 
>contents out
>to a file, then closes. Ant waits till the process has 
>finished, then reads
>the file. So, on Win XP, this works:
>
><target name="runTest" description="runs the test harness"
>depends="compileTest">
>            <exec executable="${debugPlayer}" spawn="no" >
>             <arg line="'${testHarness.swf}'"/>
>            </exec>
></target>
>
>But from what I have found on a mac, I have to use the 'open' 
>command like
>this:
>
>    <target name="runtestosx" description="runs the test harness">
>            <exec executable="open" spawn="no" >
>                <arg line="${debugPlayer}}"/>
>                 <arg line="'${testHarness.swf}'"/>
>            </exec>
>    </target>
>
>The problem is that the ant script continues when the 'open' command
>completes, not when the app actually closes.
>Does anyone have any suggestions for how I might attack this 
>problem? Quite
>new to ANT, so any help would be much appreciated
>
>Thx
>
>PBH
>    
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Running .app on Mac OSX (a bit O/T)

Posted by Martin Gainty <mg...@hotmail.com>.
Good Afternoon Paul

Trying to get this same scenario working in Flex ActionScript but can't get 
any information from Adobe on how to configure ActionScript in Apache
httpd.conf

M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "Paul Barnes-Hoggett" <pb...@adobe.com>
To: <us...@ant.apache.org>
Sent: Tuesday, June 12, 2007 12:15 PM
Subject: Running .app on Mac OSX


> Hi all,
> I have an ant script that's been working on Win XP, and I'm trying to get
> it working on a Mac.
>
> Basically, I want to run an app (its a swf player) that writes contents 
> out
> to a file, then closes. Ant waits till the process has finished, then 
> reads
> the file. So, on Win XP, this works:
>
> <target name="runTest" description="runs the test harness"
> depends="compileTest">
>            <exec executable="${debugPlayer}" spawn="no" >
>             <arg line="'${testHarness.swf}'"/>
>            </exec>
> </target>
>
> But from what I have found on a mac, I have to use the 'open' command like
> this:
>
>    <target name="runtestosx" description="runs the test harness">
>            <exec executable="open" spawn="no" >
>                <arg line="${debugPlayer}}"/>
>                 <arg line="'${testHarness.swf}'"/>
>            </exec>
>    </target>
>
> The problem is that the ant script continues when the 'open' command
> completes, not when the app actually closes.
> Does anyone have any suggestions for how I might attack this problem? 
> Quite
> new to ANT, so any help would be much appreciated
>
> Thx
>
> PBH
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Running .app on Mac OSX

Posted by David Weintraub <qa...@gmail.com>.
This may or may not work:

The *.app file is really a directory and not a single file. Sometimes,
I find the actual application that I can execute from the command line
inside the *.app directory. This even includes a few GUI applications
-- especially those that are Unix based.

Use the Terminal application to explore the *.app directory to see if
you can find the internal executable. Then, try to run that
application from the command line (i.e. directly in the Terminal
window without going through Ant). If you can, try running this app
from Ant.

On 6/12/07, Paul Barnes-Hoggett <pb...@adobe.com> wrote:
> Hi all,
>  I have an ant script that's been working on Win XP, and I'm trying to get
> it working on a Mac.
>
> Basically, I want to run an app (its a swf player) that writes contents out
> to a file, then closes. Ant waits till the process has finished, then reads
> the file. So, on Win XP, this works:
>
> <target name="runTest" description="runs the test harness"
> depends="compileTest">
>             <exec executable="${debugPlayer}" spawn="no" >
>              <arg line="'${testHarness.swf}'"/>
>             </exec>
> </target>
>
> But from what I have found on a mac, I have to use the 'open' command like
> this:
>
>     <target name="runtestosx" description="runs the test harness">
>             <exec executable="open" spawn="no" >
>                 <arg line="${debugPlayer}}"/>
>                  <arg line="'${testHarness.swf}'"/>
>             </exec>
>     </target>
>
> The problem is that the ant script continues when the 'open' command
> completes, not when the app actually closes.
> Does anyone have any suggestions for how I might attack this problem? Quite
> new to ANT, so any help would be much appreciated
>
> Thx
>
> PBH
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
--
David Weintraub
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Running .app on Mac OSX

Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
The open command may background the app. I would look at the command
line options for "open" to see if you can run the app in the foreground.
You could also look inside the application directory for the executable
and run that instead of open.

-Rob Anderson

> -----Original Message-----
> From: Paul Barnes-Hoggett [mailto:pbh@adobe.com] 
> Sent: Tuesday, June 12, 2007 9:16 AM
> To: user@ant.apache.org
> Subject: Running .app on Mac OSX
> 
> Hi all,
>  I have an ant script that's been working on Win XP, and I'm 
> trying to get it working on a Mac.
> 
> Basically, I want to run an app (its a swf player) that 
> writes contents out to a file, then closes. Ant waits till 
> the process has finished, then reads the file. So, on Win XP, 
> this works:
> 
> <target name="runTest" description="runs the test harness"
> depends="compileTest">
>             <exec executable="${debugPlayer}" spawn="no" >
>              <arg line="'${testHarness.swf}'"/>
>             </exec>
> </target>
> 
> But from what I have found on a mac, I have to use the 'open' 
> command like
> this:
> 
>     <target name="runtestosx" description="runs the test harness">
>             <exec executable="open" spawn="no" >
>                 <arg line="${debugPlayer}}"/>
>                  <arg line="'${testHarness.swf}'"/>
>             </exec>
>     </target>
> 
> The problem is that the ant script continues when the 'open' 
> command completes, not when the app actually closes.
> Does anyone have any suggestions for how I might attack this 
> problem? Quite new to ANT, so any help would be much appreciated
> 
> Thx
> 
> PBH
>     
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org