forked from Squirrel/Squirrel.Windows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Squirrel#466 from Squirrel/msi
Create IT Administrator-friendly MSI files
- Loading branch information
Showing
16 changed files
with
164 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Security; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Squirrel.Update | ||
{ | ||
public static class CopStache | ||
{ | ||
public static string Render(string template, Dictionary<string, string> identifiers) | ||
{ | ||
var buf = new StringBuilder(); | ||
|
||
foreach (var line in template.Split('\n')) { | ||
identifiers["RandomGuid"] = (new Guid()).ToString(); | ||
|
||
foreach (var key in identifiers.Keys) { | ||
buf.Replace("{{" + key + "}}", SecurityElement.Escape(identifiers[key])); | ||
} | ||
|
||
buf.AppendLine(line); | ||
} | ||
|
||
return buf.ToString(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- | ||
<copyright file="app.config" company="Outercurve Foundation"> | ||
Copyright (c) 2004, Outercurve Foundation. | ||
This software is released under Microsoft Reciprocal License (MS-RL). | ||
The license and further copyright text can be found in the file | ||
LICENSE.TXT at the root directory of the distribution. | ||
</copyright> | ||
--> | ||
<configuration> | ||
<startup useLegacyV2RuntimeActivationPolicy="true"> | ||
<supportedRuntime version="v4.0" /> | ||
<supportedRuntime version="v2.0.50727" /> | ||
</startup> | ||
<runtime> | ||
<loadFromRemoteSources enabled="true"/> | ||
</runtime> | ||
</configuration> |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"> | ||
<Product Id="*" Name="{{Title}} Machine-Wide Installer" Language="1033" Version="1.2.4" UpgradeCode="{{RandomGuid}}" Manufacturer="{{Author}}"> | ||
|
||
<Package Description="#Description" Comments="Comments" InstallerVersion="200" Compressed="yes"/> | ||
<Media Id="1" Cabinet="contents.cab" EmbedCab="yes" CompressionLevel="high"/> | ||
|
||
<PropertyRef Id="NETFRAMEWORK45" /> | ||
|
||
<Condition Message="This application requires .NET Framework 4.5. Please install the .NET Framework then run this installer again."> | ||
<![CDATA[Installed OR NETFRAMEWORK45]]> | ||
</Condition> | ||
|
||
<Directory Id="TARGETDIR" Name="SourceDir"> | ||
<Directory Id="ProgramFilesFolder"> | ||
<Directory Id="APPLICATIONROOTDIRECTORY" Name="{{Title}} Installer" /> | ||
</Directory> | ||
</Directory> | ||
|
||
<DirectoryRef Id="APPLICATIONROOTDIRECTORY"> | ||
<Component Id="{{Id}}.exe" Guid="08AD3BE1-EDA8-4182-BF8F-F47F805E28B8"> | ||
<File Id="{{Id}}.exe" Name="{{Id}}.exe" Source="./Setup.exe" KeyPath="yes" /> | ||
</Component> | ||
</DirectoryRef> | ||
|
||
<DirectoryRef Id="TARGETDIR"> | ||
<Component Id="RegistryEntries" Guid="4438A0C1-7F86-4737-B929-8476305E1183"> | ||
<RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Run"> | ||
<RegistryValue Type="expandable" Name="{{Id}}MachineInstaller" Value="%ProgramFiles%\{{Title}} Installer\{{Id}}.exe --checkInstall" /> | ||
</RegistryKey> | ||
</Component> | ||
</DirectoryRef> | ||
|
||
<Feature Id="MainApplication" Title="Main Application" Level="1"> | ||
<ComponentRef Id="{{Id}}.exe" /> | ||
<ComponentRef Id="RegistryEntries" /> | ||
</Feature> | ||
</Product> | ||
</Wix> |
Binary file not shown.
Binary file not shown.
Binary file not shown.