Installer updates
This commit is contained in:
parent
c3dc70ac9b
commit
6a57a39bf2
1
.gitignore
vendored
1
.gitignore
vendored
@ -267,6 +267,7 @@ build/TestPackage/*
|
||||
build/PlayniteServices/*
|
||||
build/ReleaseSDK/*
|
||||
build/DebugSDK/*
|
||||
build/Playnite.zip
|
||||
|
||||
tests/TestConfig.yaml
|
||||
|
||||
|
@ -19,6 +19,6 @@ artifacts:
|
||||
- path: 'build\Playnite.zip'
|
||||
deploy:
|
||||
- provider: Webhook
|
||||
url: https://app.signpath.io/API/v1/4028e7e6-f183-4bbf-9640-c4b4d9a6992d/Integrations/AppVeyor?ProjectSlug=Playnite&SigningPolicySlug=test-signing
|
||||
url: https://app.signpath.io/API/v1/4028e7e6-f183-4bbf-9640-c4b4d9a6992d/Integrations/AppVeyor?ProjectSlug=Playnite&SigningPolicySlug=release-signing
|
||||
authorization:
|
||||
secure: ZXw8Ro7eQ0opsdjLpNH7ZgTgS8ycnud7ag2qNOMRvqdxBmvegj+7QHrsh4pSgTSINhB5tbTZwgiMKFDjJV9QHg==
|
@ -16,15 +16,12 @@
|
||||
# Target directory for installer files
|
||||
[string]$InstallerDir,
|
||||
|
||||
# Build portable package
|
||||
# Package build output into zip file
|
||||
[switch]$Package = $false,
|
||||
|
||||
# Skip build process
|
||||
[switch]$SkipBuild = $false,
|
||||
|
||||
# Sign binary files
|
||||
[string]$Sign,
|
||||
|
||||
# Temp directory for build process
|
||||
[string]$TempDir = (Join-Path $env:TEMP "PlayniteBuild"),
|
||||
|
||||
@ -116,17 +113,6 @@ if (!$SkipBuild)
|
||||
{
|
||||
throw "Build failed."
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($Sign)
|
||||
{
|
||||
Join-Path $OutputDir "Playnite.dll" | SignFile
|
||||
Join-Path $OutputDir "Playnite.Common.dll" | SignFile
|
||||
Join-Path $OutputDir "Playnite.SDK.dll" | SignFile
|
||||
Join-Path $OutputDir "Playnite.DesktopApp.exe" | SignFile
|
||||
Join-Path $OutputDir "Playnite.FullscreenApp.exe" | SignFile
|
||||
}
|
||||
}
|
||||
|
||||
# Copy extension templates
|
||||
PackExtensionTemplate "CustomLibraryPlugin" $OutputDir
|
||||
|
@ -75,25 +75,6 @@ function global:Get-MsBuildPath()
|
||||
throw "MS Build not found."
|
||||
}
|
||||
|
||||
function global:SignFile()
|
||||
{
|
||||
param(
|
||||
[Parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true)]
|
||||
[string]$Path
|
||||
)
|
||||
|
||||
process
|
||||
{
|
||||
Write-Host "Signing file `"$Path`"" -ForegroundColor Green
|
||||
$signToolPath = (Resolve-Path "c:\Program Files*\Windows Kits\*\bin\*\x86\signtool.exe").Path
|
||||
$res = StartAndWait $signToolPath ('sign /n "Open Source Developer, Josef Němec" /t http://time.certum.pl /v ' + "`"$Path`"")
|
||||
if ($res -ne 0)
|
||||
{
|
||||
throw "Failed to sign file."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function global:New-Folder()
|
||||
{
|
||||
param(
|
||||
|
@ -16,7 +16,7 @@
|
||||
<Color x:Key="MainColorDark">#252422</Color>
|
||||
<Color x:Key="HoverColor">#247BA0</Color>
|
||||
<Color x:Key="DefaultColor">#FF9BB1C5</Color>
|
||||
<Color x:Key="GlyphColor">#019fcb</Color>
|
||||
<Color x:Key="GlyphColor">#55CDFF</Color>
|
||||
<Color x:Key="HighlightGlyphColor">#33019fcb</Color>
|
||||
<Color x:Key="PopupBackgroundColor">#171e26</Color>
|
||||
<Color x:Key="PopupBorderColor">#3e6184</Color>
|
||||
|
@ -175,12 +175,18 @@ namespace PlayniteInstaller
|
||||
var args = string.Format(@"/VERYSILENT /NOCANCEL /DIR=""{0}"" ", DestionationFolder);
|
||||
args += Portable ? "/PORTABLE" : "";
|
||||
logger.Info($"Starting:\n{App.InstallerDownloadPath}\n{args}");
|
||||
|
||||
var installed = false;
|
||||
await Task.Run(() =>
|
||||
{
|
||||
using (var process = Process.Start(App.InstallerDownloadPath, args))
|
||||
{
|
||||
process.WaitForExit();
|
||||
if (process.ExitCode != 0)
|
||||
if (process.ExitCode == 0)
|
||||
{
|
||||
installed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.Error($"Installer failed {process.ExitCode}");
|
||||
System.Windows.MessageBox.Show(
|
||||
@ -188,18 +194,15 @@ namespace PlayniteInstaller
|
||||
"Installation error",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
Status = InstallStatus.Idle;
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var playnitePath = Path.Combine(DestionationFolder, "Playnite.DesktopApp.exe");
|
||||
if (File.Exists(playnitePath))
|
||||
FileSystem.DeleteFileSafe(App.InstallerDownloadPath);
|
||||
if (installed)
|
||||
{
|
||||
Process.Start(playnitePath);
|
||||
windowHost.Close();
|
||||
}
|
||||
|
||||
windowHost.Close();
|
||||
}
|
||||
catch (Exception e) when (!Debugger.IsAttached)
|
||||
{
|
||||
|
@ -36,7 +36,7 @@
|
||||
Visibility="{Binding Status, Converter={StaticResource InstallStatusToVisibilityConverter}, ConverterParameter={x:Static local:InstallStatus.Idle}}">
|
||||
<StackPanel>
|
||||
<DockPanel Margin="5">
|
||||
<TextBlock Text="Destionation Folder" DockPanel.Dock="Left" Margin="10,5,10,5" />
|
||||
<TextBlock Text="Destination Folder" DockPanel.Dock="Left" Margin="10,5,10,5" />
|
||||
<Button Content="Browse..." DockPanel.Dock="Right"
|
||||
Command="{Binding BrowseCommand}"
|
||||
Padding="10,0,10,0" Margin="10,0,10,0"/>
|
||||
|
@ -26,6 +26,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
|
Loading…
x
Reference in New Issue
Block a user