Pack compiler to portable / store version.

This commit is contained in:
John Preston 2021-07-20 17:37:09 +03:00
parent a6dbcdad54
commit c1c4314e52
3 changed files with 11 additions and 28 deletions

View File

@ -1443,7 +1443,7 @@ if ((NOT DESKTOP_APP_DISABLE_AUTOUPDATE OR APPLE) AND NOT build_macstore AND NOT
endif()
if (DESKTOP_APP_SPECIAL_TARGET)
add_executable(Packer WIN32)
add_executable(Packer)
init_target(Packer)
add_dependencies(Telegram Packer)

View File

@ -206,13 +206,7 @@ if %BuildUWP% equ 0 (
)
)
if %Build64% neq 0 (
set "ModulesFolder=x64"
) else (
set "ModulesFolder=x86"
)
call Packer.exe -version %VersionForPacker% -path %BinaryName%.exe -path Updater.exe -path "modules\!ModulesFolder!\d3d\d3dcompiler_47.dll" -target %BuildTarget% %AlphaBetaParam%
call Packer.exe -version %VersionForPacker% -path %BinaryName%.exe -path Updater.exe -path "modules\%Platform%\d3d\d3dcompiler_47.dll" -target %BuildTarget% %AlphaBetaParam%
if %errorlevel% neq 0 goto error
if %AlphaVersion% neq 0 (
@ -249,24 +243,17 @@ echo Done!
if %BuildUWP% neq 0 (
cd "%HomePath%"
mkdir "%ReleasePath%\AppX"
mkdir "%ReleasePath%\AppX\modules\%Platform%\d3d"
xcopy "Resources\uwp\AppX\*" "%ReleasePath%\AppX\" /E
set "ResourcePath=%ReleasePath%\AppX\AppxManifest.xml"
if %Build64% equ 0 (
call :repl "Argument= (ProcessorArchitecture=)"ARCHITECTURE"/ $1"x86"" "Filename=!ResourcePath!" || goto error
) else (
call :repl "Argument= (ProcessorArchitecture=)"ARCHITECTURE"/ $1"x64"" "Filename=!ResourcePath!" || goto error
)
call :repl "Argument= (ProcessorArchitecture=)"ARCHITECTURE"/ $1"%Platform%"" "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\"
xcopy "%ReleasePath%\modules\%Platform%\d3d\d3dcompiler_47.dll" "%ReleasePath%\AppX\modules\%Platform%\d3d\"
if %Build64% equ 0 (
MakeAppx.exe pack /d "%ReleasePath%\AppX" /l /p ..\out\Release\%BinaryName%.x86.appx
) else (
MakeAppx.exe pack /d "%ReleasePath%\AppX" /l /p ..\out\Release\%BinaryName%.x64.appx
)
MakeAppx.exe pack /d "%ReleasePath%\AppX" /l /p ..\out\Release\%BinaryName%.%Platform%.appx
if %errorlevel% neq 0 goto error
if not exist "%ReleasePath%\deploy" mkdir "%ReleasePath%\deploy"
@ -274,11 +261,7 @@ if %BuildUWP% neq 0 (
mkdir "%DeployPath%"
move "%ReleasePath%\%BinaryName%.pdb" "%DeployPath%\"
if %Build64% equ 0 (
move "%ReleasePath%\%BinaryName%.x86.appx" "%DeployPath%\"
) else (
move "%ReleasePath%\%BinaryName%.x64.appx" "%DeployPath%\"
)
move "%ReleasePath%\%BinaryName%.%Platform%.appx" "%DeployPath%\"
move "%ReleasePath%\%BinaryName%.exe" "%DeployPath%\"
if "%AlphaBetaParam%" equ "" (
@ -289,11 +272,11 @@ if %BuildUWP% neq 0 (
) else (
if not exist "%ReleasePath%\deploy" mkdir "%ReleasePath%\deploy"
if not exist "%ReleasePath%\deploy\%AppVersionStrMajor%" mkdir "%ReleasePath%\deploy\%AppVersionStrMajor%"
mkdir "%DeployPath%"
mkdir "%DeployPath%\%BinaryName%"
mkdir "%DeployPath%\%BinaryName%\modules\%Platform%\d3d"
if %errorlevel% neq 0 goto error
move "%ReleasePath%\%BinaryName%.exe" "%DeployPath%\%BinaryName%\"
xcopy "%ReleasePath%\modules\%Platform%\d3d\d3dcompiler_47.dll" "%DeployPath%\%BinaryName%\modules\%Platform%\d3d\"
move "%ReleasePath%\Updater.exe" "%DeployPath%\"
move "%ReleasePath%\%BinaryName%.pdb" "%DeployPath%\"
move "%ReleasePath%\Updater.pdb" "%DeployPath%\"

View File

@ -42,7 +42,7 @@ OutputBaseFilename=tsetup.{#MyAppVersionFull}
#define ArchModulesFolder "x86"
#endif
#define ModulesFolder "modules\{#ArchModulesFolder}"
#define ModulesFolder "modules\" + ArchModulesFolder
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
@ -62,7 +62,7 @@ Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescrip
[Files]
Source: "{#ReleasePath}\Telegram.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#ReleasePath}\Updater.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#ReleasePath}\{#ModulesFolder}\d3d\d3dcompiler_47.dll; DestDir: "{app}\{#ModulesFolder}\d3d"; Flags: ignoreversion
Source: "{#ReleasePath}\{#ModulesFolder}\d3d\d3dcompiler_47.dll"; DestDir: "{app}\{#ModulesFolder}\d3d"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]