Re: applescripting xcode (beginner)
Re: applescripting xcode (beginner)
- Subject: Re: applescripting xcode (beginner)
- From: Bernard Bernu <email@hidden>
- Date: Wed, 5 Oct 2005 17:28:17 +0200
Thanks for responding.
I got the build to work with some changes (I'm running on 10.3.9, Xcode
1.5)
But the launch do not work !-(
This is what I do
set myProjectPath to alias "Macintosh
HD:Users:bernu:Documents:PROGRAM:HartreeFock:HartreeFock.xcode:"
set myTargetName to "HartreeFock"
set myBuildConfig to "Deployment"
tell application "Xcode"
open myProjectPath
--set myProject to project of active project document
set myproject to projects's item 1
-- Before building, we need to set up things like the active target,
so that
-- you get what you expect. Look at the dictionary for the "project"
class
-- to see what else you can manipulate on the project before building.
set mytarget to first target of myproject whose name is myTargetName
--set myBuildType to first build configuration type of myProject whose
name is myBuildConfig
set myBuildType to last build style of myproject --whose name is
myBuildConfig
build myproject using myBuildType
-- Assuming build completed as expected, try to run it.
-- Here you can set the "active executable" on the project in a similar
-- fashion to how the active target was set above
launch myproject
end tell
Le 5 oct. 05, à 16:51, Daniel Jalkut a écrit :
Hi Bernard. "build the_project" should work, assuming you have set
"the_project" to a valid project and it has a valid target set. Here
is a simple example that should get you started. I don't know how to
end an executable from Xcode once it's launched.
I don't like sending to multiple mailing lists so I'm ditching
AppleScript-Users, which is probably less appropriate (ironically) for
this very Xcode specific question.
set myProjectPath to "<MyPosixPath>"
set myTargetName to "<MyTargetName>"
set myBuildConfig to "<MyBuildConfig>"
tell application "Xcode"
open myProjectPath as POSIX file
set myProject to project of active project document
-- Before building, we need to set up things like the active
target, so that
-- you get what you expect. Look at the dictionary for the
"project" class
-- to see what else you can manipulate on the project before
building.
set myTarget to first target of myProject whose name is
myTargetName
set myBuildType to first build configuration type of myProject
whose name is myBuildConfig
build myProject using myBuildType
-- Assuming build completed as expected, try to run it.
-- Here you can set the "active executable" on the project in a
similar
-- fashion to how the active target was set above
launch myProject
end tell
On Oct 5, 2005, at 5:45 AM, Bernard Bernu wrote:
Hello,
I'm looking for some simple entries to manipulate xcode with
applescript.
I'd like to do very simple thing as
1) start an existing project
2) compile the project
3) launch the executable
4) stop the executable
Reading the (very long) dictionary did not help me much. I just was
able to see a project. I did not succeed in compiling (I tried build
the_project).
Thanks for helping
Bernard
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden