Improve icons and scripts for Windows Store.

This commit is contained in:
John Preston 2017-04-05 20:02:25 +03:00
parent b2f1177661
commit 8504bbb9d5
32 changed files with 171 additions and 65 deletions

View File

@ -7,7 +7,7 @@
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap uap2 uap3 rescap">
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
ProcessorArchitecture="x64"
ProcessorArchitecture="ARCHITECTURE"
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
Version="1.0.29.0" />
<Properties>
@ -28,7 +28,7 @@
<Applications>
<Application Id="Telegram.TelegramDesktop.Store" Executable="Telegram.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements
BackgroundColor="transparent"
BackgroundColor="#1e94d0"
DisplayName="Telegram Desktop"
Square150x150Logo="Assets\logo150\logo150.png"
Square44x44Logo="Assets\logo44\logo44.png"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 852 B

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -3,14 +3,6 @@ setlocal enabledelayedexpansion
set "FullScriptPath=%~dp0"
set "FullExecPath=%cd%"
set "BuildPlatform=%1"
if "%BuildPlatform%" neq "uwp" (
set "BuildUWP=0"
) else (
set "BuildUWP=1"
)
if not exist "%FullScriptPath%..\..\..\TelegramPrivate" (
echo.
echo This script is for building the production version of Telegram Desktop.
@ -20,6 +12,14 @@ if not exist "%FullScriptPath%..\..\..\TelegramPrivate" (
exit /b
)
FOR /F "tokens=1* delims= " %%i in (%FullScriptPath%target) do set "BuildTarget=%%i"
if "%BuildTarget%" equ "uwp" (
set "BuildUWP=1"
) else (
set "BuildUWP=0"
)
FOR /F "tokens=1,2* delims= " %%i in (%FullScriptPath%version) do set "%%i=%%j"
set "VersionForPacker=%AppVersion%"
@ -71,58 +71,41 @@ if not exist %FinalReleasePath% (
)
if %BuildUWP% neq 0 (
if exist %ReleasePath%\deploy\%AppVersionStrMajor%\%AppVersionStr%\AppX\ (
echo UWP deploy folder for version %AppVersionStr% already exists!
exit /b 1
)
if exist %ReleasePath%\AppX\ (
echo Result folder out\Release\AppX already exists!
exit /b 1
)
if "%AlphaBetaParam%" equ "" (
if not exist %ReleasePath%\deploy\%AppVersionStrMajor%\%AppVersionStr%\ (
echo Deploy folder for version %AppVersionStr% does not exist!
exit /b 1
)
)
if %BetaVersion% neq 0 (
if exist %DeployPath%\ (
echo Deploy folder for version %AppVersionStr% already exists!
exit /b 1
)
if exist %ReleasePath%\%BetaKeyFile% (
echo Beta version key file for version %AppVersion% already exists!
exit /b 1
)
) else (
if %BetaVersion% neq 0 (
if exist %DeployPath%\ (
echo Deploy folder for version %AppVersionStr% already exists!
exit /b 1
)
if exist %ReleasePath%\%BetaKeyFile% (
echo Beta version key file for version %AppVersion% already exists!
exit /b 1
)
) else (
if exist %ReleasePath%\deploy\%AppVersionStrMajor%\%AppVersionStr%.alpha\ (
echo Deploy folder for version %AppVersionStr%.alpha already exists!
exit /b 1
)
if exist %ReleasePath%\deploy\%AppVersionStrMajor%\%AppVersionStr%.dev\ (
echo Deploy folder for version %AppVersionStr%.dev already exists!
exit /b 1
)
if exist %ReleasePath%\deploy\%AppVersionStrMajor%\%AppVersionStr%\ (
echo Deploy folder for version %AppVersionStr% already exists!
exit /b 1
)
if exist %ReleasePath%\tupdate%AppVersion% (
echo Update file for version %AppVersion% already exists!
exit /b 1
)
if exist %ReleasePath%\deploy\%AppVersionStrMajor%\%AppVersionStr%.alpha\ (
echo Deploy folder for version %AppVersionStr%.alpha already exists!
exit /b 1
)
if exist %ReleasePath%\deploy\%AppVersionStrMajor%\%AppVersionStr%.dev\ (
echo Deploy folder for version %AppVersionStr%.dev already exists!
exit /b 1
)
if exist %ReleasePath%\deploy\%AppVersionStrMajor%\%AppVersionStr%\ (
echo Deploy folder for version %AppVersionStr% already exists!
exit /b 1
)
if exist %ReleasePath%\tupdate%AppVersion% (
echo Update file for version %AppVersion% already exists!
exit /b 1
)
)
cd "%HomePath%"
if %BuildUWP% neq 0 (
echo uwp > build\target
) else (
echo win > build\target
)
call gyp\refresh.bat
if %errorlevel% neq 0 goto error
@ -196,27 +179,47 @@ echo Done!
if %BuildUWP% neq 0 (
cd "%HomePath%"
mkdir "%ReleasePath%\AppX"
xcopy /e "Resources\uwp\AppX\*" "%ReleasePath%\AppX\"
mkdir "%ReleasePath%\AppX_x86"
xcopy "Resources\uwp\AppX\*" "%ReleasePath%\AppX_x86\" /E
set "ResourcePath=%ReleasePath%\AppX_x86\AppxManifest.xml"
call :repl "Argument= (ProcessorArchitecture=)&quot;ARCHITECTURE&quot;/ $1&quot;x86&quot;" "Filename=!ResourcePath!" || goto error
makepri new /pr Resources\uwp\AppX\ /cf Resources\uwp\priconfig.xml /mn %ReleasePath%\AppX\AppxManifest.xml /of %ReleasePath%\AppX\resources.pri
makepri new /pr Resources\uwp\AppX\ /cf Resources\uwp\priconfig.xml /mn %ReleasePath%\AppX_x86\AppxManifest.xml /of %ReleasePath%\AppX_x86\resources.pri
if %errorlevel% neq 0 goto error
move "%ReleasePath%\%BinaryName%.exe" "%ReleasePath%\AppX\"
xcopy "%ReleasePath%\%BinaryName%.exe" "%ReleasePath%\AppX_x86\"
MakeAppx.exe pack /d "%ReleasePath%\AppX" /l /p ..\out\Release\%BinaryName%.appx
MakeAppx.exe pack /d "%ReleasePath%\AppX_x86" /l /p ..\out\Release\%BinaryName%.x86.appx
if %errorlevel% neq 0 goto error
rem call "%SignAppxPath%" "..\out\Release\%BinaryName%.appx"
mkdir "%ReleasePath%\AppX_x64"
xcopy "Resources\uwp\AppX\*" "%ReleasePath%\AppX_x64\" /E
set "ResourcePath=%ReleasePath%\AppX_x64\AppxManifest.xml"
call :repl "Argument= (ProcessorArchitecture=)&quot;ARCHITECTURE&quot;/ $1&quot;x64&quot;" "Filename=!ResourcePath!" || goto error
xcopy "%ReleasePath%\%BinaryName%.pdb" "%ReleasePath%\AppX\"
move "%ReleasePath%\%BinaryName%.exe.pdb" "%ReleasePath%\AppX\"
move "%ReleasePath%\%BinaryName%.appx" "%ReleasePath%\AppX\"
makepri new /pr Resources\uwp\AppX\ /cf Resources\uwp\priconfig.xml /mn %ReleasePath%\AppX_x64\AppxManifest.xml /of %ReleasePath%\AppX_x64\resources.pri
if %errorlevel% neq 0 goto error
xcopy "%ReleasePath%\%BinaryName%.exe" "%ReleasePath%\AppX_x64\"
MakeAppx.exe pack /d "%ReleasePath%\AppX_x64" /l /p ..\out\Release\%BinaryName%.x64.appx
if %errorlevel% neq 0 goto error
if not exist "%ReleasePath%\deploy" mkdir "%ReleasePath%\deploy"
if not exist "%ReleasePath%\deploy\%AppVersionStrMajor%" mkdir "%ReleasePath%\deploy\%AppVersionStrMajor%"
mkdir "%DeployPath%"
xcopy "%ReleasePath%\%BinaryName%.pdb" "%DeployPath%\"
move "%ReleasePath%\%BinaryName%.exe.pdb" "%DeployPath%\"
move "%ReleasePath%\%BinaryName%.x86.appx" "%DeployPath%\"
move "%ReleasePath%\%BinaryName%.x64.appx" "%DeployPath%\"
move "%ReleasePath%\%BinaryName%.exe" "%DeployPath%\"
if "%AlphaBetaParam%" equ "" (
move "%ReleasePath%\AppX" "%DeployPath%\"
move "%ReleasePath%\AppX_x86" "%DeployPath%\AppX_x86"
move "%ReleasePath%\AppX_x64" "%DeployPath%\AppX_x64"
) else (
echo Leaving result in out\Release\AppX for now..
echo Leaving result in out\Release\AppX_arch for now..
)
) else (
if not exist "%ReleasePath%\deploy" mkdir "%ReleasePath%\deploy"
@ -264,10 +267,10 @@ if %BuildUWP% equ 0 (
if not exist "%FinalReleasePath%\%AppVersionStrMajor%" mkdir "%FinalReleasePath%\%AppVersionStrMajor%"
if not exist "%FinalDeployPath%" mkdir "%FinalDeployPath%"
xcopy "%DeployPath%\%UpdateFile%" "%FinalDeployPath%\"
xcopy "%DeployPath%\%PortableFile%" "%FinalDeployPath%\"
xcopy "%DeployPath%\%UpdateFile%" "%FinalDeployPath%\" /Y
xcopy "%DeployPath%\%PortableFile%" "%FinalDeployPath%\" /Y
if %BetaVersion% equ 0 (
xcopy "%DeployPath%\%SetupFile%" "%FinalDeployPath%\"
xcopy "%DeployPath%\%SetupFile%" "%FinalDeployPath%\" /Y
) else (
xcopy "%DeployPath%\%BetaKeyFile%" "%FinalDeployPath%\" /Y
)
@ -290,3 +293,25 @@ exit /b
cd "%FullExecPath%"
exit /b !ErrorCode!
)
:repl
(
set %1
set %2
set "TempFilename=!Filename!__tmp__"
cscript //Nologo "%FullScriptPath%replace.vbs" "Replace" "!Argument!" < "!Filename!" > "!TempFilename!" || goto :repl_finish
xcopy /Y !TempFilename! !Filename! >NUL || goto :repl_finish
goto :repl_finish
)
:repl_finish
(
set ErrorCode=%errorlevel%
if !ErrorCode! neq 0 (
echo Replace error !ErrorCode!
echo While replacing "%Replace%"
echo In file "%Filename%"
)
del %TempFilename%
exit /b !ErrorCode!
)

View File

@ -0,0 +1,81 @@
@echo OFF
setlocal enabledelayedexpansion
set "FullScriptPath=%~dp0"
set "FullExecPath=%cd%"
if not exist "%FullScriptPath%..\..\..\TelegramPrivate" (
echo.
echo This script is for building the production version of Telegram Desktop.
echo.
echo For building custom versions please visit the build instructions page at:
echo https://github.com/telegramdesktop/tdesktop/#build-instructions
exit /b
)
set "HomePath=%FullScriptPath%.."
set "SignAppxPath=%HomePath%\..\..\TelegramPrivate\AppxSign.bat"
set "ResourcesPath=%HomePath%\Resources"
set "SolutionPath=%HomePath%\.."
set "ReleasePath=%HomePath%\..\out\Debug"
set "BinaryName=Telegram"
if exist %ReleasePath%\AppX\ (
echo Result folder out\Debug\AppX already exists!
exit /b 1
)
cd "%HomePath%"
call gyp\refresh.bat
if %errorlevel% neq 0 goto error
cd "%SolutionPath%"
call ninja -C out/Debug Telegram
if %errorlevel% neq 0 goto error
cd "%HomePath%"
mkdir "%ReleasePath%\AppX"
xcopy "Resources\uwp\AppX\*" "%ReleasePath%\AppX\" /E
set "ResourcePath=%ReleasePath%\AppX\AppxManifest.xml"
call :repl "Argument= (Publisher=)&quot;CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A&quot;/ $1&quot;CN=Telegram Messenger LLP, O=Telegram Messenger LLP, L=London, C=GB&quot;" "Filename=%ResourcePath%" || goto :error
call :repl "Argument= (ProcessorArchitecture=)&quot;ARCHITECTURE&quot;/ $1&quot;x64&quot;" "Filename=%ResourcePath%" || goto :error
makepri new /pr Resources\uwp\AppX\ /cf Resources\uwp\priconfig.xml /mn %ReleasePath%\AppX\AppxManifest.xml /of %ReleasePath%\AppX\resources.pri
if %errorlevel% neq 0 goto error
xcopy "%ReleasePath%\%BinaryName%.exe" "%ReleasePath%\AppX\"
MakeAppx.exe pack /d "%ReleasePath%\AppX" /l /p ..\out\Debug\%BinaryName%.appx
if %errorlevel% neq 0 goto error
call "%SignAppxPath%" "..\out\Debug\%BinaryName%.appx"
move "%ReleasePath%\%BinaryName%.appx" "%ReleasePath%\AppX\"
echo Done.
exit /b
:repl
(
set %1
set %2
set "TempFilename=!Filename!__tmp__"
cscript //Nologo "%FullScriptPath%replace.vbs" "Replace" "!Argument!" < "!Filename!" > "!TempFilename!" || goto :repl_finish
xcopy /Y !TempFilename! !Filename! >NUL || goto :repl_finish
goto :repl_finish
)
:repl_finish
(
set ErrorCode=%errorlevel%
if !ErrorCode! neq 0 (
echo Replace error !ErrorCode!
echo While replacing "%Replace%"
echo In file "%Filename%"
)
del %TempFilename%
exit /b !ErrorCode!
)