Skip to content

Commit

Permalink
Second attempt to fix the build script
Browse files Browse the repository at this point in the history
  • Loading branch information
FrayxRulez committed Apr 9, 2023
1 parent adc5e64 commit a66a671
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Telegram.Msix/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:uap4="http://schemas.microsoft.com/appx/manifest/uap/windows10/4" xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4" xmlns:iot2="http://schemas.microsoft.com/appx/manifest/iot/windows10/2" xmlns:uap6="http://schemas.microsoft.com/appx/manifest/uap/windows10/6" IgnorableNamespaces="uap uap3 uap4 uap5 mp rescap desktop desktop4 iot2 uap6">
<Identity Name="38833FF26BA1D.UnigramExperimental" Publisher="CN=D89C87B4-2758-402A-8F40-3571D00882AB" Version="9.5.8088.0" />
<Identity Name="38833FF26BA1D.UnigramPreview" Publisher="CN=D89C87B4-2758-402A-8F40-3571D00882AB" Version="9.5.8145.0" />
<mp:PhoneIdentity PhoneProductId="bf16cc61-265a-4c8a-9ead-f4f77e6a0a97" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>Unigram Experimental</DisplayName>
<DisplayName>Unigram—Telegram for Windows</DisplayName>
<PublisherDisplayName>Unigram, Inc.</PublisherDisplayName>
<Logo>Assets\Logos\StoreLogo.png</Logo>
</Properties>
Expand All @@ -16,7 +16,7 @@
<Applications>
<!-- desktop4:SupportsMultipleInstances="true" -->
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="Telegram.App">
<uap:VisualElements DisplayName="Telegram" Square150x150Logo="Assets\Logos\Square150x150Logo.png" Square44x44Logo="Assets\Logos\Square44x44Logo.png" Description="Unigram" BackgroundColor="#404040">
<uap:VisualElements DisplayName="Unigram" Square150x150Logo="Assets\Logos\Square150x150Logo.png" Square44x44Logo="Assets\Logos\Square44x44Logo.png" Description="Unigram" BackgroundColor="#404040">
<uap:LockScreen Notification="badgeAndTileText" BadgeLogo="Assets\Logos\LockScreenLogo.png" />
<uap:DefaultTile Wide310x150Logo="Assets\Logos\Wide310x150Logo.png" Square71x71Logo="Assets\Logos\Square71x71Logo.png" Square310x310Logo="Assets\Logos\Square310x310Logo.png">
<uap:ShowNameOnTiles>
Expand Down
15 changes: 11 additions & 4 deletions Telegram.Msix/Telegram.Msix.wapproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@
<ProjectGuid>c7232c9f-b812-4073-8185-d524b6425b71</ProjectGuid>
<TargetPlatformVersion>10.0.22621.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion>
<DefaultLanguage>en-US</DefaultLanguage>
<PackageCertificateKeyFile>Telegram_StoreKey.pfx</PackageCertificateKeyFile>
<DefaultLanguage>en</DefaultLanguage>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<AppxSymbolPackageEnabled>True</AppxSymbolPackageEnabled>
Expand All @@ -65,7 +64,8 @@
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<EntryPointProjectUniqueName>..\Unigram\Telegram.csproj</EntryPointProjectUniqueName>
<EntryPointProjectUniqueName>..\Telegram\Telegram.csproj</EntryPointProjectUniqueName>
<PackageCertificateKeyFile>Telegram.Msix_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
<AppxBundle>Always</AppxBundle>
Expand Down Expand Up @@ -107,19 +107,26 @@
<AppxBundle>Always</AppxBundle>
<DefaultLanguage>en</DefaultLanguage>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>
powershell.exe -NoProfile -ExecutionPolicy RemoteSigned -file "$(SolutionDir)UpdateManifest.ps1" -path "$(ProjectDir)..\Telegram.Msix" -config "$(ConfigurationName)" -mode "$(UapAppxPackageBuildMode)"
</PreBuildEvent>
</PropertyGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<None Include="Telegram_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<None Include="Telegram_StoreKey.pfx" />
<None Include="Package.StoreAssociation.xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Telegram.Stub\Telegram.Stub.csproj" />
<ProjectReference Include="..\Telegram\Telegram.csproj" />
</ItemGroup>
<ItemGroup>
<None Include="Telegram.Msix_TemporaryKey.pfx" />
</ItemGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
</Project>
1 change: 0 additions & 1 deletion Telegram/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public static partial class Constants
public static readonly string AppCenterId;
public static readonly string BingMapsApiKey;


public const int TypingTimeout = 300;
public const int HoldingThrottle = 500;
public const int AnimatedThrottle = 200;
Expand Down
2 changes: 1 addition & 1 deletion Telegram/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:uap4="http://schemas.microsoft.com/appx/manifest/uap/windows10/4" xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4" xmlns:iot2="http://schemas.microsoft.com/appx/manifest/iot/windows10/2" xmlns:uap6="http://schemas.microsoft.com/appx/manifest/uap/windows10/6" IgnorableNamespaces="uap uap3 uap4 uap5 mp rescap desktop desktop4 iot2 uap6">
<Identity Name="38833FF26BA1D.UnigramExperimental" Publisher="CN=D89C87B4-2758-402A-8F40-3571D00882AB" Version="9.5.8088.0" />
<Identity Name="38833FF26BA1D.UnigramExperimental" Publisher="CN=D89C87B4-2758-402A-8F40-3571D00882AB" Version="9.5.8145.0" />
<mp:PhoneIdentity PhoneProductId="bf16cc61-265a-4c8a-9ead-f4f77e6a0a97" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>Unigram Experimental</DisplayName>
Expand Down
4 changes: 2 additions & 2 deletions Telegram/Telegram.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2678,8 +2678,8 @@
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>powershell.exe -NoProfile -ExecutionPolicy RemoteSigned -file "$(SolutionDir)UpdateManifest.ps1" -path "$(ProjectDir)\" -config "$(ConfigurationName)" -test "$(AppxTestLayoutEnabled)" -mode "$(UapAppxPackageBuildMode)"
powershell.exe -NoProfile -ExecutionPolicy RemoteSigned -file "$(SolutionDir)UpdateManifest.ps1" -path "$(ProjectDir)..\Telegram.Msix" -config "$(ConfigurationName)" -test "$(AppxTestLayoutEnabled)" -mode "$(UapAppxPackageBuildMode)"</PreBuildEvent>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>
Expand Down
5 changes: 0 additions & 5 deletions UpdateManifest.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
param (
[string]$path = $(throw "-path is required"),
[string]$config = "DEBUG",
[string]$test = "false",
[string]$mode = ""
)

Write-Output "Config: $config"
Write-Output "Path: $path"
Write-Output "Test: $test"
Write-Output "Mode: $mode"

$path = Resolve-Path $path
Expand All @@ -16,9 +14,6 @@ $path_manifest = "${path}\Package.appxmanifest"
$config = $config.ToUpper()

if ($config -eq "RELEASE") {
if ($test -eq "true") {
$config = "DEBUG"
}
elseif ($mode -eq "SideloadOnly") {
$config = "DIRECT"
}
Expand Down

0 comments on commit a66a671

Please sign in to comment.