Merge commit '5c22aa844238d4b20f59f85ee1a17e83bae1aa88' into beta

This commit is contained in:
Peter 2019-06-24 05:01:01 +03:00
commit 26e5e9bfd9
5 changed files with 49 additions and 16 deletions

16
README.md Normal file
View File

@ -0,0 +1,16 @@
# Telegram iOS Source Code Compilation Guide
1. Install the brew package manager, if you havent already.
2. Install the packages pkg-config, yasm:
```
brew install pkg-config yasm
```
3. Clone the project from GitHub:
```
git clone --recursive https://github.com/peter-iakovlev/Telegram-iOS.git
```
4. Open Telegram-iOS.workspace.
5. Open the Telegram-iOS-Fork scheme.
6. Start the compilation process.
7. To run the app on your device, you will need to set the correct values for the signature, .entitlements files and package IDs in accordance with your developer account values.

View File

@ -13,7 +13,7 @@
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>group.fork.telegram.Telegram-iOS</string>
<string>group.fork.telegram.Fork</string>
</array>
</dict>
</plist>

View File

@ -2,6 +2,8 @@
if [ "$1" == "hockeyapp" ]; then
FASTLANE_BUILD_CONFIGURATION="internalhockeyapp"
CERTS_PATH="codesigning_data/certs"
PROFILES_PATH="codesigning_data/profiles"
elif [ "$1" == "appstore" ]; then
FASTLANE_BUILD_CONFIGURATION="testflight_llc"
if [ -z "$TELEGRAM_BUILD_APPSTORE_PASSWORD" ]; then
@ -14,8 +16,16 @@ elif [ "$1" == "appstore" ]; then
fi
FASTLANE_PASSWORD="$TELEGRAM_BUILD_APPSTORE_PASSWORD"
FASTLANE_ITC_TEAM_NAME="$TELEGRAM_BUILD_APPSTORE_TEAM_NAME"
CERTS_PATH="codesigning_data/certs"
PROFILES_PATH="codesigning_data/profiles"
elif [ "$1" == "verify" ]; then
FASTLANE_BUILD_CONFIGURATION="build_for_appstore"
CERTS_PATH="buildbox/fake-codesigning/certs"
PROFILES_PATH="buildbox/fake-codesigning/profiles"
elif [ "$1" == "verify-local" ]; then
FASTLANE_BUILD_CONFIGURATION="build_for_appstore"
CERTS_PATH="buildbox/fake-codesigning/certs"
PROFILES_PATH="buildbox/fake-codesigning/profiles"
else
echo "Unknown configuration $1"
exit 1
@ -24,29 +34,33 @@ fi
MY_KEYCHAIN="temp.keychain"
MY_KEYCHAIN_PASSWORD="secret"
if [ ! -z "$(security list-keychains | grep "$MY_KEYCHAIN")" ]; then
security delete-keychain "$MY_KEYCHAIN" || true
fi
security create-keychain -p "$MY_KEYCHAIN_PASSWORD" "$MY_KEYCHAIN"
security list-keychains -d user -s "$MY_KEYCHAIN" $(security list-keychains -d user | sed s/\"//g)
security set-keychain-settings "$MY_KEYCHAIN"
security unlock-keychain -p "$MY_KEYCHAIN_PASSWORD" "$MY_KEYCHAIN"
CERTS_PATH="codesigning_data/certs"
for f in $(ls "$CERTS_PATH"); do
fastlane run import_certificate "certificate_path:$CERTS_PATH/$f" keychain_name:"$MY_KEYCHAIN" keychain_password:"$MY_KEYCHAIN_PASSWORD" log_output:true
done
mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles"
PROFILES_PATH="codesigning_data/profiles"
for f in $(ls "$PROFILES_PATH"); do
PROFILE_PATH="$PROFILES_PATH/$f"
uuid=`grep UUID -A1 -a "$PROFILE_PATH" | grep -io "[-A-F0-9]\{36\}"`
cp "$PROFILE_PATH" "$HOME/Library/MobileDevice/Provisioning Profiles/$uuid.mobileprovision"
cp -f "$PROFILE_PATH" "$HOME/Library/MobileDevice/Provisioning Profiles/$uuid.mobileprovision"
done
if [ "$1" == "verify-local" ]; then
fastlane "$FASTLANE_BUILD_CONFIGURATION"
else
SOURCE_PATH="telegram-ios"
if [ -d "$SOURCE_PATH" ]; then
echo "$SOURCE_PATH must not exist"
echo "Directory $SOURCE_PATH should not exist"
exit 1
fi
@ -55,3 +69,4 @@ tar -xf "source.tar"
cd "$SOURCE_PATH"
FASTLANE_PASSWORD="$FASTLANE_PASSWORD" FASTLANE_ITC_TEAM_NAME="$FASTLANE_ITC_TEAM_NAME" fastlane "$FASTLANE_BUILD_CONFIGURATION"
fi

View File

@ -63,4 +63,6 @@ lane :build_for_appstore do |options|
)
end
if File.exists?("../../Telegram-iOS-Shared/fastlane/Fastfile")
import "../../Telegram-iOS-Shared/fastlane/Fastfile"
end