diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..da797b4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +output +secret.txt diff --git a/MorphicCredentials.wxs b/MorphicCredentials.wxs new file mode 100644 index 0000000..df4f848 --- /dev/null +++ b/MorphicCredentials.wxs @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + 1 + 1 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index 0919fdd..64e7aa5 100644 --- a/README.md +++ b/README.md @@ -1 +1,11 @@ -# morphic-credentials-installer +# Morphic Credentials + +Morphic Credentials is a tiny Windows Installer (MSI) that installs the Morphic client credentials into a secure area of the filesystem. + +## Usage + +The secret needs to be generated manually and copied into a file called secret.txt. + +Run build.ps1 + +Remember, DO NOT commit the secret.txt file. :) diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000..151c379 --- /dev/null +++ b/build.ps1 @@ -0,0 +1,24 @@ +<# + This script creates the installer with the client credentials for Morphic. +#> + +if (!(Test-Path -Path secret.txt)) { + Write-Output "" + Write-Output "Please provide the secret.txt file." + Write-Output "" + exit 1 +} + +function Clean { + rm *.wixobj, output\*.wixpdb +} + +Clean + +Remove-Item -Recurse output +mkdir output + +candle -out MorphicCredentials.wixobj MorphicCredentials.wxs +light -ext WiXUtilExtension -ext WixUIExtension MorphicCredentials.wixobj -sacl -o output/MorphicCredentials.msi + +Clean