]> Repositorios git - scryer-prolog.git/commitdiff
MSI installer
authorAdrián Arroyo Calle <[email protected]>
Sun, 22 May 2022 12:18:51 +0000 (14:18 +0200)
committerAdrián Arroyo Calle <[email protected]>
Sun, 22 May 2022 12:18:51 +0000 (14:18 +0200)
README.md
scryer-prolog.wxs [new file with mode: 0644]

index a3151439cfc34de03c7f2efbfdb071e53e0d7ecf..f9df1779c87e7f740c76414b57e62a81f619556e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -129,6 +129,13 @@ On Windows, Scryer Prolog is easier to build inside a [MSYS2](https://www.msys2.
 environment as some crates may require native C compilation. However, 
 the resulting binary does not need MSYS2 to run. When executing Scryer in a shell, it is recommended to use a more advanced shell than mintty (the default MSYS2 shell). The [Windows Terminal](https://github.com/microsoft/terminal) works correctly.
 
+To build a Windows Installer, you'll need first Scryer Prolog compiled in release mode, then, with WiX Toolset installed, execute:
+```
+candle.exe scryer-prolog.wxs
+light.exe scryer-prolog.wixobj
+```
+It will generate a very basic MSI file which installs the main executable and a shortcut in the Start Menu. It can be installed with a double-click. To uninstall, go to the Control Panel and uninstall as usual.
+
 Scryer Prolog must be built with **Rust 1.57 and up**.
 
 ### Docker Install
diff --git a/scryer-prolog.wxs b/scryer-prolog.wxs
new file mode 100644 (file)
index 0000000..53b2124
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">\r
+  <Product Name="Scryer Prolog" Manufacturer="Scryer Prolog contributors" Id="*" UpgradeCode="cfb2dee4-5dd5-4d7d-b426-cd7340810559" Language="1033" Codepage="1252" Version="0.9.0">\r
+    <Package Description="An open source industrial strength production environment for ISO Prolog that is also a testbed for bleeding edge research in logic and constraint programming, which is itself written in a high-level language." Platform="x64" Keywords="prolog" Id="*" Compressed="yes" InstallScope="perMachine" InstallerVersion="300" Languages="1033" SummaryCodepage="1252" Manufacturer="Scryer Prolog contributors"/>\r
+    <Property Id="APPHELPLINK" Value="https://github.com/mthom/scryer-prolog"/>\r
+    <Media Id="1" Cabinet="scryer.cab" EmbedCab="yes" />\r
+    \r
+    <Directory Id="TARGETDIR" Name="SourceDir">\r
+      <Directory Id="ProgramFilesFolder" Name="PFiles">\r
+        <Directory Id="INSTALLDIR" Name="Scryer Prolog">\r
+          <Component Id="MainExecutable" Guid="1b41ceda-ba18-47f9-911b-ee41b4f20921">\r
+            <File Id="ScryerPrologEXE" Name="scryer-prolog.exe" DiskId="1" Source="target/release/scryer-prolog.exe" KeyPath="yes" Checksum="yes"/>\r
+          </Component>\r
+        </Directory>\r
+      </Directory>\r
+      <Directory Id="ProgramMenuFolder">\r
+       <Component Id="ApplicationShortcut" Guid="8c9b14a3-e7b1-4d30-a892-61d7371dcae2">\r
+          <Shortcut Id="ApplicationStarMenuShortcut" Name="Scryer Prolog" Description="Launch Scryer Prolog" Target="[#ScryerPrologEXE]" WorkingDirectory="INSTALLDIR"/>\r
+         <RemoveFolder Id="ApplicationShortcut" On="uninstall"/>\r
+         <RegistryValue Root="HKCU" Key="Software\Microsoft\ScryerProlog" Name="installed" Type="integer" Value="1" KeyPath="yes"/>\r
+       </Component>\r
+      </Directory>\r
+    </Directory>\r
+\r
+    <Feature Id="Complete" Level="1" Display="expand" ConfigurableDirectory="INSTALLDIR">\r
+      <ComponentRef Id="MainExecutable"/>\r
+      <ComponentRef Id="ApplicationShortcut"/>\r
+    </Feature>\r
+  </Product>\r
+</Wix>\r
+  \r