-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added NSIS Installer file for V1.0 of VieweD Defaults to using debug folder for the executable, and source data for the data files. Should also check if .NET 6 is installed.
- Loading branch information
1 parent
29d2481
commit da640cc
Showing
4 changed files
with
183 additions
and
13,282 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
; viewedsetup.nsi | ||
;-------------------------------- | ||
; Includes | ||
!include "MUI2.nsh" | ||
!include "logiclib.nsh" | ||
|
||
;-------------------------------- | ||
; Custom defines | ||
!define NAME "VieweD" | ||
!define APPFILE "viewed.exe" | ||
!define VERSION "1.0" | ||
!define SLUG "${NAME} v${VERSION}" | ||
!define BIN_DEBUG "bin\Debug\net6.0-windows\" | ||
|
||
|
||
; The name of the installer | ||
Name "${NAME}" | ||
|
||
; The file to write | ||
OutFile "${NAME} Setup.exe" | ||
|
||
; Request application privileges for Windows Vista | ||
RequestExecutionLevel user | ||
|
||
; Build Unicode installer | ||
Unicode True | ||
|
||
; The default installation directory | ||
InstallDir $DESKTOP\VieweD | ||
|
||
SetCompressor /SOLID lzma | ||
|
||
;-------------------------------- | ||
; UI | ||
|
||
!define MUI_ICON "resources\icons\found-it!.ico" | ||
!define MUI_HEADERIMAGE | ||
!define MUI_HEADERIMAGE_BITMAP "resources\nsis-header.bmp" | ||
!define MUI_WELCOMEPAGE_TITLE "${SLUG} Setup" | ||
!define MUI_ABORTWARNING | ||
|
||
;-------------------------------- | ||
; Installer pages | ||
!insertmacro MUI_PAGE_WELCOME | ||
; !insertmacro MUI_PAGE_LICENSE "license.txt" | ||
!insertmacro MUI_PAGE_DIRECTORY | ||
!insertmacro MUI_PAGE_COMPONENTS | ||
!insertmacro MUI_PAGE_INSTFILES | ||
!insertmacro MUI_PAGE_FINISH | ||
|
||
; Uninstaller pages | ||
!insertmacro MUI_UNPAGE_CONFIRM | ||
!insertmacro MUI_UNPAGE_INSTFILES | ||
|
||
; Set UI language | ||
!insertmacro MUI_LANGUAGE "English" | ||
|
||
;-------------------------------- | ||
; Include dotNET core check header | ||
; Source: https://github.com/danpaul88/nsis-dotnetcore | ||
!include "dotnetcore.nsh" | ||
|
||
; The stuff to install | ||
Section "VieweD Files (required)" MainApp ;No components page, name is not important | ||
SectionIn RO | ||
|
||
; Check for .NET 6 | ||
!insertmacro CheckDotNetCore 6.0 | ||
|
||
; Set output path to the installation directory. | ||
SetOutPath $INSTDIR | ||
|
||
; Main exe files (excluding the installer) | ||
; File /x viewedsetup.* *.* | ||
; Main executable | ||
File ${BIN_DEBUG}*.exe | ||
; Libraries | ||
File ${BIN_DEBUG}*.dll | ||
; Library configurations | ||
File ${BIN_DEBUG}*.json | ||
; Debug file | ||
File ${BIN_DEBUG}*.pdb | ||
|
||
; Program Data | ||
|
||
; Engines Plugin Readme | ||
SetOutPath $INSTDIR\data | ||
File data\welcome.rtf | ||
|
||
; Default Plugins | ||
; FFXI Engine Data | ||
SetOutPath $INSTDIR\data\ffxi\filter | ||
File /r data\ffxi\filter\*.* | ||
|
||
SetOutPath $INSTDIR\data\ffxi\lookup | ||
File /r data\ffxi\lookup\*.* | ||
|
||
SetOutPath $INSTDIR\data\ffxi\rules | ||
File /r data\ffxi\rules\ffxi.xml | ||
|
||
; AA Engine Data | ||
SetOutPath $INSTDIR\data\aa\filter | ||
File /r data\aa\filter\*.* | ||
|
||
SetOutPath $INSTDIR\data\aa\keys | ||
File /r data\aa\filter\*.* | ||
|
||
SetOutPath $INSTDIR\data\aa\lookup | ||
File /r data\aa\lookup\*.txt | ||
|
||
SetOutPath $INSTDIR\data\aa\rules | ||
File /r data\aa\rules\*.txt | ||
|
||
SetOutPath $INSTDIR | ||
|
||
WriteRegStr HKCU "Software\${NAME}" "" $INSTDIR | ||
WriteUninstaller "$INSTDIR\Uninstall.exe" | ||
SectionEnd ; end the section | ||
|
||
;-------------------------------- | ||
; Section - Shortcut | ||
Section "Desktop Shortcut" DeskShort | ||
CreateShortCut "$DESKTOP\${NAME}.lnk" "$INSTDIR\${APPFILE}" | ||
SectionEnd | ||
|
||
;-------------------------------- | ||
; Remove empty parent directories | ||
Function un.RMDirUP | ||
|
||
!define RMDirUP '!insertmacro RMDirUPCall' | ||
|
||
!macro RMDirUPCall _PATH | ||
push '${_PATH}' | ||
Call un.RMDirUP | ||
!macroend | ||
|
||
; $0 - current folder | ||
ClearErrors | ||
|
||
Exch $0 | ||
;DetailPrint "ASDF - $0\.." | ||
RMDir "$0\.." | ||
|
||
IfErrors Skip | ||
${RMDirUP} "$0\.." | ||
Skip: | ||
|
||
Pop $0 | ||
|
||
FunctionEnd | ||
|
||
;-------------------------------- | ||
; Section - Uninstaller | ||
|
||
Section "Uninstall" | ||
|
||
;Delete Shortcut | ||
Delete "$DESKTOP\${NAME}.lnk" | ||
|
||
;Delete Uninstall | ||
Delete "$INSTDIR\Uninstall.exe" | ||
|
||
;Delete Folder | ||
RMDir /r "$INSTDIR" | ||
${RMDirUP} "$INSTDIR" | ||
|
||
DeleteRegKey /ifempty HKCU "Software\${NAME}" | ||
|
||
SectionEnd | ||
|
||
;-------------------------------- | ||
; Descriptions | ||
|
||
;Language strings | ||
LangString DESC_DeskShort ${LANG_ENGLISH} "Create Shortcut on Dekstop." | ||
LangString DESC_MainApp ${LANG_ENGLISH} "The main program files required to run VieweD" | ||
|
||
;Assign language strings to sections | ||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN | ||
!insertmacro MUI_DESCRIPTION_TEXT ${DeskShort} $(DESC_DeskShort) | ||
!insertmacro MUI_DESCRIPTION_TEXT ${MainApp} $(DESC_MainApp) | ||
!insertmacro MUI_FUNCTION_DESCRIPTION_END |
Oops, something went wrong.