Skip to content

Commit

Permalink
Merge pull request #2885 from Wox-launcher/bao
Browse files Browse the repository at this point in the history
full installer
  • Loading branch information
bao-qian authored Apr 29, 2020
2 parents 59b476b + 2b8f2c0 commit d9c5440
Show file tree
Hide file tree
Showing 12 changed files with 225 additions and 6 deletions.
56 changes: 56 additions & 0 deletions Wox.Installer/Bundle.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<!-- todo run installer again, should not display uninstall -->
<?ifdef env.APPVEYOR_BUILD_VERSION ?>
<?define WoxVersion = $(env.APPVEYOR_BUILD_VERSION) ?>
<?else?>
<?define WoxVersion = "1.5.0"?>
<?endif?>
<Bundle
Name="Wox Full Installer $(var.WoxVersion)"
Version="$(var.WoxVersion)"
Manufacturer="Wox"
UpgradeCode="f96edd7f-00c8-44b8-8ac7-1d500bbbaeea"
DisableModify="yes"
DisableRemove="yes"
IconSourceFile="..\Wox\Resources\app.ico"
Copyright="Wox"
>
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication
LicenseUrl=""
LogoFile="installer.png"
SuppressRepair="yes"
SuppressOptionsUI="yes"
ShowVersion="yes"
ThemeFile="InstallerTheme.xml"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" />
</BootstrapperApplicationRef>

<!-- default to choose -->
<Variable Name="WoxCheckbox" Value="1"/>
<Variable Name="EverythingCheckbox" Value="1"/>
<Variable Name="PythonCheckbox" Value="1"/>

<Chain>
<!--passive / no ui install. use exe cause cannot find a way to install msi with command line argument-->
<ExePackage
SourceFile="Everything-1.4.1.969.x64-Setup.exe"
InstallCommand="/S"
InstallCondition="EverythingCheckbox"
/>
<!-- passive / no ui install and add PATH env-->
<ExePackage
SourceFile="python-3.7.7.exe"
InstallCommand="/passive PrependPath=1 Include_doc=0 Include_test=0 Include_tcltk=0"
UninstallCommand="/uninstall"
InstallCondition="PythonCheckbox"
/>
<ExePackage
Id="WoxPackage"
SourceFile="..\Output\packages\Wox-$(var.WoxVersion).exe"
InstallCondition="WoxCheckbox"
/>
</Chain>
</Bundle>
</Wix>
Binary file added Wox.Installer/Everything-1.4.1.969.x64-Setup.exe
Binary file not shown.
84 changes: 84 additions & 0 deletions Wox.Installer/InstallerTheme.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
<Window Width="485" Height="300" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
<Font Id="0" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF">Segoe UI</Font>
<Font Id="1" Height="-24" Weight="500" Foreground="000000">Segoe UI</Font>
<Font Id="2" Height="-22" Weight="500" Foreground="666666">Segoe UI</Font>
<Font Id="3" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF">Segoe UI</Font>
<Font Id="4" Height="-12" Weight="500" Foreground="ff0000" Background="FFFFFF" Underline="yes">Segoe UI</Font>

<Image X="11" Y="11" Width="64" Height="64" ImageFile="logo.png" Visible="yes"/>
<Text X="80" Y="11" Width="-11" Height="64" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Text>

<Page Name="Help">
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Text>
<Text X="11" Y="112" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Text>
<Button Name="HelpCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.HelpCloseButton)</Button>
</Page>

<Page Name="Install">
<Hypertext Name="WelcomeText" X="11" Y="100" Width="-11" Height="20" TabStop="yes" FontId="3" >Wox Full Installer</Hypertext>
<Checkbox Name="WoxCheckbox" X="11" Y="120" Width="260" Height="20" TabStop="yes" FontId="3">Install Wox</Checkbox>
<Checkbox Name="EverythingCheckbox" X="11" Y="140" Width="260" Height="20" TabStop="yes" FontId="3">Install Everything</Checkbox>
<Checkbox Name="PythonCheckbox" X="11" Y="160" Width="260" Height="20" TabStop="yes" FontId="3">Install Python</Checkbox>

<Hypertext Name="EulaHyperlink" X="11" Y="121" Width="-11" Height="51" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext>
<Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
<Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.InstallOptionsButton)</Button>
<Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
<Button Name="WelcomeCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallCloseButton)</Button>
</Page>
<Page Name="Options">
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Text>
<Text X="11" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Text>
<Editbox Name="FolderEditbox" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
<Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">#(loc.OptionsBrowseButton)</Button>
<Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsOkButton)</Button>
<Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsCancelButton)</Button>
</Page>
<Page Name="FilesInUse">
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.FilesInUseHeader)</Text>
<Text X="11" Y="121" Width="-11" Height="34" FontId="3" DisablePrefix="yes">#(loc.FilesInUseLabel)</Text>
<Text Name="FilesInUseText" X="11" Y="150" Width="-11" Height="-86" FontId="3" DisablePrefix="yes" HexStyle="0x0000C000"></Text>

<Button Name="FilesInUseCloseRadioButton" X="11" Y="-60" Width="-11" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" HexStyle="0x000009">#(loc.FilesInUseCloseRadioButton)</Button>
<Button Name="FilesInUseDontCloseRadioButton" X="11" Y="-40" Width="-11" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" HexStyle="0x000009">#(loc.FilesInUseDontCloseRadioButton)</Button>

<Button Name="FilesInUseOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FilesInUseOkButton)</Button>
<Button Name="FilesInUseCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.FilesInUseCancelButton)</Button>
</Page>
<Page Name="Progress">
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Text>
<Text X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Text>
<Text Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Text>
<Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
<Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
</Page>
<Page Name="Modify">
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Text>
<Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
<Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
<Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyCloseButton)</Button>
</Page>
<Page Name="Success">
<Text Name="SuccessHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessHeader)</Text>
<Text Name="SuccessInstallHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessInstallHeader)</Text>
<Text Name="SuccessRepairHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessRepairHeader)</Text>
<Text Name="SuccessUninstallHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessUninstallHeader)</Text>
<Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
<Text Name="SuccessRestartText" X="-11" Y="-51" Width="400" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessRestartText)</Text>
<Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
<Button Name="SuccessCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.SuccessCloseButton)</Button>
</Page>
<Page Name="Failure">
<Text Name="FailureHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureHeader)</Text>
<Text Name="FailureInstallHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureInstallHeader)</Text>
<Text Name="FailureUninstallHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureUninstallHeader)</Text>
<Text Name="FailureRepairHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureRepairHeader)</Text>
<Hypertext Name="FailureLogFileLink" X="11" Y="121" Width="-11" Height="42" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
<Hypertext Name="FailureMessageText" X="22" Y="163" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
<Text Name="FailureRestartText" X="-11" Y="-51" Width="400" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureRestartText)</Text>
<Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
<Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.FailureCloseButton)</Button>
</Page>
</Theme>
64 changes: 64 additions & 0 deletions Wox.Installer/Wox.Installer.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>f96edd7f-00c8-44b8-8ac7-1d500bbbaeea</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Wox-Full-Installer</OutputName>
<OutputType>Bundle</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<OutputPath>..\Output\packages\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>
</DefineConstants>
<WixVariables>
</WixVariables>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>..\Output\packages\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>
</DefineConstants>
<WixVariables>
</WixVariables>
</PropertyGroup>
<ItemGroup>
<Compile Include="Bundle.wxs" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixBalExtension">
<HintPath>$(WixExtDir)\WixBalExtension.dll</HintPath>
<Name>WixBalExtension</Name>
</WixExtension>
</ItemGroup>
<ItemGroup>
<Content Include="post_build.ps1" />
<Content Include="installer.png" />
<Content Include="InstallerTheme.xml" />
<Content Include="before_build.ps1" />
<Content Include="wox.nuspec" />
<Content Include="wox.plugin.nuspec" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
</Target>
<PropertyGroup>
<PostBuildEvent>powershell.exe -NoProfile -ExecutionPolicy Bypass -File $(ProjectDir)post_build.ps1 -solution $(ProjectDir)..\</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>powershell.exe -NoProfile -ExecutionPolicy Bypass -File $(ProjectDir)before_build.ps1 -solution $(ProjectDir)..\</PreBuildEvent>
</PropertyGroup>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
5 changes: 3 additions & 2 deletions Scripts/post_build.ps1 → Wox.Installer/before_build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function Validate-Directory ($output) {
function Pack-Nuget-API ($path, $version, $output) {
Write-Host "Begin build nuget library"

$spec = "$path\Scripts\wox.plugin.nuspec"
$spec = "$path\Wox.Installer\wox.plugin.nuspec"
Write-Host "nuspec path: $spec"
Write-Host "Output path: $output"

Expand All @@ -95,7 +95,7 @@ function Pack-Squirrel-Installer ($path, $version, $output) {
# msbuild based installer generation is not working in appveyor, not sure why
Write-Host "Begin pack squirrel installer"

$spec = "$path\Scripts\wox.nuspec"
$spec = "$path\Wox.Installer\wox.nuspec"
Write-Host "nuspec path: $spec"
$input = "$path\Output\$config"
Write-Host "Input path: $input"
Expand Down Expand Up @@ -126,6 +126,7 @@ function Pack-Squirrel-Installer ($path, $version, $output) {
}

function Main {
Write-Host $(Get-Location)
Write-Host "Config: $config"
$p = Build-Path
$v = Build-Version
Expand Down
Binary file added Wox.Installer/installer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions Wox.Installer/post_build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
param(
[string]$solution = "."
)
$ErrorActionPreference = "Stop"

$path = "$solution\Output\packages"
$installer = "$path\Wox-Full-Installer.exe"
$version = (Get-Command $installer).FileVersionInfo.ProductVersion
$newName = "$path\Wox-Full-Installer.$version.exe"
Move-Item -Force $installer $newName
Binary file added Wox.Installer/python-3.7.7.exe
Binary file not shown.
File renamed without changes.
File renamed without changes.
8 changes: 7 additions & 1 deletion Wox.sln
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.gitignore = .gitignore
appveyor.yml = appveyor.yml
LICENSE = LICENSE
Scripts\post_build.ps1 = Scripts\post_build.ps1
README.md = README.md
SolutionAssemblyInfo.cs = SolutionAssemblyInfo.cs
Scripts\wox.nuspec = Scripts\wox.nuspec
Expand All @@ -75,6 +74,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Plugin.Calculator", "Pl
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wox.Plugin.BrowserBookmark", "Plugins\Wox.Plugin.BrowserBookmark\Wox.Plugin.BrowserBookmark.csproj", "{9B130CC5-14FB-41FF-B310-0A95B6894C37}"
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Wox.Installer", "Wox.Installer\Wox.Installer.wixproj", "{F96EDD7F-00C8-44B8-8AC7-1D500BBBAEEA}"
ProjectSection(ProjectDependencies) = postProject
{DB90F671-D861-46BB-93A3-F1304F5BA1C5} = {DB90F671-D861-46BB-93A3-F1304F5BA1C5}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -158,6 +162,8 @@ Global
{9B130CC5-14FB-41FF-B310-0A95B6894C37}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9B130CC5-14FB-41FF-B310-0A95B6894C37}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9B130CC5-14FB-41FF-B310-0A95B6894C37}.Release|Any CPU.Build.0 = Release|Any CPU
{F96EDD7F-00C8-44B8-8AC7-1D500BBBAEEA}.Debug|Any CPU.ActiveCfg = Debug|x64
{F96EDD7F-00C8-44B8-8AC7-1D500BBBAEEA}.Release|Any CPU.ActiveCfg = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
4 changes: 1 addition & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: 1.3.{build}
image: Visual Studio 2019
configuration: Release
platform: Any CPU
assembly_info:
patch: true
file: AssemblyInfo.*
Expand All @@ -14,7 +13,7 @@ build:
project: Wox.sln
after_test:
- ps: Copy-Item $env:APPDATA\Wox\Logs\*\*.txt .
- ps: powershell.exe -NoProfile -ExecutionPolicy Bypass -File Scripts\post_build.ps1
- msbuild Wox.Installer\Wox.Installer.wixproj /p:Configuration=Release /p:BuildProjectReferences=false /t:Build"
artifacts:
- path: '*-*-*.txt'
name: information
Expand All @@ -27,4 +26,3 @@ artifacts:
- path: 'Output\Packages\Wox-*.*'
name: installer
- path: 'Output\Packages\RELEASES'
name: installer

0 comments on commit d9c5440

Please sign in to comment.