;-------------------------------- ;djDecks Skin Installer Installer ;Simply edit the following variables to your own skin name ;Change app_dir to the djDecks skins directory ;Then just compile (right-click, select Compile NSIS Script), ; and you get yourself a nice installer !define SKINNAME "MySkin" !define VERSION "0.5" !define APP_DIR "c:\Program Files\djDecks\skins" !define PRODUCT "djDecks Skin - ${SKINNAME}" ;-------------------------------- ;To automatically create a skin installer, you need a .txt and a .xml file ;with the name of the skin in the skins directory ;and you need a subdirectory with the same name as your skin in the skins directory ;that contains all graphics (bmp, gif, jpg and/or png) and (optional) additional xml files ; ;To compile this script, you need Nullsoft's Installer which can be downloaded from ; http://nsis.sourceforge.net/download/ ;-------------------------------- ;You don't need to change anything below this point unless you want to customize the installer ;-------------------------------- ;Make sure compression is maximal SetCompressor /SOLID /FINAL lzma ;-------------------------------- ;Include Modern UI !include "MUI.nsh" ;-------------------------------- ;Configuration ;General Name "${PRODUCT} ${VERSION}" OutFile "djDecksSkin_${SKINNAME}.exe" ;Folder selection page InstallDir "$PROGRAMFILES\djDecks" ; Registry key to check for directory (so if you install again, it will overwrite the old one automatically) InstallDirRegKey HKLM SOFTWARE\djDecks "Install_Dir" ;-------------------------------- ;Interface Settings !define MUI_ABORTWARNING ;-------------------------------- ;Pages !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE "${APP_DIR}\${SKINNAME}.txt" !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH ;-------------------------------- ;Languages !insertmacro MUI_LANGUAGE "English" ;-------------------------------- ;Installer Sections Section "djDecks Skin ${SKINNAME} (required)" SecCopyUI ;Main Files SetOutPath "$INSTDIR\skins" File "${APP_DIR}\${SKINNAME}.xml" File /nonfatal "${APP_DIR}\${SKINNAME}.txt" SetOutPath "$INSTDIR\skins\${SKINNAME}" Delete "$INSTDIR\skins\${SKINNAME}\*.png" Delete "$INSTDIR\skins\${SKINNAME}\*.jpg" Delete "$INSTDIR\skins\${SKINNAME}\*.gif" Delete "$INSTDIR\skins\${SKINNAME}\*.bmp" Delete "$INSTDIR\skins\${SKINNAME}\*.xml" Delete "$INSTDIR\skins\${SKINNAME}\*.lst" File /nonfatal /r "${APP_DIR}\${SKINNAME}\*.png" File /nonfatal /r "${APP_DIR}\${SKINNAME}\*.jpg" File /nonfatal /r "${APP_DIR}\${SKINNAME}\*.gif" File /nonfatal /r "${APP_DIR}\${SKINNAME}\*.bmp" File /nonfatal /r "${APP_DIR}\${SKINNAME}\*.xml" File /nonfatal /r "${APP_DIR}\${SKINNAME}\*.lst" File /nonfatal /r "${APP_DIR}\${SKINNAME}\*.djscript" SectionEnd ;-------------------------------- ;Descriptions LangString DESC_SecCopyUI ${LANG_ENGLISH} "djDecks Skin ${SKINNAME} (required)" !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI) !insertmacro MUI_FUNCTION_DESCRIPTION_END