2011-01-06 130 views

回答

0

我已经解决了利用使用rsync的同步工作目录,然后的AppleScript其生成并运行该项目一个bash文件我的问题。

sync.sh:

#!/bin/bash 

# script for moving development files into xcode for building 
developmentDirectory="/" 
xcodeDirectory="/" 
echo 'Synchronising...' 
rsync -r $developmentDirectory $xcodeDirectory \ 
--exclude='.DS_Store' --exclude='.*' --exclude='utils/' --exclude='photos' 
echo 'Synchronising Done at:' 
echo $(date) 

buildandrun:

set projectName to "projectName" 
# AppleScript uses : for/in directory paths 
set projectDir to "Users:username:Documents:" & projectName & ":" & projectName & ".xcodeproj" 
tell application "Xcode" 
    open projectDir 
    tell project projectName 
      clean 
      build 
      (* for some reasons, debug will hang even the debug process has completed. 
       The try block is created to suppress the AppleEvent timeout error 
      *) 
      try 
       debug 
      end try 
    end tell 
    quit 
end tell 

然后,终于,我使用所谓run.sh在我的.bash_profile别名shell脚本:

运行.sh:

#!/bin/bash 

bash utils/sync.sh 
osascript utils/buildandrun 
2

我是stuc k与尝试从构建我的xcode项目启动我的调试输出相同的问题。我只是试验以下

open ./prog.app& 

似乎做的伎俩。