test6
This commit is contained in:
parent
130615c141
commit
6b631c3fe8
1 changed files with 34 additions and 12 deletions
|
|
@ -1,14 +1,17 @@
|
|||
; Define your application name
|
||||
|
||||
!define APPNAME "MosswartMassacreNG"
|
||||
!define SOFTWARECOMPANY "MosswartMassacreNG"
|
||||
!define APPGUID "{4b1f02bb-9b95-46f0-ad5b-223fea7392fb}"
|
||||
!define CLASSNAME "MosswartMassacreNG.PluginCore"
|
||||
!define ASSEMBLY "MosswartMassacreNG.dll"
|
||||
!define APPNAME "MosswartMassacre"
|
||||
!define SOFTWARECOMPANY "MosswartMassacre"
|
||||
!define APPGUID "{8C97E839-4D05-4A5F-B0C8-E8E778654322}"
|
||||
!define CLASSNAME "MosswartMassacre.PluginCore"
|
||||
!define ASSEMBLY "MosswartMassacre.dll"
|
||||
!define LOADERGUID "{A1B2C3D4-E5F6-7890-1234-567890ABCDEF}"
|
||||
!define LOADERCLASS "MosswartMassacre.Loader.LoaderCore"
|
||||
!define LOADERASSEMBLY "MosswartMassacre.Loader.dll"
|
||||
InstallDir "C:\Games\DecalPlugins\${APPNAME}"
|
||||
;Icon "Installer\Res\Decal.ico"
|
||||
|
||||
!define BUILDPATH ".\..\..\bin\net48"
|
||||
!define BUILDPATH ".\..\bin\Release"
|
||||
|
||||
!getdllversion "${BUILDPATH}\${ASSEMBLY}" Expv_
|
||||
!define VERSION ${Expv_1}.${Expv_2}.${Expv_3}
|
||||
|
|
@ -145,7 +148,9 @@ Section "" CoreSection
|
|||
|
||||
File "${BUILDPATH}\${ASSEMBLY}"
|
||||
File "${BUILDPATH}\${APPNAME}.pdb"
|
||||
File "${BUILDPATH}\UtilityBelt.Service.Installer.exe"
|
||||
File "${BUILDPATH}\${LOADERASSEMBLY}"
|
||||
File "${BUILDPATH}\${APPNAME}.Loader.pdb"
|
||||
; File "${BUILDPATH}\UtilityBelt.Service.Installer.exe"
|
||||
|
||||
SectionEnd
|
||||
|
||||
|
|
@ -171,6 +176,23 @@ Section -FinishSection
|
|||
${ENDIF}
|
||||
${EndIf}
|
||||
|
||||
;Register loader in decal as network filter
|
||||
ClearErrors
|
||||
ReadRegStr $0 HKLM "Software\Decal\NetworkFilters\${LOADERGUID}" ""
|
||||
${If} ${Errors}
|
||||
WriteRegStr HKLM "Software\Decal\NetworkFilters\${LOADERGUID}" "" "${APPNAME}.Loader"
|
||||
WriteRegDWORD HKLM "Software\Decal\NetworkFilters\${LOADERGUID}" "Enabled" "0" ; Disabled by default for normal use
|
||||
WriteRegStr HKLM "Software\Decal\NetworkFilters\${LOADERGUID}" "Object" "${LOADERCLASS}"
|
||||
WriteRegStr HKLM "Software\Decal\NetworkFilters\${LOADERGUID}" "Assembly" "${LOADERASSEMBLY}"
|
||||
WriteRegStr HKLM "Software\Decal\NetworkFilters\${LOADERGUID}" "Path" "$INSTDIR"
|
||||
WriteRegStr HKLM "Software\Decal\NetworkFilters\${LOADERGUID}" "Surrogate" "{71A69713-6593-47EC-0002-0000000DECA1}"
|
||||
WriteRegStr HKLM "Software\Decal\NetworkFilters\${LOADERGUID}" "Uninstaller" "${APPNAME}"
|
||||
${Else}
|
||||
${IF} $0 != "${APPNAME}.Loader"
|
||||
MESSAGEBOX MB_OK|MB_ICONSTOP "Skipped decal loader registration. A decal network filter with this GUID already exists ($0), and is not ${APPNAME}.Loader."
|
||||
${ENDIF}
|
||||
${EndIf}
|
||||
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" "$INSTDIR\uninstall.exe"
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
|
|
@ -178,10 +200,6 @@ Section -FinishSection
|
|||
; make sure dotnet 4.8 is installed
|
||||
Call CheckAndDownloadDotNet48
|
||||
|
||||
; make sure UtilityBelt.Service is installed
|
||||
; TODO: try and pull UtilityBelt.Service version from the registry and check it against the version required for this plugin
|
||||
ExecWait '"$instdir\UtilityBelt.Service.Installer.exe"'
|
||||
|
||||
SectionEnd
|
||||
|
||||
; Modern install component descriptions
|
||||
|
|
@ -195,6 +213,7 @@ Section Uninstall
|
|||
;Remove from registry...
|
||||
DeleteRegKey HKLM "Software\${SOFTWARECOMPANY}\${APPNAME}"
|
||||
DeleteRegKey HKLM "Software\Decal\Plugins\${APPGUID}"
|
||||
DeleteRegKey HKLM "Software\Decal\NetworkFilters\${LOADERGUID}"
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
|
||||
|
||||
; Delete self
|
||||
|
|
@ -203,7 +222,10 @@ Section Uninstall
|
|||
;Clean up
|
||||
Delete "$INSTDIR\${ASSEMBLY}"
|
||||
Delete "$INSTDIR\${APPNAME}.pdb"
|
||||
Delete "$INSTDIR\UtilityBelt.Service.Installer.exe"
|
||||
Delete "$INSTDIR\${LOADERASSEMBLY}"
|
||||
Delete "$INSTDIR\${APPNAME}.Loader.pdb"
|
||||
Delete "$INSTDIR\loader_log.txt"
|
||||
; Delete "$INSTDIR\UtilityBelt.Service.Installer.exe"
|
||||
|
||||
;RMDir "$INSTDIR\"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue