mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-19 05:31:22 +00:00
build scripts updated
This commit is contained in:
parent
37503a2305
commit
a8e2dbee68
@ -35,14 +35,19 @@ elif [ "$BuildTarget" == "mac" ]; then
|
||||
UpdateFile="tmacupd$AppVersion"
|
||||
SetupFile="tsetup.$AppVersionStrFull.dmg"
|
||||
ReleasePath="./../Mac/Release"
|
||||
BinaryName="Telegram"
|
||||
elif [ "$BuildTarget" == "mac32" ]; then
|
||||
echo "Building version $AppVersionStrFull for OS X 10.6 and 10.7.."
|
||||
UpdateFile="tmac32upd$AppVersion"
|
||||
SetupFile="tsetup32.$AppVersionStrFull.dmg"
|
||||
ReleasePath="./../Mac/Release"
|
||||
BinaryName="Telegram"
|
||||
elif [ "$BuildTarget" == "macstore" ]; then
|
||||
echo "Building version $AppVersionStrFull for Mac App Store.."
|
||||
ReleasePath="./../Mac/Release"
|
||||
BinaryName="Telegram Desktop"
|
||||
DropboxPath="./../../../Dropbox/Telegram/deploy/$AppVersionStrMajor"
|
||||
DropboxDeployPath="$DropboxPath/$AppVersionStrFull"
|
||||
else
|
||||
echo "Invalid target!"
|
||||
exit 1
|
||||
@ -99,52 +104,61 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
|
||||
cd $DeployPath && tar -cJvf $SetupFile Telegram/ && cd ./../../../../../Telegram
|
||||
fi
|
||||
|
||||
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then
|
||||
if [ ! -d "$ReleasePath/Telegram.app" ]; then
|
||||
echo "Telegram.app not found!"
|
||||
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" == "macstore" ]; then
|
||||
if [ ! -d "$ReleasePath/$BinaryName.app" ]; then
|
||||
echo "$BinaryName.app not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$ReleasePath/Telegram.app.dSYM" ]; then
|
||||
echo "Telegram.app.dSYM not found!"
|
||||
if [ ! -d "$ReleasePath/$BinaryName.app.dSYM" ]; then
|
||||
echo "$BinaryName.app.dSYM not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
AppUUID=`dwarfdump -u "$ReleasePath/Telegram.app/Contents/MacOS/Telegram" | awk -F " " '{print $2}'`
|
||||
DsymUUID=`dwarfdump -u "$ReleasePath/Telegram.app.dSYM" | awk -F " " '{print $2}'`
|
||||
AppUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" | awk -F " " '{print $2}'`
|
||||
DsymUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app.dSYM" | awk -F " " '{print $2}'`
|
||||
if [ "$AppUUID" != "$DsymUUID" ]; then
|
||||
echo "UUID of binary '$AppUUID' and dSYM '$DsymUUID' differ!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$ReleasePath/Telegram.app/Contents/Resources/Icon.icns" ]; then
|
||||
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Resources/Icon.icns" ]; then
|
||||
echo "Icon.icns not found in Resources!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$ReleasePath/Telegram.app/Contents/MacOS/Telegram" ]; then
|
||||
echo "Telegram not found in MacOS!"
|
||||
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" ]; then
|
||||
echo "$BinaryName not found in MacOS!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$ReleasePath/Telegram.app/Contents/Frameworks/Updater" ]; then
|
||||
echo "Updater not found in Frameworks!"
|
||||
if [ ! -d "$ReleasePath/$BinaryName.app/Contents/_CodeSignature" ]; then
|
||||
echo "$BinaryName signature not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$ReleasePath/Telegram.app/Contents/_CodeSignature" ]; then
|
||||
echo "Telegram signature not found!"
|
||||
exit 1
|
||||
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then
|
||||
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then
|
||||
echo "Updater not found in Frameworks!"
|
||||
exit 1
|
||||
fi
|
||||
elif [ "$BuildTarget" == "macstore" ]; then
|
||||
if [ ! -f "$ReleasePath/$BinaryName.pkg" ]; then
|
||||
echo "$BinaryName.pkg not found!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
cd $ReleasePath
|
||||
temppath=`hdiutil attach -readwrite tsetup.dmg | awk -F "\t" 'END {print $3}'`
|
||||
cp -R ./Telegram.app "$temppath/"
|
||||
bless --folder "$temppath/" --openfolder "$temppath/"
|
||||
hdiutil detach "$temppath"
|
||||
hdiutil convert tsetup.dmg -format UDZO -imagekey zlib-level=9 -ov -o $SetupFile
|
||||
cd ./../../Telegram
|
||||
cd $ReleasePath && ./Packer.app/Contents/MacOS/Packer -path Telegram.app -version $AppVersion $DevParam && cd ./../../Telegram
|
||||
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then
|
||||
cd $ReleasePath
|
||||
temppath=`hdiutil attach -readwrite tsetup.dmg | awk -F "\t" 'END {print $3}'`
|
||||
cp -R "./$BinaryName.app" "$temppath/"
|
||||
bless --folder "$temppath/" --openfolder "$temppath/"
|
||||
hdiutil detach "$temppath"
|
||||
hdiutil convert tsetup.dmg -format UDZO -imagekey zlib-level=9 -ov -o $SetupFile
|
||||
cd ./../../Telegram
|
||||
cd $ReleasePath && ./Packer.app/Contents/MacOS/Packer -path "$BinaryName.app" -version $AppVersion $DevParam && cd ./../../Telegram
|
||||
fi
|
||||
|
||||
if [ ! -d "$ReleasePath/deploy" ]; then
|
||||
mkdir "$ReleasePath/deploy"
|
||||
@ -154,31 +168,44 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then
|
||||
mkdir "$ReleasePath/deploy/$AppVersionStrMajor"
|
||||
fi
|
||||
|
||||
echo "Copying Telegram.app and $UpdateFile to deploy/$AppVersionStrMajor/$AppVersionStr..";
|
||||
mkdir "$DeployPath"
|
||||
mkdir "$DeployPath/Telegram"
|
||||
cp -r $ReleasePath/Telegram.app $DeployPath/Telegram/
|
||||
mv $ReleasePath/Telegram.app.dSYM $DeployPath/
|
||||
rm $ReleasePath/Telegram.app/Contents/MacOS/Telegram
|
||||
rm $ReleasePath/Telegram.app/Contents/Frameworks/Updater
|
||||
rm -rf $ReleasePath/Telegram.app/Contents/_CodeSignature
|
||||
mv $ReleasePath/$UpdateFile $DeployPath/
|
||||
mv $ReleasePath/$SetupFile $DeployPath/
|
||||
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then
|
||||
echo "Copying $BinaryName.app and $UpdateFile to deploy/$AppVersionStrMajor/$AppVersionStr..";
|
||||
mkdir "$DeployPath"
|
||||
mkdir "$DeployPath/Telegram"
|
||||
cp -r "$ReleasePath/$BinaryName.app" $DeployPath/Telegram/
|
||||
mv "$ReleasePath/$BinaryName.app.dSYM" $DeployPath/
|
||||
rm "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName"
|
||||
rm "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater"
|
||||
rm -rf "$ReleasePath/$BinaryName.app/Contents/_CodeSignature"
|
||||
mv $ReleasePath/$UpdateFile $DeployPath/
|
||||
mv $ReleasePath/$SetupFile $DeployPath/
|
||||
|
||||
if [ "$BuildTarget" == "mac32" ]; then
|
||||
ReleaseToPath="./../../../TBuild/tother/tmac32"
|
||||
DeployToPath="$ReleaseToPath/$AppVersionStrMajor/$AppVersionStrFull"
|
||||
if [ ! -d "$ReleaseToPath/$AppVersionStrMajor" ]; then
|
||||
mkdir "$ReleaseToPath/$AppVersionStrMajor"
|
||||
if [ "$BuildTarget" == "mac32" ]; then
|
||||
ReleaseToPath="./../../../TBuild/tother/tmac32"
|
||||
DeployToPath="$ReleaseToPath/$AppVersionStrMajor/$AppVersionStrFull"
|
||||
if [ ! -d "$ReleaseToPath/$AppVersionStrMajor" ]; then
|
||||
mkdir "$ReleaseToPath/$AppVersionStrMajor"
|
||||
fi
|
||||
|
||||
if [ ! -d "$DeployToPath" ]; then
|
||||
mkdir "$DeployToPath"
|
||||
fi
|
||||
|
||||
cp -v $DeployPath/$UpdateFile $DeployToPath/
|
||||
cp -v $DeployPath/$SetupFile $DeployToPath/
|
||||
cp -rv $DeployPath/$BinaryName.app.dSYM $DeployToPath/
|
||||
fi
|
||||
elif [ "$BuildTarget" == "macstore" ]; then
|
||||
echo "Copying $BinaryName.app to deploy/$AppVersionStrMajor/$AppVersionStr..";
|
||||
mkdir "$DeployPath"
|
||||
cp -r "$ReleasePath/$BinaryName.app" $DeployPath/
|
||||
mv "$ReleasePath/$BinaryName.pkg" $DeployPath/
|
||||
mv "$ReleasePath/$BinaryName.app.dSYM" $DeployPath/
|
||||
rm "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName"
|
||||
rm -rf "$ReleasePath/$BinaryName.app/Contents/_CodeSignature"
|
||||
|
||||
if [ ! -d "$DeployToPath" ]; then
|
||||
mkdir "$DeployToPath"
|
||||
fi
|
||||
|
||||
cp -v $DeployPath/$UpdateFile $DeployToPath/
|
||||
cp -v $DeployPath/$SetupFile $DeployToPath/
|
||||
cp -rv $DeployPath/Telegram.app.dSYM $DeployToPath/
|
||||
cp -v "$DeployPath/$BinaryName.app" "$DropboxDeployPath/"
|
||||
cp -rv "$DeployPath/$BinaryName.app.dSYM" "$DropboxDeployPath/"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
10
Telegram/Deploy.sh
Normal file → Executable file
10
Telegram/Deploy.sh
Normal file → Executable file
@ -116,11 +116,11 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ] || [ "$Build
|
||||
|
||||
mv -v "$WinDeployPath" "$DropboxPath/"
|
||||
|
||||
cp -v "$DeployPath/$UpdateFile" "$DropboxDeployPath"
|
||||
cp -v "$DeployPath/$SetupFile" "$DropboxDeployPath"
|
||||
cp -rv "$DeployPath/Telegram.app.dSYM" "$DropboxDeployPath"
|
||||
cp -v "$Mac32DeployPath/$Mac32UpdateFile" "$DropboxDeployPath"
|
||||
cp -v "$Mac32DeployPath/$Mac32SetupFile" "$DropboxDeployPath"
|
||||
cp -v "$DeployPath/$UpdateFile" "$DropboxDeployPath/"
|
||||
cp -v "$DeployPath/$SetupFile" "$DropboxDeployPath/"
|
||||
cp -rv "$DeployPath/Telegram.app.dSYM" "$DropboxDeployPath/"
|
||||
cp -v "$Mac32DeployPath/$Mac32UpdateFile" "$DropboxDeployPath/"
|
||||
cp -v "$Mac32DeployPath/$Mac32SetupFile" "$DropboxDeployPath/"
|
||||
cp -rv "$DeployPath/Telegram.app.dSYM" "$DropboxDeployPath/Telegram32.app.dSYM"
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user