|
1 |
| - |
| 1 | + |
| 2 | +VERSION="1_0_0" #for files |
| 3 | +VERSION_NAME="1.0.0" #for display |
2 | 4 |
|
3 | 5 | cd ..
|
4 | 6 |
|
5 | 7 | rm -rf dist/osx
|
6 | 8 | mkdir dist/osx
|
7 | 9 | rm bin/Mac/*
|
8 | 10 |
|
9 |
| -declare -a langs=("nl" "en") |
| 11 | + |
| 12 | +declare -a langs=("en" "nl") |
10 | 13 | for lang in "${langs[@]}"
|
11 | 14 | do
|
12 | 15 |
|
13 |
| -mkdir -p dist/osx/$lang/mods/media |
14 |
| -cp tpl/$lang/* dist/osx/$lang/ |
15 | 16 | rm mods/media/libctrmedia.dylib
|
16 | 17 | ISO="$lang" make -f makefile.mac clean
|
17 | 18 | ISO="$lang" OS="Mac" make -f makefile.mac
|
18 | 19 | ISO="$lang" PACKAGE="media" NAME="libctrmedia.dylib" make -f makefile.mac plugin
|
19 |
| -mv ./bin/Mac/ctr$lang dist/osx/$lang/ctr$lang |
20 |
| -mv ./mods/media/libctrmedia.dylib dist/osx/$lang/mods/media/ |
| 20 | + |
| 21 | +# Create dictionary |
| 22 | +./bin/Mac/ctren -g i18n/en/dictionary.h i18n/$lang/dictionary.h > /tmp/dict_general.dict |
| 23 | +./bin/Mac/ctren -g plugins/media/i18n/en/media.h plugins/media/i18n/$lang/media.h > /tmp/dict_media.dict |
| 24 | +cat /tmp/dict_general.dict /tmp/dict_media.dict plugins/media/i18n/$lang/extra.dict > /tmp/dict_all.dict |
| 25 | + |
| 26 | +# (Re-)Create folder for lang specific distribution |
| 27 | + |
| 28 | +mkdir -p dist/osx/ISO/$lang |
| 29 | +mkdir -p dist/osx/OUT/$lang |
| 30 | + |
| 31 | +mkdir dist/osx/ISO/$lang/mods |
| 32 | +mkdir dist/osx/ISO/$lang/mods/media |
| 33 | + |
| 34 | +# Add executable |
| 35 | +cp ./bin/Mac/ctr$lang dist/osx/ISO/$lang/ctr$lang |
| 36 | +# Add dynamic libraries |
| 37 | +cp ./mods/media/libctrmedia.dylib dist/osx/ISO/$lang/mods/media/ |
| 38 | + |
| 39 | +# Add assets |
| 40 | +cp demodata dist/osx/ISO/$lang/ |
| 41 | + |
| 42 | +# Translate examples |
| 43 | +./bin/Mac/ctren -t /tmp/dict_all.dict misc/distrib/assets/demo1.ctr > dist/osx/ISO/$lang/demo1.ctr 2>/tmp/err1.log |
| 44 | +./bin/Mac/ctren -t /tmp/dict_all.dict misc/distrib/assets/demo2.ctr > dist/osx/ISO/$lang/demo2.ctr 2>/tmp/err2.log |
| 45 | +./bin/Mac/ctren -t /tmp/dict_all.dict misc/distrib/assets/demo3.ctr > dist/osx/ISO/$lang/demo3.ctr 2>/tmp/err3.log |
| 46 | +./bin/Mac/ctren -t /tmp/dict_all.dict misc/distrib/assets/demo4.ctr > dist/osx/ISO/$lang/demo4.ctr 2>/tmp/err4.log |
| 47 | +./bin/Mac/ctren -t /tmp/dict_all.dict misc/distrib/assets/demo5.ctr > dist/osx/ISO/$lang/demo5.ctr 2>/tmp/err5.log |
| 48 | +./bin/Mac/ctren -t /tmp/dict_all.dict misc/distrib/assets/demo6.ctr > dist/osx/ISO/$lang/demo6.ctr 2>/tmp/err6.log |
| 49 | +./bin/Mac/ctren -t /tmp/dict_all.dict misc/distrib/assets/demo7.ctr > dist/osx/ISO/$lang/demo7.ctr 2>/tmp/err7.log |
| 50 | +./bin/Mac/ctren -t /tmp/dict_all.dict misc/distrib/assets/demo8.ctr > dist/osx/ISO/$lang/demo8.ctr 2>/tmp/err8.log |
| 51 | +./bin/Mac/ctren -t /tmp/dict_all.dict misc/distrib/assets/demo9.ctr > dist/osx/ISO/$lang/demo9.ctr 2>/tmp/err9.log |
| 52 | +./bin/Mac/ctren -t /tmp/dict_all.dict misc/distrib/assets/demo10.ctr > dist/osx/ISO/$lang/demo10.ctr 2>/tmp/err10.log |
| 53 | +./bin/Mac/ctren -t /tmp/dict_all.dict misc/distrib/assets/demo11.ctr > dist/osx/ISO/$lang/demo11.ctr 2>/tmp/err11.log |
| 54 | +./bin/Mac/ctren -t /tmp/dict_all.dict misc/distrib/assets/pak-o-mat.ctr > dist/osx/ISO/$lang/pak-o-mat.ctr 2>/tmp/pak-o-mat.log |
| 55 | + |
| 56 | +rm -rf /tmp/dist$lang |
| 57 | +cp -R dist/osx/ISO/$lang /tmp/dist$lang |
| 58 | +cp -R ~/frameworks/* /tmp/dist$lang # put SDL2 frameworks for macos here to craft dist |
| 59 | +#cp -R ~/libs/* /tmp/dist$lang # other libs |
| 60 | + |
| 61 | +hdiutil create -volname ctr${lang}${VERSION} -srcfolder /tmp/dist$lang -ov -format UDZO dist/osx/OUT/$lang/ctr${lang}${VERSION}.dmg |
21 | 62 |
|
22 | 63 | done
|
0 commit comments