149 lines
12 KiB
XML
149 lines
12 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
PhotoCraft MSI (WiX Toolset v5: `dotnet tool install -g wix`, plus the UI and Util extensions:
|
|
`wix extension add -g WixToolset.UI.wixext/5.0.2 WixToolset.Util.wixext/5.0.2`). Built by package.ps1:
|
|
|
|
wix build photocraft.wxs -arch x64 -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext
|
|
-culture en-US -loc photocraft.en-us.wxl -d Version=1.2.3 -d DisplayVersion=1.2.3-rc.1
|
|
-d BinDir=... -d IconPath=... -d BannerBmp=... -d DialogBmp=... -o out.msi
|
|
|
|
Per-machine install with a setup wizard that names the version: Welcome, install folder
|
|
(Program Files\PhotoCraft by default, remembered for upgrades), Ready, a progress page, and a
|
|
Finish page with a ticked "Launch PhotoCraft" box. Installs a Start Menu shortcut, makes
|
|
PhotoCraft the owner of `.pcraft`, and offers it under "Open with" for PSD/PSB and the image
|
|
formats it reads (without taking over the user's default app for them), plus photocraft-cli.
|
|
`msiexec /qn` still installs silently.
|
|
-->
|
|
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
|
|
xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
|
|
<Package
|
|
Name="PhotoCraft"
|
|
Manufacturer="Learning Machines LLC"
|
|
Version="$(var.Version)"
|
|
UpgradeCode="D9660F32-2D0A-4ABE-B73D-17BE25F1542C"
|
|
Scope="perMachine"
|
|
Compressed="yes"
|
|
Language="1033">
|
|
<SummaryInformation Description="PhotoCraft image editor" Manufacturer="Learning Machines LLC" />
|
|
<!-- Same-version upgrades let successive pre-releases of one X.Y.Z replace each other
|
|
(MSI versions are numeric, so 1.2.3-rc.1 and 1.2.3-rc.2 are both 1.2.3). -->
|
|
<MajorUpgrade AllowSameVersionUpgrades="yes"
|
|
DowngradeErrorMessage="A newer version of PhotoCraft is already installed." />
|
|
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
|
|
|
|
<!-- MSI caches this icon using its Id as the filename. Advertised shortcuts to an
|
|
.exe need an .exe icon identifier (ICE50), even when the source is an ICO. -->
|
|
<Icon Id="PhotocraftIcon.exe" SourceFile="$(var.IconPath)" />
|
|
<Property Id="ARPPRODUCTICON" Value="PhotocraftIcon.exe" />
|
|
<Property Id="ARPURLINFOABOUT" Value="https://getartcraft.com/apps/photocraft" />
|
|
<Property Id="ARPURLUPDATEINFO" Value="https://getartcraft.com/apps/photocraft" />
|
|
<Property Id="ARPHELPLINK" Value="https://discord.gg/artcraft" />
|
|
|
|
<StandardDirectory Id="ProgramFiles6432Folder">
|
|
<Directory Id="INSTALLFOLDER" Name="PhotoCraft" />
|
|
</StandardDirectory>
|
|
<StandardDirectory Id="ProgramMenuFolder" />
|
|
|
|
<!-- An upgrade installs where the user put the previous version (written by PhotocraftApp). -->
|
|
<Property Id="INSTALLFOLDER">
|
|
<RegistrySearch Id="PreviousInstallFolder" Root="HKLM" Key="Software\PhotoCraft" Name="InstallDir" Type="raw" />
|
|
</Property>
|
|
|
|
<Feature Id="Main" Title="PhotoCraft" Level="1">
|
|
<ComponentGroupRef Id="PhotocraftFiles" />
|
|
</Feature>
|
|
|
|
<!-- The setup wizard: WixUI_InstallDir without its licence page (the code is MIT OR
|
|
Apache-2.0; there is nothing to accept). A later NewDialog on the same button wins. -->
|
|
<ui:WixUI Id="WixUI_InstallDir" InstallDirectory="INSTALLFOLDER" />
|
|
<UI>
|
|
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Order="2" Condition="NOT Installed" />
|
|
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2" />
|
|
<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchPhotocraft"
|
|
Condition="WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 AND NOT Installed" />
|
|
</UI>
|
|
<!-- Our own art, generated by package.ps1 from the app icon (not WiX's stock bitmaps). -->
|
|
<WixVariable Id="WixUIBannerBmp" Value="$(var.BannerBmp)" />
|
|
<WixVariable Id="WixUIDialogBmp" Value="$(var.DialogBmp)" />
|
|
|
|
<!-- The full version (Version is numeric, so it drops a pre-release tag), shown on the wizard's
|
|
pages through photocraft.en-us.wxl. -->
|
|
<Property Id="PhotocraftVersion" Value="$(var.DisplayVersion)" />
|
|
|
|
<!-- Finish page: say where to find the app, and offer to start it (ticked by default). -->
|
|
<Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="PhotoCraft $(var.DisplayVersion) is installed. You can start it any time from the Start menu." />
|
|
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch PhotoCraft" />
|
|
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
|
|
<Property Id="WixShellExecTarget" Value="[#PhotocraftExe]" />
|
|
<!-- Runs in the wizard's own (unelevated) process, so the app starts as the user, not as admin. -->
|
|
<CustomAction Id="LaunchPhotocraft" BinaryRef="Wix4UtilCA_$(sys.BUILDARCHSHORT)" DllEntry="WixShellExec" Impersonate="yes" Return="ignore" />
|
|
</Package>
|
|
|
|
<Fragment>
|
|
<ComponentGroup Id="PhotocraftFiles" Directory="INSTALLFOLDER">
|
|
<Component Id="PhotocraftApp" Guid="A6DE41B7-A80F-4C59-A17E-BB68065BF67E">
|
|
<File Id="PhotocraftExe" Source="$(var.BinDir)\photocraft.exe" KeyPath="yes">
|
|
<Shortcut Id="StartMenuShortcut" Directory="ProgramMenuFolder" Name="PhotoCraft"
|
|
Description="PhotoCraft image editor" WorkingDirectory="INSTALLFOLDER" Advertise="yes"
|
|
Icon="PhotocraftIcon.exe" IconIndex="0" />
|
|
</File>
|
|
|
|
<!-- .pcraft: PhotoCraft's own format; PhotoCraft is its default app. -->
|
|
<ProgId Id="Photocraft.Document" Description="PhotoCraft Document" Icon="PhotocraftExe" IconIndex="0">
|
|
<Extension Id="pcraft" ContentType="application/x-photocraft">
|
|
<Verb Id="open" Command="Open" TargetFile="PhotocraftExe" Argument=""%1"" />
|
|
</Extension>
|
|
</ProgId>
|
|
<!-- PSD/PSB and images: offered under "Open with", never forced as the default. -->
|
|
<ProgId Id="Photocraft.PhotoshopDocument" Description="Photoshop Document" Icon="PhotocraftExe" IconIndex="0" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Photocraft.PhotoshopDocument\shell\open\command" Value=""[#PhotocraftExe]" "%1"" Type="string" />
|
|
<ProgId Id="Photocraft.Image" Description="Image" Icon="PhotocraftExe" IconIndex="0" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Photocraft.Image\shell\open\command" Value=""[#PhotocraftExe]" "%1"" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.psd\OpenWithProgids" Name="Photocraft.PhotoshopDocument" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.psb\OpenWithProgids" Name="Photocraft.PhotoshopDocument" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.png\OpenWithProgids" Name="Photocraft.Image" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.jpg\OpenWithProgids" Name="Photocraft.Image" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.jpeg\OpenWithProgids" Name="Photocraft.Image" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.tif\OpenWithProgids" Name="Photocraft.Image" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.tiff\OpenWithProgids" Name="Photocraft.Image" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.webp\OpenWithProgids" Name="Photocraft.Image" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.gif\OpenWithProgids" Name="Photocraft.Image" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.bmp\OpenWithProgids" Name="Photocraft.Image" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.tga\OpenWithProgids" Name="Photocraft.Image" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.exr\OpenWithProgids" Name="Photocraft.Image" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.hdr\OpenWithProgids" Name="Photocraft.Image" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.avif\OpenWithProgids" Name="Photocraft.Image" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.qoi\OpenWithProgids" Name="Photocraft.Image" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\.ico\OpenWithProgids" Name="Photocraft.Image" Value="" Type="string" />
|
|
|
|
<!-- "Open with" app list and the Run dialog (Win+R "photocraft"). -->
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe" Name="FriendlyAppName" Value="PhotoCraft" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\shell\open\command" Value=""[#PhotocraftExe]" "%1"" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".pcraft" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".psd" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".psb" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".png" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".jpg" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".jpeg" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".tif" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".tiff" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".webp" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".gif" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".bmp" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".tga" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".exr" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".hdr" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".avif" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".qoi" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Classes\Applications\photocraft.exe\SupportedTypes" Name=".ico" Value="" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\App Paths\photocraft.exe" Value="[#PhotocraftExe]" Type="string" />
|
|
<RegistryValue Root="HKLM" Key="Software\PhotoCraft" Name="InstallDir" Value="[INSTALLFOLDER]" Type="string" />
|
|
</Component>
|
|
|
|
<Component Id="PhotocraftCli">
|
|
<File Id="PhotocraftCliExe" Source="$(var.BinDir)\photocraft-cli.exe" KeyPath="yes" />
|
|
</Component>
|
|
</ComponentGroup>
|
|
</Fragment>
|
|
</Wix>
|