Skip to content

Commit

Permalink
Update build file
Browse files Browse the repository at this point in the history
  • Loading branch information
BPerlakiH committed Dec 29, 2023
1 parent 3b8fd9d commit 43d5ab3
Showing 1 changed file with 8 additions and 21 deletions.
29 changes: 8 additions & 21 deletions build_project.zsh
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
#!/bin/zsh

# dependencies
lib_kiwix_framework="libkiwix_xcframework-13.0.0-1"

# move the custom files under the same folder as the kiwix repo
mv custom/ apple/
cd apple/custom

#download custom zim files as per info_local.json files
brew install jq

for info in `mdfind -onlyin . -name info.json`
# download custom zim files as per info_local.json files
# and configure the project.yml file accordingly
for info in `python src/find_infos.py`
do
parent_dir=${info%/*}
brand_name=${parent_dir##*/}
Expand All @@ -23,28 +19,19 @@ do
file_name=${url:${#parent_url} + 1} # + 1 to remove the trailing slash

auth_value=`print -rl -- ${(P)auth}` # get the credentials from environment var named by .zim_auth in the json
curl -O -L $url -u "$auth_value" $parent_dir/$file_name
curl -L $url -u "$auth_value" -o $parent_dir/$file_name

touch $brand_name/$brand_name.xcconfig
python src/configure.py --output xcconfig $info > $brand_name/$brand_name.xcconfig
echo "app name"
python src/configure.py --output app_name $info
echo "app version"
python src/configure.py --output app_version $info
echo "enforced language"
python src/configure.py --output enforced_language $info
done

cd ..

# download libkiwix xcframework
lib_kiwix_url="http://download.kiwix.org/release/libkiwix/"$lib_kiwix_framework".tar.gz"
curl -O -L $lib_kiwix_url
tar xzf $lib_kiwix_framework".tar.gz"
rm $lib_kiwix_framework".tar.gz"
mv libkiwix_xcframework*/lib/*.* .
rm -rf libkiwix_xcframework*/

ls -la

# install xcodegen and run it
brew install xcodegen
xcodegen
# run xcodegen again
xcodegen

0 comments on commit 43d5ab3

Please sign in to comment.