Quick-x 3.3 player Relaunch时重新加载资源

1 --代码部分 修改 SimulatorApp.mm 中的

- (IBAction) onRelaunch:(id)sender
{
    ;
    NSArray* args= initWithObjects:@" ", nil];
    ;
}


```

并添加 函数 

-(void) reloadScriptAndResource
{
    NSString* bundlePath =  bundlePath];
 NSString* shellPath = ;
 
 if (  fileExistsAtPath:shellPath])
    {
        NSArray* taskArgs = ,nil];
        ;
    }

}

```


添加shell 脚本 命名为 RsyncResScript 

#!/bin/sh

#  RsyncResScript.sh
#  sbproject
#
#  Created by mimi on 14-11-4.
#
ContentPath=$1
echo $1
echo PWD: $PWD
res_root="/Users/mimi/Documents/quick-3.3rc0/sbproject/resources" #这里是你的工程资源路径 暂时需要手动填写

product_root="$ContentPath"

file_list=`ls $res_root`

for name in $file_list
do
if  -d $res_root/$name ] ; then
rsync -avz --exclude=".svn" --exclude=".git" --exclude=".gitignore" "$res_root/$name/" "$product_root/$name"
elif  -f $res_root/$name ] ; then
rsync -az "$res_root/$name" "$product_root/$name"
fi
done

```


然后注意资源路径问题我是把 src 和 res 都合并到resource 下面 如图 (没找到怎么传图片就算了)

很实用,谢谢分享!