Skip to content

Commit

Permalink
add support for Xcode 4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
niltsh committed Feb 27, 2012
1 parent e8e0a88 commit 8a5789c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion 1.0.13/Makefile
@@ -1,4 +1,6 @@

IBTOOL=/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool

#this one must be ahead of EXPAND since FILES will be defined
DESTROOT = results

Expand Down Expand Up @@ -49,7 +51,7 @@ clean:
############################# rules ############################
$(DESTROOT)/%.nib: %.xib $(DESTROOT)
# cp "$<" "$@"
ibtool --compile "$@" "$<"
${IBTOOL} --compile "$@" "$<"

$(DESTROOT)/%.strings: %.strings $(DESTROOT)
cp "$<" "$@"
Expand Down
6 changes: 4 additions & 2 deletions initNewVersion.sh
Expand Up @@ -2,6 +2,8 @@

export masterLProj="English.lproj"

export IBTOOL=/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool

if [ $# != 2 ] ; then
echo "Usage: ./initNewVersion.sh old_versino_number new_version_number"
else
Expand Down Expand Up @@ -49,7 +51,7 @@ else
do
# 寻找旧文件夹里面所有的【翻译版本】
echo "update: $folderPath/$fileNameNoExt.$ext"
ibtool --previous-file ./$oldVer/$masterLProj/$fileName --incremental-file ./$folderPath/$fileName --localize-incremental --write ./$folderPath/$fileNameNoExt.$ext $filePath
${IBTOOL} --previous-file ./$oldVer/$masterLProj/$fileName --incremental-file ./$folderPath/$fileName --localize-incremental --write ./$folderPath/$fileNameNoExt.$ext $filePath
done
else
# 如果是普通文件的话,直接拷贝
Expand Down Expand Up @@ -112,7 +114,7 @@ else
if [ -f ./$oldVer/$masterLProj/$fileName ] && [ -f ./$filePath ] && [ -f ./$newVer/$masterLProj/$fileName ] ; then
# 对于xib文件,命令不一样
echo "update ./$newVer/$folderName/$fileName"
ibtool --previous-file ./$oldVer/$masterLProj/$fileName --incremental-file ./$filePath --localize-incremental --write ./$newVer/$folderName/$fileName ./$newVer/$masterLProj/$fileName
${IBTOOL} --previous-file ./$oldVer/$masterLProj/$fileName --incremental-file ./$filePath --localize-incremental --write ./$newVer/$folderName/$fileName ./$newVer/$masterLProj/$fileName
else
echo "necessary files are missing for xib transformation"
fi
Expand Down
4 changes: 3 additions & 1 deletion template.Makefile
@@ -1,4 +1,6 @@

IBTOOL=/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool

#this one must be ahead of EXPAND since FILES will be defined
DESTROOT = results

Expand Down Expand Up @@ -49,7 +51,7 @@ clean:
############################# rules ############################
$(DESTROOT)/%.nib: %.xib $(DESTROOT)
# cp "$<" "$@"
ibtool --compile "$@" "$<"
${IBTOOL} --compile "$@" "$<"

$(DESTROOT)/%.strings: %.strings $(DESTROOT)
cp "$<" "$@"
Expand Down

0 comments on commit 8a5789c

Please sign in to comment.