Source Mod Installers: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 3: | Line 3: | ||
Use the following code where: | Use the following code where: | ||
* <code>##MODNAME##</code> is the Mod name. | * <code>##MODNAME##</code> is the Mod name. | ||
* <code>##MODVERSION##</code> is the installer's release version. | |||
* <code>##MODTEAM##</code> is the Mod's team. | * <code>##MODTEAM##</code> is the Mod's team. | ||
* <code>##MODURL##</code> is the Mod's website. | * <code>##MODURL##</code> is the Mod's website. | ||
Line 12: | Line 13: | ||
* <code>##FILEX##</code> is the last file you wish to install in the mod folder. | * <code>##FILEX##</code> is the last file you wish to install in the mod folder. | ||
<pre>!define PRODUCT_NAME "##MODNAME##" | <pre>!define PRODUCT_NAME "##MODNAME##" | ||
!define PRODUCT_VERSION " | !define PRODUCT_VERSION "##MODVERSION##" | ||
!define PRODUCT_PUBLISHER "##MODTEAM##" | !define PRODUCT_PUBLISHER "##MODTEAM##" | ||
!define PRODUCT_WEB_SITE "##MODURL##" | !define PRODUCT_WEB_SITE "##MODURL##" |
Revision as of 18:00, 21 October 2005
For this, you need NSIS and HM NIS Edit.
Use the following code where:
##MODNAME##
is the Mod name.##MODVERSION##
is the installer's release version.##MODTEAM##
is the Mod's team.##MODURL##
is the Mod's website.##MODDIR##
is the Mod's root directory (i.e.cstrike
).##INSTICO##
is the location on the local computer where the icon for the installer executable is.##DESKICO##
is the location on the local computer where the icon for the desktop icon for the game is.##FILE1##
is the first file you wish to install in the mod folder.##FILE2##
is the second file you wish to install in the mod folder.##FILEX##
is the last file you wish to install in the mod folder.
!define PRODUCT_NAME "##MODNAME##" !define PRODUCT_VERSION "##MODVERSION##" !define PRODUCT_PUBLISHER "##MODTEAM##" !define PRODUCT_WEB_SITE "##MODURL##" ;Remove this if you do not wish to have a custom desktop icon: !define DESKTOP_ICON ; MUI 1.67 compatible ------ !include "MUI.nsh" ; MUI Settings !define MUI_ABORTWARNING !define MUI_ICON "##INSTICO##" ; Welcome page !insertmacro MUI_PAGE_WELCOME ; Directory page !insertmacro MUI_PAGE_DIRECTORY ; Instfiles page !insertmacro MUI_PAGE_INSTFILES ; Language files !insertmacro MUI_LANGUAGE "English" ; MUI end ------ Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" OutFile "Setup.exe" InstallDir "" ShowInstDetails show Section "Mod" SEC01 SetOverwrite ifdiff SetOutPath "$INSTDIR" File "##FILE1##" File "##FILE2##" File "##FILEX##" !ifdef DESKTOP_ICON SetOutPath "$1" File "DESKICO" !endif SectionEnd Function .onInit ReadRegStr $0 HKLM "Software\Valve\Steam" InstallPath IfErrors lbl_123 lbl_456 lbl_456: Goto lbl_done lbl_123: ClearErrors StrCpy $0 "$PROGRAMFILES\Valve\Steam" lbl_done: StrCpy $INSTDIR "$0\SteamApps\SourceMods\MODDIR" !ifdef DESKTOP_ICON StrCpy $1 "$0\steam\games" !endif FunctionEnd