]> git.proxmox.com Git - extjs.git/blob - extjs/examples/modern/stockapp/.sencha/app/find-cmd-impl.xml
add extjs 6.0.1 sources
[extjs.git] / extjs / examples / modern / stockapp / .sencha / app / find-cmd-impl.xml
1 <project name="find-cmd-impl">
2 <!--
3 Run "sencha which" to find the Sencha Cmd basedir and get "cmd.dir" setup. We
4 need to execute the command with curdir set properly for Cmd to pick up that we
5 are running for an application.
6 -->
7 <target name="find-cmd-in-path" unless="cmd.dir">
8 <exec executable="sencha"
9 dir="${basedir}"
10 failifexecutionfails="false"
11 outputproperty="exec.error">
12 <arg value="which"/>
13 <arg value="-p=cmd.dir"/>
14 <arg value="-o=$cmddir$"/>
15 </exec>
16
17 <!-- Now read the generated properties file and delete it -->
18 <property file="$cmddir$"/>
19 <delete file="$cmddir$"/>
20 </target>
21
22 <!--
23 Run "sencha which" again, similar to the above target, but explicitly check
24 for the 'SENCHA_CMD' environment variable to have been set, in case sencha
25 cmd isn't on the current path settings for the user
26 -->
27 <target name="find-cmd-in-environment" unless="cmd.dir">
28 <exec executable="${env.SENCHA_CMD}/sencha"
29 dir="${basedir}"
30 failifexecutionfails="false">
31 <arg value="which"/>
32 <arg value="-p=cmd.dir"/>
33 <arg value="-o=$cmddir$"/>
34 </exec>
35
36 <property file="$cmddir$"/>
37 <delete file="$cmddir$"/>
38 </target>
39
40 <!--
41 == Mac OSX launchd fix ==
42 create a child shell process that will source in ~/.bash_profile
43 and then attempt to call 'sencha which' with the current user's
44 shell profile settings. sencha which will create a properties file
45 that can then be loaded into this (the parent) process.
46
47 This allows ant integrations in IDE's like netbeans or eclipse to properly
48 locate Sencha Cmd, even if the IDE was launched via launchd (Finder)
49 -->
50 <target name="find-cmd-in-shell" unless="cmd.dir">
51 <delete quiet="true" file="$cmddir$"/>
52 <echo file="tmp.sh"> source ~/.bash_profile; sencha which -p cmd.dir -o '$cmddir$'</echo>
53 <exec executable="/bin/sh"><arg value="tmp.sh"/></exec>
54 <property file="$cmddir$"/>
55 <delete file="tmp.sh"/>
56 <delete file="$cmddir$"/>
57 </target>
58 </project>