Skip to content

Commit

Permalink
Merge pull request #1 from Rynchodon/installer
Browse files Browse the repository at this point in the history
Installer
  • Loading branch information
Rynchodon authored May 7, 2017
2 parents 7dfef99 + 4f1598c commit b81e191
Show file tree
Hide file tree
Showing 8 changed files with 201 additions and 3 deletions.
1 change: 0 additions & 1 deletion Injector/CommandLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ private static void Parse(string[] args)
}
else
{
Console.WriteLine("Not a file: " + Path.GetFullPath(a));
PrintHelp(opts);
throw new ArgumentException("Invalid argument: " + a);
}
Expand Down
1 change: 1 addition & 0 deletions Injector/Injector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
<Import Project="$(SolutionDir)\global.config" />
<PropertyGroup>
<PostBuildEvent>copy ..\..\..\..\Loader\bin\x64\Release\LoadARMS.dll LoadARMS.dll
copy ..\..\..\..\SetupProject\bin\Release\SetupLoadArms.msi SetupLoadArms.msi

start cmd.exe /C ""$(ReferencePath)\LoadArms.exe" --author=Rynchodon --repo=Load-ARMS --allBuilds LoadARMS.exe LoadArms.dll "..\..\..\..\Load-ARMS Readme.txt" "..\..\..\..\Load-ARMS License.txt""</PostBuildEvent>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Injector/Properties/VersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.5.6.0")]
[assembly: AssemblyVersion("0.6.0.0")]
33 changes: 33 additions & 0 deletions Load-ARMS License.rtf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{\rtf1\ansi\deff3\adeflang1025
{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}{\f4\froman\fprq2\fcharset0 Liberation Sans{\*\falt Arial};}{\f5\fnil\fprq2\fcharset0 Mangal;}{\f6\fnil\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}}
{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}
{\stylesheet{\s0\snext0\ql\nowidctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang4105\loch\f3\fs24\lang4105 Normal;}
{\s15\sbasedon0\snext16\ql\nowidctlpar\hyphpar0\sb240\sa120\keepn\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang4105\loch\f4\fs28 Heading;}
{\s16\sbasedon0\snext16\sl288\slmult1\ql\nowidctlpar\hyphpar0\sb0\sa140\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang4105\loch\f3\fs24 Text Body;}
{\s17\sbasedon16\snext17\sl288\slmult1\ql\nowidctlpar\hyphpar0\sb0\sa140\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang4105\loch\f3\fs24 List;}
{\s18\sbasedon0\snext18\ql\nowidctlpar\hyphpar0\sb120\sa120\ltrpar\cf1\i\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang4105\loch\f3\fs24 Caption;}
{\s19\sbasedon0\snext19\ql\nowidctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang4105\loch\f3\fs24 Index;}
}{\*\generator LibreOffice/5.2.6.2$Windows_x86 LibreOffice_project/a3100ed2409ebf1c212f5048fbe377c281438fdc}{\info{\creatim\yr0\mo0\dy0\hr0\min0}{\revtim\yr2017\mo5\dy5\hr12\min21}{\printim\yr0\mo0\dy0\hr0\min0}}{\*\userprops}\deftab709
\hyphauto0\viewscale100
{\*\pgdsctbl
{\pgdsc0\pgdscuse451\pgwsxn12240\pghsxn15840\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\pgdscnxt0 Default Style;}}
\formshade{\*\pgdscno0}\paperh15840\paperw12240\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\sectunlocked1\pgndec\pgwsxn12240\pghsxn15840\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
{\*\ftnsep\chftnsep}\pgndec\pard\plain \s0\ql\nowidctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang4105\loch\f3\fs24\lang4105\nowidctlpar\hyphpar0{\afs20\rtlch \ltrch\loch\fs20
The MIT License}
\par \pard\plain \s0\ql\nowidctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang4105\loch\f3\fs24\lang4105\nowidctlpar\hyphpar0\afs20\rtlch \ltrch\loch\fs20

\par \pard\plain \s0\ql\nowidctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang4105\loch\f3\fs24\lang4105\nowidctlpar\hyphpar0{\afs20\rtlch \ltrch\loch\fs20
Copyright 2017 Alexander Durand}
\par \pard\plain \s0\ql\nowidctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang4105\loch\f3\fs24\lang4105\nowidctlpar\hyphpar0\afs20\rtlch \ltrch\loch\fs20

\par \pard\plain \s0\ql\nowidctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang4105\loch\f3\fs24\lang4105\nowidctlpar\hyphpar0{\afs20\rtlch \ltrch\loch\fs20
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:}
\par \pard\plain \s0\ql\nowidctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang4105\loch\f3\fs24\lang4105\nowidctlpar\hyphpar0\afs20\rtlch \ltrch\loch\fs20

\par \pard\plain \s0\ql\nowidctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang4105\loch\f3\fs24\lang4105\nowidctlpar\hyphpar0{\afs20\rtlch \ltrch\loch\fs20
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.}
\par \pard\plain \s0\ql\nowidctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang4105\loch\f3\fs24\lang4105\nowidctlpar\hyphpar0\afs20\rtlch \ltrch\loch\fs20

\par \pard\plain \s0\ql\nowidctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang4105\loch\f3\fs24\lang4105\nowidctlpar\hyphpar0{\afs20\rtlch \ltrch\loch\fs20
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.}
\par }
5 changes: 5 additions & 0 deletions Load-ARMS.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Loader", "Loader\Loader.csp
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Injector", "Injector\Injector.csproj", "{081B3BE0-322B-4E4F-B93E-50AD18487B1D}"
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SetupProject", "SetupProject\SetupProject.wixproj", "{0E4EC39D-2015-47B5-A277-D2E257A1B37E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Release|x64 = Release|x64
Expand All @@ -16,6 +18,9 @@ Global
{5C2D3832-DDCB-4C1D-855C-5510625DB149}.Release|x64.Build.0 = Release|x64
{081B3BE0-322B-4E4F-B93E-50AD18487B1D}.Release|x64.ActiveCfg = Release|x64
{081B3BE0-322B-4E4F-B93E-50AD18487B1D}.Release|x64.Build.0 = Release|x64
{081B3BE0-322B-4E4F-B93E-50AD18487B1D}.Release|x64.Deploy.0 = Release|x64
{0E4EC39D-2015-47B5-A277-D2E257A1B37E}.Release|x64.ActiveCfg = Release|x86
{0E4EC39D-2015-47B5-A277-D2E257A1B37E}.Release|x64.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion Publish.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cd Injector\bin\x64\Release
"C:\Games\Steam\SteamApps\common\SpaceEngineers\Bin64\LoadArms.exe" --author=Rynchodon --repo=Load-ARMS --allBuilds --publish LoadARMS.exe LoadArms.dll "..\..\..\..\Load-ARMS Readme.txt" "..\..\..\..\Load-ARMS License.txt"
"C:\Games\Steam\SteamApps\common\SpaceEngineers\Bin64\LoadArms.exe" --author=Rynchodon --repo=Load-ARMS --allBuilds --publish LoadARMS.exe LoadArms.dll "..\..\..\..\Load-ARMS Readme.txt" "..\..\..\..\Load-ARMS License.txt" "SetupLoadArms.msi"
timeout 60
69 changes: 69 additions & 0 deletions SetupProject/Setup.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Load-ARMS" Language="1033" Version="0.6.0.0" Manufacturer="Rynchodon" UpgradeCode="d44fbdc6-c0d8-491a-9f31-a0d93279a4ef">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64" />

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />

<!-- How to package files -->
<Media Id="1" Cabinet="LoadARMS.cab" EmbedCab="yes" />

<!-- Get SE_DIRECTORY from registry -->
<Property Id="SE_DIRECTORY">
<RegistrySearch Id="RegistrySearch_SpaceEngineers" Type="directory" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 244850" Name="InstallLocation" />
</Property>

<!-- GUI -->
<Property Id="WIXUI_INSTALLDIR" Value="SE_DIRECTORY" />
<WixVariable Id="WixUILicenseRtf" Value="..\Load-ARMS License.rtf" />
<UIRef Id="WixUI_InstallDir" />

<!-- Do Install -->
<Feature Id="CompleteInstall" Level="1">
<ComponentRef Id="InjectorComponent" />
<ComponentRef Id="LoaderComponent" />
<ComponentRef Id="DS_InjectorComponent" />
<ComponentRef Id="DS_LoaderComponent" />
</Feature>
</Product>

<!-- SE_DIRECTORY if missing from registry -->
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder" Name="Games">
<Directory Id="SteamDir" Name="Steam">
<Directory Id="SteamAppsDir" Name="SteamApps">
<Directory Id="commonDir" Name="common">
<Directory Id="SE_DIRECTORY" Name="SpaceEngineers" />
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
</Fragment>

<!-- Paths for Install & Remove -->
<Fragment>
<DirectoryRef Id="SE_DIRECTORY">
<!-- Bin64 -->
<Directory Id="SE_BIN" Name="Bin64">
<Component Id="InjectorComponent" Win64="yes">
<File Source="$(var.Injector.TargetPath)" />
</Component>
<Component Id="LoaderComponent" Win64="yes">
<File Source="$(var.Loader.TargetPath)" />
</Component>
</Directory>

<!-- DedicatedServer64 -->
<Directory Id="SE_DS_BIN" Name="DedicatedServer64">
<Component Id="DS_InjectorComponent" Win64="yes">
<File Id="DsInjFile" Source="$(var.Injector.TargetPath)" />
</Component>
<Component Id="DS_LoaderComponent" Win64="yes">
<File Id="DsLoadFile" Source="$(var.Loader.TargetPath)" />
</Component>
</Directory>
</DirectoryRef>
</Fragment>
</Wix>
91 changes: 91 additions & 0 deletions SetupProject/SetupProject.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?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)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>0e4ec39d-2015-47b5-a277-d2e257a1b37e</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>SetupLoadArms</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DefineConstants>Debug</DefineConstants>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DefineConstants>Debug</DefineConstants>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DefineConstants>Debug</DefineConstants>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="Setup.wxs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Injector\Injector.csproj">
<Name>Injector</Name>
<Project>{081b3be0-322b-4e4f-b93e-50ad18487b1d}</Project>
<Private>True</Private>
<DoNotHarvest>True</DoNotHarvest>
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
<ProjectReference Include="..\Loader\Loader.csproj">
<Name>Loader</Name>
<Project>{5c2d3832-ddcb-4c1d-855c-5510625db149}</Project>
<Private>True</Private>
<DoNotHarvest>True</DoNotHarvest>
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUIExtension">
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name>
</WixExtension>
</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 build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
</Target>
<PropertyGroup>
<PostBuildEvent />
</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>

0 comments on commit b81e191

Please sign in to comment.