2012年1月13日金曜日

Titanium Studio+SVNのエラー回避

SVNでソース管理しているTitaniumプロジェクトを
実機転送やDistributeしようとすると、エラーが発生して転送できない。

※Androidしか試してないけど、iPhoneだとどうかな。

で、ビルド用スクリプトを修正して対応する方法は下記の通り。(SDK1.7.5の場合)


まず、C:\Users\ユーザ名\AppData\Roaming\Titanium\mobilesdk\win32\1.7.5\android\builder.py
をエディタで開き、「fileset = []」という記述を探す。

そのすぐ下の部分で、下記のように追記する。

オリジナル:
for root, dirs, files in os.walk(os.path.join(self.top_dir, "Resources")):
        for f in files:
            path = os.path.join(root, f)
            if is_resource_drawable(path) and f != 'default.png':
                fileset.append(path)
下記のように追加(2行目、3行目、5行目):
for root, dirs, files in os.walk(os.path.join(self.top_dir, "Resources")):
        for name in ignoreDirs:
            if name in dirs: dirs.remove(name)
        for f in files:
            if f in ignoreFiles: continue
            path = os.path.join(root, f)
            if is_resource_drawable(path) and f != 'default.png':
                fileset.append(path)


これで、無事にエラーなく実機転送できた!


gitを使えばいいのだろうけど、なんだか難しくてよく分からず・・・・
慣れたSVNの方がいい♡

0 件のコメント:

コメントを投稿