Skip to content

Commit

Permalink
update Makefile and Xcode project to use current data files.
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed Dec 1, 2014
1 parent 2722572 commit e6a00ec
Show file tree
Hide file tree
Showing 11 changed files with 398 additions and 221 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ build
build.log
bin/*
lib/*
data/brise/
data/opencc/*.ocd
package/archives/*
package/Squirrel.pkg
package/sign/*.pem
Expand Down
3 changes: 3 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /bin/bash
git submodule update --init
make deps && make && sudo make install
32 changes: 29 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,53 @@
.PHONY: all install librime release debug clean
.PHONY: all install librime data update_brise update_opencc_dict deps release debug clean

all: release
install: install-release

LIBRIME = lib/librime.1.dylib
BRISE = data/brise/default.yaml data/brise/symbols.yaml data/brise/essay.txt
OPENCC_DICT = data/opencc/TSCharacters.ocd data/opencc/TSPhrases.ocd

DEPENDS = $(LIBRIME) $(BRISE) $(OPENCC_DICT)

LIBRIME_OUTPUT = librime/xbuild/lib/Release/librime.1.dylib
RIME_DEPLOYER_OUTPUT = librime/xbuild/bin/Release/rime_deployer
RIME_DICT_MANAGER_OUTPUT = librime/xbuild/bin/Release/rime_dict_manager
OPENCC_DICT_OUTPUT = librime/thirdparty/src/opencc/build/data/*.ocd
DATA_FILES = brise/default.yaml brise/symbols.yaml brise/essay.txt brise/preset/*.yaml brise/supplement/*.yaml

$(LIBRIME):
$(MAKE) librime

$(BRISE):
$(MAKE) update_brise

$(OPENCC_DICT):
$(MAKE) update_opencc_dict

librime:
cd librime; make -f Makefile.xcode
cp -L $(LIBRIME_OUTPUT) $(LIBRIME)
cp $(RIME_DEPLOYER_OUTPUT) bin/
cp $(RIME_DICT_MANAGER_OUTPUT) bin/

release: $(LIBRIME)
data: update_brise update_opencc_dict

update_brise:
mkdir -p data/brise
cp $(DATA_FILES) data/brise/

update_opencc_dict:
cd librime; make -f Makefile.xcode thirdparty/opencc
cp $(OPENCC_DICT_OUTPUT) data/opencc/

deps: librime data

release: $(DEPENDS)
xcodebuild -project Squirrel.xcodeproj -configuration Release build | grep -v setenv | tee build.log
rm -f build/Squirrel.app
cd build ; ln -s Release/Squirrel.app Squirrel.app

debug: $(LIBRIME)
debug: $(DEPENDS)
xcodebuild -project Squirrel.xcodeproj -configuration Debug build | grep -v setenv | tee build.log
rm -f build/Squirrel.app
cd build ; ln -s Debug/Squirrel.app Squirrel.app
Expand All @@ -44,3 +68,5 @@ clean:
rm build.log > /dev/null 2>&1 || true
rm bin/* > /dev/null 2>&1 || true
rm lib/* > /dev/null 2>&1 || true
rm data/brise/* > /dev/null 2>&1 || true
rm data/opencc/*.ocd > /dev/null 2>&1 || true
540 changes: 324 additions & 216 deletions Squirrel.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion brise
Submodule brise updated from 0959fd to 3a17da
Binary file removed data/opencc/TSCharacters.ocd
Binary file not shown.
Binary file removed data/opencc/TSPhrases.ocd
Binary file not shown.
Binary file removed data/opencc/TWVariants.ocd
Binary file not shown.
22 changes: 22 additions & 0 deletions data/opencc/s2t.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Simplified Chinese to Traditional Chinese",
"segmentation": {
"type": "mmseg",
"dict": {
"type": "ocd",
"file": "STPhrases.ocd"
}
},
"conversion_chain": [{
"dict": {
"type": "group",
"dicts": [{
"type": "ocd",
"file": "STPhrases.ocd"
}, {
"type": "ocd",
"file": "STCharacters.ocd"
}]
}
}]
}
16 changes: 16 additions & 0 deletions data/opencc/t2hk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "Traditional Chinese to Traditional Chinese (Hong Kong standard)",
"segmentation": {
"type": "mmseg",
"dict": {
"type": "ocd",
"file": "HKVariants.ocd"
}
},
"conversion_chain": [{
"dict": {
"type": "ocd",
"file": "HKVariants.ocd"
}
}]
}
2 changes: 1 addition & 1 deletion librime
Submodule librime updated 878 files

0 comments on commit e6a00ec

Please sign in to comment.