mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Universal project generator
This commit is contained in:
parent
bcd11996c2
commit
39718b4a79
6
Makefile
6
Makefile
@ -413,16 +413,16 @@ bazel_prepare_development_build:
|
|||||||
bazel_project: kill_xcode bazel_prepare_development_build
|
bazel_project: kill_xcode bazel_prepare_development_build
|
||||||
APP_VERSION="${APP_VERSION}" \
|
APP_VERSION="${APP_VERSION}" \
|
||||||
BAZEL_CACHE_DIR="${BAZEL_CACHE_DIR}" \
|
BAZEL_CACHE_DIR="${BAZEL_CACHE_DIR}" \
|
||||||
build-system/generate-xcode-project.sh
|
build-system/generate-xcode-project.sh Telegram
|
||||||
|
|
||||||
bazel_soft_project: bazel_prepare_development_build
|
bazel_soft_project: bazel_prepare_development_build
|
||||||
APP_VERSION="${APP_VERSION}" \
|
APP_VERSION="${APP_VERSION}" \
|
||||||
BAZEL_CACHE_DIR="${BAZEL_CACHE_DIR}" \
|
BAZEL_CACHE_DIR="${BAZEL_CACHE_DIR}" \
|
||||||
build-system/generate-xcode-project.sh
|
build-system/generate-xcode-project.sh Telegram
|
||||||
|
|
||||||
bazel_opt_project: bazel_prepare_development_build
|
bazel_opt_project: bazel_prepare_development_build
|
||||||
APP_VERSION="${APP_VERSION}" \
|
APP_VERSION="${APP_VERSION}" \
|
||||||
BAZEL_CACHE_DIR="${BAZEL_CACHE_DIR}" \
|
BAZEL_CACHE_DIR="${BAZEL_CACHE_DIR}" \
|
||||||
GENERATE_OPT_PROJECT=1 \
|
GENERATE_OPT_PROJECT=1 \
|
||||||
build-system/generate-xcode-project.sh
|
build-system/generate-xcode-project.sh Telegram
|
||||||
|
|
||||||
|
@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
APP_TARGET="$1"
|
||||||
|
if [ "$APP_TARGET" == "" ]; then
|
||||||
|
echo "Usage: sh generate-xcode-project.sh app_target"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
BAZEL="$(which bazel)"
|
BAZEL="$(which bazel)"
|
||||||
if [ "$BAZEL" = "" ]; then
|
if [ "$BAZEL" = "" ]; then
|
||||||
echo "bazel not found in PATH"
|
echo "bazel not found in PATH"
|
||||||
@ -73,23 +79,23 @@ fi
|
|||||||
|
|
||||||
"$TULSI" -- \
|
"$TULSI" -- \
|
||||||
--verbose \
|
--verbose \
|
||||||
--create-tulsiproj Telegram \
|
--create-tulsiproj "$APP_TARGET" \
|
||||||
--workspaceroot ./ \
|
--workspaceroot ./ \
|
||||||
--bazel "$BAZEL" \
|
--bazel "$BAZEL" \
|
||||||
--outputfolder "$GEN_DIRECTORY" \
|
--outputfolder "$GEN_DIRECTORY" \
|
||||||
--target Telegram:Telegram \
|
--target "$APP_TARGET":"$APP_TARGET" \
|
||||||
--target Telegram:Main \
|
--target "$APP_TARGET":Main \
|
||||||
--target Telegram:Lib \
|
--target "$APP_TARGET":Lib \
|
||||||
|
|
||||||
PATCH_OPTIONS="BazelBuildOptionsDebug BazelBuildOptionsRelease"
|
PATCH_OPTIONS="BazelBuildOptionsDebug BazelBuildOptionsRelease"
|
||||||
for NAME in $PATCH_OPTIONS; do
|
for NAME in $PATCH_OPTIONS; do
|
||||||
sed -i "" -e '1h;2,$H;$!d;g' -e 's/\("'"$NAME"'" : {\n[ ]*"p" : "$(inherited)\)/\1'" ${BAZEL_OPTIONS[*]}"'/' "$GEN_DIRECTORY/Telegram.tulsiproj/Configs/Telegram.tulsigen"
|
sed -i "" -e '1h;2,$H;$!d;g' -e 's/\("'"$NAME"'" : {\n[ ]*"p" : "$(inherited)\)/\1'" ${BAZEL_OPTIONS[*]}"'/' "$GEN_DIRECTORY/$APP_TARGET.tulsiproj/Configs/$APP_TARGET.tulsigen"
|
||||||
done
|
done
|
||||||
|
|
||||||
sed -i "" -e '1h;2,$H;$!d;g' -e 's/\("sourceFilters" : \[\n[ ]*\)"\.\/\.\.\."/\1"Telegram\/...", "submodules\/..."/' "$GEN_DIRECTORY/Telegram.tulsiproj/Configs/Telegram.tulsigen"
|
sed -i "" -e '1h;2,$H;$!d;g' -e 's/\("sourceFilters" : \[\n[ ]*\)"\.\/\.\.\."/\1"$APP_TARGET\/...", "submodules\/..."/' "$GEN_DIRECTORY/$APP_TARGET.tulsiproj/Configs/$APP_TARGET.tulsigen"
|
||||||
|
|
||||||
"$TULSI" -- \
|
"$TULSI" -- \
|
||||||
--verbose \
|
--verbose \
|
||||||
--genconfig "$GEN_DIRECTORY/Telegram.tulsiproj:Telegram" \
|
--genconfig "$GEN_DIRECTORY/$APP_TARGET.tulsiproj:$APP_TARGET" \
|
||||||
--bazel "$BAZEL" \
|
--bazel "$BAZEL" \
|
||||||
--outputfolder "$GEN_DIRECTORY" \
|
--outputfolder "$GEN_DIRECTORY" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user