mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 09:20:08 +00:00
Merge commit '5c22aa844238d4b20f59f85ee1a17e83bae1aa88' into beta
This commit is contained in:
commit
26e5e9bfd9
16
README.md
Normal file
16
README.md
Normal file
@ -0,0 +1,16 @@
|
||||
# Telegram iOS Source Code Compilation Guide
|
||||
|
||||
1. Install the brew package manager, if you haven’t 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.
|
||||
@ -5,4 +5,4 @@ APP_SPECIFIC_URL_SCHEME=tgfork
|
||||
GLOBAL_CONSTANTS = APP_CONFIG_IS_INTERNAL_BUILD=false APP_CONFIG_IS_APPSTORE_BUILD=true APP_CONFIG_APPSTORE_ID=0 APP_SPECIFIC_URL_SCHEME="\"$(APP_SPECIFIC_URL_SCHEME)\""
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) $(GLOBAL_CONSTANTS)
|
||||
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) APP_CONFIG_API_ID=8 APP_CONFIG_API_HASH="\"7245de8e747a0d6fbe11f7cc14fcc0bb\"" APP_CONFIG_HOCKEYAPP_ID="\"\""
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) APP_CONFIG_API_ID=8 APP_CONFIG_API_HASH="\"7245de8e747a0d6fbe11f7cc14fcc0bb\"" APP_CONFIG_HOCKEYAPP_ID="\"\""
|
||||
@ -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>
|
||||
|
||||
@ -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,34 +34,39 @@ 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
|
||||
|
||||
SOURCE_PATH="telegram-ios"
|
||||
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"
|
||||
exit 1
|
||||
if [ -d "$SOURCE_PATH" ]; then
|
||||
echo "Directory $SOURCE_PATH should not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Unpacking files..."
|
||||
tar -xf "source.tar"
|
||||
|
||||
cd "$SOURCE_PATH"
|
||||
FASTLANE_PASSWORD="$FASTLANE_PASSWORD" FASTLANE_ITC_TEAM_NAME="$FASTLANE_ITC_TEAM_NAME" fastlane "$FASTLANE_BUILD_CONFIGURATION"
|
||||
fi
|
||||
|
||||
echo "Unpacking files..."
|
||||
tar -xf "source.tar"
|
||||
|
||||
cd "$SOURCE_PATH"
|
||||
FASTLANE_PASSWORD="$FASTLANE_PASSWORD" FASTLANE_ITC_TEAM_NAME="$FASTLANE_ITC_TEAM_NAME" fastlane "$FASTLANE_BUILD_CONFIGURATION"
|
||||
|
||||
@ -63,4 +63,6 @@ lane :build_for_appstore do |options|
|
||||
)
|
||||
end
|
||||
|
||||
import "../../Telegram-iOS-Shared/fastlane/Fastfile"
|
||||
if File.exists?("../../Telegram-iOS-Shared/fastlane/Fastfile")
|
||||
import "../../Telegram-iOS-Shared/fastlane/Fastfile"
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user