Convert files with CRLF line endings to LF.

This commit is contained in:
Paul Chote 2021-01-30 15:04:07 +00:00 committed by abcdefg30
parent 017d8bf484
commit 62e4eacf13
4 changed files with 361 additions and 361 deletions

View File

@ -1,36 +1,36 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012 # Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.Example", "OpenRA.Mods.Example\OpenRA.Mods.Example.csproj", "{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.Example", "OpenRA.Mods.Example\OpenRA.Mods.Example.csproj", "{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Game", "engine\OpenRA.Game\OpenRA.Game.csproj", "{0DFB103F-2962-400F-8C6D-E2C28CCBA633}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Game", "engine\OpenRA.Game\OpenRA.Game.csproj", "{0DFB103F-2962-400F-8C6D-E2C28CCBA633}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.Common", "engine\OpenRA.Mods.Common\OpenRA.Mods.Common.csproj", "{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.Common", "engine\OpenRA.Mods.Common\OpenRA.Mods.Common.csproj", "{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
Release-x86|Any CPU = Release-x86|Any CPU Release-x86|Any CPU = Release-x86|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Debug|Any CPU.Build.0 = Debug|Any CPU {4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Release|Any CPU.ActiveCfg = Release|Any CPU {4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Release|Any CPU.Build.0 = Release|Any CPU {4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Release|Any CPU.Build.0 = Release|Any CPU
{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Release-x86|Any CPU.ActiveCfg = Release|Any CPU {4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Release-x86|Any CPU.ActiveCfg = Release|Any CPU
{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Release-x86|Any CPU.Build.0 = Release|Any CPU {4E5B38F7-4E99-4C92-BB39-9100CC7F3829}.Release-x86|Any CPU.Build.0 = Release|Any CPU
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Any CPU.Build.0 = Debug|Any CPU {0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Any CPU.ActiveCfg = Release|Any CPU {0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Any CPU.Build.0 = Release|Any CPU {0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Any CPU.Build.0 = Release|Any CPU
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release-x86|Any CPU.ActiveCfg = Release-x86|Any CPU {0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release-x86|Any CPU.ActiveCfg = Release-x86|Any CPU
{0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release-x86|Any CPU.Build.0 = Release-x86|Any CPU {0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release-x86|Any CPU.Build.0 = Release-x86|Any CPU
{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Debug|Any CPU.Build.0 = Debug|Any CPU {FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release|Any CPU.ActiveCfg = Release|Any CPU {FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release|Any CPU.Build.0 = Release|Any CPU {FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release|Any CPU.Build.0 = Release|Any CPU
{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release-x86|Any CPU.ActiveCfg = Release|Any CPU {FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release-x86|Any CPU.ActiveCfg = Release|Any CPU
{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release-x86|Any CPU.Build.0 = Release|Any CPU {FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}.Release-x86|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@ -1,40 +1,40 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net472</TargetFramework> <TargetFramework>net472</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<LangVersion>7.3</LangVersion> <LangVersion>7.3</LangVersion>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<OutputPath>../engine/bin</OutputPath> <OutputPath>../engine/bin</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems> <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<CodeAnalysisRuleSet>../engine/OpenRA.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>../engine/OpenRA.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<!-- Work around an issue where Rider does not detect files in the project root using the default glob --> <!-- Work around an issue where Rider does not detect files in the project root using the default glob -->
<Compile Include="**/*.cs" Exclude="$(DefaultItemExcludes)" /> <Compile Include="**/*.cs" Exclude="$(DefaultItemExcludes)" />
</ItemGroup> </ItemGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'"> <PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>false</Optimize> <Optimize>false</Optimize>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="../engine/OpenRA.Game/OpenRA.Game.csproj"> <ProjectReference Include="../engine/OpenRA.Game/OpenRA.Game.csproj">
<Private>False</Private> <Private>False</Private>
</ProjectReference> </ProjectReference>
<ProjectReference Include="../engine/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj"> <ProjectReference Include="../engine/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj">
<Private>False</Private> <Private>False</Private>
</ProjectReference> </ProjectReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" /> <PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" /> <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<AdditionalFiles Include="../engine/stylecop.json" /> <AdditionalFiles Include="../engine/stylecop.json" />
</ItemGroup> </ItemGroup>
<Target Name="DisableAnalyzers" BeforeTargets="CoreCompile" Condition="'$(Configuration)'=='Release'"> <Target Name="DisableAnalyzers" BeforeTargets="CoreCompile" Condition="'$(Configuration)'=='Release'">
<!-- Disable code style analysis on Release builds to improve compile-time performance --> <!-- Disable code style analysis on Release builds to improve compile-time performance -->
<ItemGroup Condition="'$(Configuration)'=='Release'"> <ItemGroup Condition="'$(Configuration)'=='Release'">
<Analyzer Remove="@(Analyzer)" /> <Analyzer Remove="@(Analyzer)" />
</ItemGroup> </ItemGroup>
</Target> </Target>
</Project> </Project>

View File

@ -1,50 +1,50 @@
:: example launch script, see https://github.com/OpenRA/OpenRA/wiki/Dedicated for details :: example launch script, see https://github.com/OpenRA/OpenRA/wiki/Dedicated for details
@echo on @echo on
set Name="Dedicated Server" set Name="Dedicated Server"
set ListenPort=1234 set ListenPort=1234
set AdvertiseOnline=True set AdvertiseOnline=True
set Password="" set Password=""
set RequireAuthentication=False set RequireAuthentication=False
set ProfileIDBlacklist="" set ProfileIDBlacklist=""
set ProfileIDWhitelist="" set ProfileIDWhitelist=""
set EnableSingleplayer=False set EnableSingleplayer=False
set EnableSyncReports=False set EnableSyncReports=False
set EnableGeoIP=True set EnableGeoIP=True
set ShareAnonymizedIPs=True set ShareAnonymizedIPs=True
@echo off @echo off
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
title %Name% title %Name%
FOR /F "tokens=1,2 delims==" %%A IN (mod.config) DO (set %%A=%%B) FOR /F "tokens=1,2 delims==" %%A IN (mod.config) DO (set %%A=%%B)
if exist user.config (FOR /F "tokens=1,2 delims==" %%A IN (user.config) DO (set %%A=%%B)) if exist user.config (FOR /F "tokens=1,2 delims==" %%A IN (user.config) DO (set %%A=%%B))
set MOD_SEARCH_PATHS=%~dp0mods,./mods set MOD_SEARCH_PATHS=%~dp0mods,./mods
if "!MOD_ID!" == "" goto badconfig if "!MOD_ID!" == "" goto badconfig
if "!ENGINE_VERSION!" == "" goto badconfig if "!ENGINE_VERSION!" == "" goto badconfig
if "!ENGINE_DIRECTORY!" == "" goto badconfig if "!ENGINE_DIRECTORY!" == "" goto badconfig
if not exist %ENGINE_DIRECTORY%\bin\OpenRA.exe goto noengine if not exist %ENGINE_DIRECTORY%\bin\OpenRA.exe goto noengine
>nul find %ENGINE_VERSION% %ENGINE_DIRECTORY%\VERSION || goto noengine >nul find %ENGINE_VERSION% %ENGINE_DIRECTORY%\VERSION || goto noengine
cd %ENGINE_DIRECTORY% cd %ENGINE_DIRECTORY%
:loop :loop
bin\OpenRA.Server.exe Game.Mod=%MOD_ID% Engine.EngineDir=".." Server.Name=%Name% Server.ListenPort=%ListenPort% Server.AdvertiseOnline=%AdvertiseOnline% Server.EnableSingleplayer=%EnableSingleplayer% Server.Password=%Password% Server.RequireAuthentication=%RequireAuthentication% Server.ProfileIDBlacklist=%ProfileIDBlacklist% Server.ProfileIDWhitelist=%ProfileIDWhitelist% Server.EnableSyncReports=%EnableSyncReports% Server.EnableGeoIP=%EnableGeoIP% Server.ShareAnonymizedIPs=%ShareAnonymizedIPs% Engine.SupportDir=%SupportDir% bin\OpenRA.Server.exe Game.Mod=%MOD_ID% Engine.EngineDir=".." Server.Name=%Name% Server.ListenPort=%ListenPort% Server.AdvertiseOnline=%AdvertiseOnline% Server.EnableSingleplayer=%EnableSingleplayer% Server.Password=%Password% Server.RequireAuthentication=%RequireAuthentication% Server.ProfileIDBlacklist=%ProfileIDBlacklist% Server.ProfileIDWhitelist=%ProfileIDWhitelist% Server.EnableSyncReports=%EnableSyncReports% Server.EnableGeoIP=%EnableGeoIP% Server.ShareAnonymizedIPs=%ShareAnonymizedIPs% Engine.SupportDir=%SupportDir%
goto loop goto loop
:noengine :noengine
echo Required engine files not found. echo Required engine files not found.
echo Run `make all` in the mod directory to fetch and build the required files, then try again. echo Run `make all` in the mod directory to fetch and build the required files, then try again.
pause pause
exit /b exit /b
:badconfig :badconfig
echo Required mod.config variables are missing. echo Required mod.config variables are missing.
echo Ensure that MOD_ID ENGINE_VERSION and ENGINE_DIRECTORY are echo Ensure that MOD_ID ENGINE_VERSION and ENGINE_DIRECTORY are
echo defined in your mod.config (or user.config) and try again. echo defined in your mod.config (or user.config) and try again.
pause pause
exit /b exit /b

View File

@ -1,235 +1,235 @@
; Copyright 2007-2021 OpenRA developers (see AUTHORS) ; Copyright 2007-2021 OpenRA developers (see AUTHORS)
; This file is part of OpenRA. ; This file is part of OpenRA.
; ;
; OpenRA is free software: you can redistribute it and/or modify ; OpenRA is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by ; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or ; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version. ; (at your option) any later version.
; ;
; OpenRA is distributed in the hope that it will be useful, ; OpenRA is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of ; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details. ; GNU General Public License for more details.
; ;
; You should have received a copy of the GNU General Public License ; You should have received a copy of the GNU General Public License
; along with OpenRA. If not, see <http://www.gnu.org/licenses/>. ; along with OpenRA. If not, see <http://www.gnu.org/licenses/>.
!include "MUI2.nsh" !include "MUI2.nsh"
!include "FileFunc.nsh" !include "FileFunc.nsh"
!include "WordFunc.nsh" !include "WordFunc.nsh"
Name "${PACKAGING_DISPLAY_NAME}" Name "${PACKAGING_DISPLAY_NAME}"
OutFile "${OUTFILE}" OutFile "${OUTFILE}"
ManifestDPIAware true ManifestDPIAware true
Unicode True Unicode True
Function .onInit Function .onInit
!ifndef USE_PROGRAMFILES32 !ifndef USE_PROGRAMFILES32
SetRegView 64 SetRegView 64
!endif !endif
ReadRegStr $INSTDIR HKLM "Software\${PACKAGING_WINDOWS_REGISTRY_KEY}" "InstallDir" ReadRegStr $INSTDIR HKLM "Software\${PACKAGING_WINDOWS_REGISTRY_KEY}" "InstallDir"
StrCmp $INSTDIR "" unset done StrCmp $INSTDIR "" unset done
unset: unset:
!ifndef USE_PROGRAMFILES32 !ifndef USE_PROGRAMFILES32
StrCpy $INSTDIR "$PROGRAMFILES64\${PACKAGING_WINDOWS_INSTALL_DIR_NAME}" StrCpy $INSTDIR "$PROGRAMFILES64\${PACKAGING_WINDOWS_INSTALL_DIR_NAME}"
!else !else
StrCpy $INSTDIR "$PROGRAMFILES32\${PACKAGING_WINDOWS_INSTALL_DIR_NAME}" StrCpy $INSTDIR "$PROGRAMFILES32\${PACKAGING_WINDOWS_INSTALL_DIR_NAME}"
!endif !endif
done: done:
FunctionEnd FunctionEnd
SetCompressor lzma SetCompressor lzma
RequestExecutionLevel admin RequestExecutionLevel admin
!insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "${PACKAGING_WINDOWS_LICENSE_FILE}" !insertmacro MUI_PAGE_LICENSE "${PACKAGING_WINDOWS_LICENSE_FILE}"
!insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_DIRECTORY
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM" !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${PACKAGING_WINDOWS_REGISTRY_KEY}" !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${PACKAGING_WINDOWS_REGISTRY_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "OpenRA" !define MUI_STARTMENUPAGE_DEFAULTFOLDER "OpenRA"
Var StartMenuFolder Var StartMenuFolder
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
!insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES !insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH !insertmacro MUI_UNPAGE_FINISH
!insertmacro MUI_LANGUAGE "English" !insertmacro MUI_LANGUAGE "English"
;*************************** ;***************************
;Section Definitions ;Section Definitions
;*************************** ;***************************
Section "-Reg" Reg Section "-Reg" Reg
; Installation directory ; Installation directory
WriteRegStr HKLM "Software\${PACKAGING_WINDOWS_REGISTRY_KEY}" "InstallDir" $INSTDIR WriteRegStr HKLM "Software\${PACKAGING_WINDOWS_REGISTRY_KEY}" "InstallDir" $INSTDIR
; Join server URL Scheme ; Join server URL Scheme
WriteRegStr HKLM "Software\Classes\openra-${MOD_ID}-${TAG}" "" "URL:Join OpenRA server" WriteRegStr HKLM "Software\Classes\openra-${MOD_ID}-${TAG}" "" "URL:Join OpenRA server"
WriteRegStr HKLM "Software\Classes\openra-${MOD_ID}-${TAG}" "URL Protocol" "" WriteRegStr HKLM "Software\Classes\openra-${MOD_ID}-${TAG}" "URL Protocol" ""
WriteRegStr HKLM "Software\Classes\openra-${MOD_ID}-${TAG}\DefaultIcon" "" "$INSTDIR\${MOD_ID}.ico,0" WriteRegStr HKLM "Software\Classes\openra-${MOD_ID}-${TAG}\DefaultIcon" "" "$INSTDIR\${MOD_ID}.ico,0"
WriteRegStr HKLM "Software\Classes\openra-${MOD_ID}-${TAG}\Shell\Open\Command" "" "$INSTDIR\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe Launch.URI=%1" WriteRegStr HKLM "Software\Classes\openra-${MOD_ID}-${TAG}\Shell\Open\Command" "" "$INSTDIR\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe Launch.URI=%1"
!ifdef USE_DISCORDID !ifdef USE_DISCORDID
WriteRegStr HKLM "Software\Classes\discord-${USE_DISCORDID}" "" "URL:Run game ${USE_DISCORDID} protocol" WriteRegStr HKLM "Software\Classes\discord-${USE_DISCORDID}" "" "URL:Run game ${USE_DISCORDID} protocol"
WriteRegStr HKLM "Software\Classes\discord-${USE_DISCORDID}" "URL Protocol" "" WriteRegStr HKLM "Software\Classes\discord-${USE_DISCORDID}" "URL Protocol" ""
WriteRegStr HKLM "Software\Classes\discord-${USE_DISCORDID}\DefaultIcon" "" "$INSTDIR\${MOD_ID}.ico,0" WriteRegStr HKLM "Software\Classes\discord-${USE_DISCORDID}\DefaultIcon" "" "$INSTDIR\${MOD_ID}.ico,0"
WriteRegStr HKLM "Software\Classes\discord-${USE_DISCORDID}\Shell\Open\Command" "" "$INSTDIR\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe" WriteRegStr HKLM "Software\Classes\discord-${USE_DISCORDID}\Shell\Open\Command" "" "$INSTDIR\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe"
!endif !endif
SectionEnd SectionEnd
Section "Game" GAME Section "Game" GAME
SectionIn RO SectionIn RO
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
File "${SRCDIR}\*.exe" File "${SRCDIR}\*.exe"
File "${SRCDIR}\*.exe.config" File "${SRCDIR}\*.exe.config"
File "${SRCDIR}\*.dll" File "${SRCDIR}\*.dll"
File "${SRCDIR}\*.ico" File "${SRCDIR}\*.ico"
File "${SRCDIR}\VERSION" File "${SRCDIR}\VERSION"
File "${SRCDIR}\AUTHORS" File "${SRCDIR}\AUTHORS"
File "${SRCDIR}\COPYING" File "${SRCDIR}\COPYING"
File "${SRCDIR}\global mix database.dat" File "${SRCDIR}\global mix database.dat"
File "${SRCDIR}\IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP" File "${SRCDIR}\IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP"
File /r "${SRCDIR}\mods" File /r "${SRCDIR}\mods"
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$StartMenuFolder" CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\${PACKAGING_DISPLAY_NAME}.lnk" "$OUTDIR\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe" "" \ CreateShortCut "$SMPROGRAMS\$StartMenuFolder\${PACKAGING_DISPLAY_NAME}.lnk" "$OUTDIR\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe" "" \
"$OUTDIR\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe" "" "" "" "" "$OUTDIR\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe" "" "" "" ""
!insertmacro MUI_STARTMENU_WRITE_END !insertmacro MUI_STARTMENU_WRITE_END
SetOutPath "$INSTDIR\lua" SetOutPath "$INSTDIR\lua"
File "${SRCDIR}\lua\*.lua" File "${SRCDIR}\lua\*.lua"
SetOutPath "$INSTDIR\glsl" SetOutPath "$INSTDIR\glsl"
File "${SRCDIR}\glsl\*.frag" File "${SRCDIR}\glsl\*.frag"
File "${SRCDIR}\glsl\*.vert" File "${SRCDIR}\glsl\*.vert"
; Estimated install size for the control panel properties ; Estimated install size for the control panel properties
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2 ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0 IntFmt $0 "0x%08X" $0
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "EstimatedSize" "$0" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "EstimatedSize" "$0"
SetShellVarContext all SetShellVarContext all
CreateDirectory "$APPDATA\OpenRA\ModMetadata" CreateDirectory "$APPDATA\OpenRA\ModMetadata"
nsExec::ExecToLog '"$INSTDIR\OpenRA.Utility.exe" ${MOD_ID} --register-mod "$INSTDIR\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe" system' nsExec::ExecToLog '"$INSTDIR\OpenRA.Utility.exe" ${MOD_ID} --register-mod "$INSTDIR\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe" system'
nsExec::ExecToLog '"$INSTDIR\OpenRA.Utility.exe" ${MOD_ID} --clear-invalid-mod-registrations system' nsExec::ExecToLog '"$INSTDIR\OpenRA.Utility.exe" ${MOD_ID} --clear-invalid-mod-registrations system'
SetShellVarContext current SetShellVarContext current
SectionEnd SectionEnd
Section "Desktop Shortcut" DESKTOPSHORTCUT Section "Desktop Shortcut" DESKTOPSHORTCUT
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
CreateShortCut "$DESKTOP\OpenRA - ${PACKAGING_DISPLAY_NAME}.lnk" "$INSTDIR\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe" "" \ CreateShortCut "$DESKTOP\OpenRA - ${PACKAGING_DISPLAY_NAME}.lnk" "$INSTDIR\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe" "" \
"$INSTDIR\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe" "" "" "" "" "$INSTDIR\${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe" "" "" "" ""
SectionEnd SectionEnd
;*************************** ;***************************
;Dependency Sections ;Dependency Sections
;*************************** ;***************************
Section "-DotNet" DotNet Section "-DotNet" DotNet
ClearErrors ClearErrors
; https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed ; https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed
ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" "Release" ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" "Release"
IfErrors error 0 IfErrors error 0
IntCmp $0 461808 done error done IntCmp $0 461808 done error done
error: error:
MessageBox MB_OK ".NET Framework v4.7.2 or later is required to run OpenRA." MessageBox MB_OK ".NET Framework v4.7.2 or later is required to run OpenRA."
Abort Abort
done: done:
SectionEnd SectionEnd
;*************************** ;***************************
;Uninstaller Sections ;Uninstaller Sections
;*************************** ;***************************
Section "-Uninstaller" Section "-Uninstaller"
WriteUninstaller $INSTDIR\uninstaller.exe WriteUninstaller $INSTDIR\uninstaller.exe
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "DisplayName" "${PACKAGING_DISPLAY_NAME}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "DisplayName" "${PACKAGING_DISPLAY_NAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "UninstallString" "$INSTDIR\uninstaller.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "UninstallString" "$INSTDIR\uninstaller.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "InstallLocation" "$INSTDIR" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "InstallLocation" "$INSTDIR"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "DisplayIcon" "$INSTDIR\${MOD_ID}.ico" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "DisplayIcon" "$INSTDIR\${MOD_ID}.ico"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "Publisher" "${PACKAGING_AUTHORS}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "Publisher" "${PACKAGING_AUTHORS}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "URLInfoAbout" "${PACKAGING_WEBSITE_URL}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "URLInfoAbout" "${PACKAGING_WEBSITE_URL}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "DisplayVersion" "${TAG}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "DisplayVersion" "${TAG}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "NoModify" "1" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "NoModify" "1"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "NoRepair" "1" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" "NoRepair" "1"
SectionEnd SectionEnd
!macro Clean UN !macro Clean UN
Function ${UN}Clean Function ${UN}Clean
nsExec::ExecToLog '"$INSTDIR\OpenRA.Utility.exe" ${MOD_ID} --unregister-mod system' nsExec::ExecToLog '"$INSTDIR\OpenRA.Utility.exe" ${MOD_ID} --unregister-mod system'
RMDir /r $INSTDIR\mods RMDir /r $INSTDIR\mods
RMDir /r $INSTDIR\maps RMDir /r $INSTDIR\maps
RMDir /r $INSTDIR\glsl RMDir /r $INSTDIR\glsl
RMDir /r $INSTDIR\lua RMDir /r $INSTDIR\lua
Delete $INSTDIR\*.exe Delete $INSTDIR\*.exe
Delete $INSTDIR\*.exe.config Delete $INSTDIR\*.exe.config
Delete $INSTDIR\*.dll Delete $INSTDIR\*.dll
Delete $INSTDIR\*.ico Delete $INSTDIR\*.ico
Delete $INSTDIR\VERSION Delete $INSTDIR\VERSION
Delete $INSTDIR\AUTHORS Delete $INSTDIR\AUTHORS
Delete $INSTDIR\COPYING Delete $INSTDIR\COPYING
Delete "$INSTDIR\global mix database.dat" Delete "$INSTDIR\global mix database.dat"
Delete $INSTDIR\IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP Delete $INSTDIR\IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP
RMDir /r $INSTDIR\Support RMDir /r $INSTDIR\Support
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGING_WINDOWS_REGISTRY_KEY}"
DeleteRegKey HKLM "Software\Classes\openra-${MOD_ID}-${TAG}" DeleteRegKey HKLM "Software\Classes\openra-${MOD_ID}-${TAG}"
!ifdef USE_DISCORDID !ifdef USE_DISCORDID
DeleteRegKey HKLM "Software\Classes\discord-${DISCORD_APP_ID}" DeleteRegKey HKLM "Software\Classes\discord-${DISCORD_APP_ID}"
!endif !endif
Delete $INSTDIR\uninstaller.exe Delete $INSTDIR\uninstaller.exe
RMDir $INSTDIR RMDir $INSTDIR
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
; Clean up start menu: Delete all our icons, and the OpenRA folder ; Clean up start menu: Delete all our icons, and the OpenRA folder
; *only* if we were the only installed version ; *only* if we were the only installed version
Delete "$SMPROGRAMS\$StartMenuFolder\${PACKAGING_DISPLAY_NAME}.lnk" Delete "$SMPROGRAMS\$StartMenuFolder\${PACKAGING_DISPLAY_NAME}.lnk"
RMDir "$SMPROGRAMS\$StartMenuFolder" RMDir "$SMPROGRAMS\$StartMenuFolder"
Delete "$DESKTOP\OpenRA - ${PACKAGING_DISPLAY_NAME}.lnk" Delete "$DESKTOP\OpenRA - ${PACKAGING_DISPLAY_NAME}.lnk"
DeleteRegKey HKLM "Software\${PACKAGING_WINDOWS_REGISTRY_KEY}" DeleteRegKey HKLM "Software\${PACKAGING_WINDOWS_REGISTRY_KEY}"
FunctionEnd FunctionEnd
!macroend !macroend
!insertmacro Clean "" !insertmacro Clean ""
!insertmacro Clean "un." !insertmacro Clean "un."
Section "Uninstall" Section "Uninstall"
Call un.Clean Call un.Clean
SectionEnd SectionEnd
;*************************** ;***************************
;Section Descriptions ;Section Descriptions
;*************************** ;***************************
LangString DESC_GAME ${LANG_ENGLISH} "${PACKAGING_DISPLAY_NAME} game files." LangString DESC_GAME ${LANG_ENGLISH} "${PACKAGING_DISPLAY_NAME} game files."
LangString DESC_DESKTOPSHORTCUT ${LANG_ENGLISH} "Place shortcut on the Desktop." LangString DESC_DESKTOPSHORTCUT ${LANG_ENGLISH} "Place shortcut on the Desktop."
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${GAME} $(DESC_GAME) !insertmacro MUI_DESCRIPTION_TEXT ${GAME} $(DESC_GAME)
!insertmacro MUI_DESCRIPTION_TEXT ${DESKTOPSHORTCUT} $(DESC_DESKTOPSHORTCUT) !insertmacro MUI_DESCRIPTION_TEXT ${DESKTOPSHORTCUT} $(DESC_DESKTOPSHORTCUT)
!insertmacro MUI_FUNCTION_DESCRIPTION_END !insertmacro MUI_FUNCTION_DESCRIPTION_END
;*************************** ;***************************
;Callbacks ;Callbacks
;*************************** ;***************************
Function .onInstFailed Function .onInstFailed
Call Clean Call Clean
FunctionEnd FunctionEnd