2011-04-26 13:29:14 +00:00
|
|
|
|
# ScummVM - Graphic Adventure Engine
|
|
|
|
|
#
|
|
|
|
|
# ScummVM is the legal property of its developers, whose names
|
|
|
|
|
# are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
|
# file distributed with this source distribution.
|
|
|
|
|
#
|
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
|
2011-07-01 04:24:31 +00:00
|
|
|
|
#!define _DEBUG
|
2011-05-11 21:58:29 +00:00
|
|
|
|
#!define _INCLUDE_DATA_FILES
|
2011-07-01 13:18:51 +00:00
|
|
|
|
!define _ENABLE_GAME_EXPLORER
|
|
|
|
|
#!define _LOG_BUILD
|
|
|
|
|
!define _CONVERT_TEXT
|
2011-04-26 13:29:14 +00:00
|
|
|
|
|
2011-04-27 15:08:05 +00:00
|
|
|
|
Name ScummVM
|
|
|
|
|
|
2011-04-26 13:29:14 +00:00
|
|
|
|
# Included files
|
|
|
|
|
!include MUI2.nsh
|
|
|
|
|
|
2011-07-01 13:18:51 +00:00
|
|
|
|
# Plugins
|
|
|
|
|
!ifdef _ENABLE_GAME_EXPLORER
|
|
|
|
|
!AddPluginDir "./plugins"
|
|
|
|
|
!endif
|
|
|
|
|
|
2011-05-05 16:51:05 +00:00
|
|
|
|
#########################################################################################
|
|
|
|
|
# Command line options
|
|
|
|
|
#########################################################################################
|
|
|
|
|
|
|
|
|
|
#!define top_srcdir ""
|
2011-07-01 04:24:31 +00:00
|
|
|
|
#!define staging_dir ""
|
2011-05-05 16:51:05 +00:00
|
|
|
|
#!define ARCH "" ;(optional, defaults to win32)
|
2011-05-05 16:58:42 +00:00
|
|
|
|
|
|
|
|
|
# Check parameters
|
|
|
|
|
!ifndef top_srcdir
|
|
|
|
|
!error "Top source folder has not been passed to command line!"
|
|
|
|
|
!endif
|
|
|
|
|
|
2011-07-01 03:30:05 +00:00
|
|
|
|
!ifndef staging_dir
|
|
|
|
|
!error "Staging folder has not been passed to command line (this folder should contain the executable and linked DLLs)!"
|
2011-05-05 16:58:42 +00:00
|
|
|
|
!endif
|
|
|
|
|
|
2011-05-05 16:51:05 +00:00
|
|
|
|
!ifndef ARCH
|
2011-05-05 16:58:42 +00:00
|
|
|
|
!warning "ARCH has not been defined, defaulting to 'win32'"
|
|
|
|
|
!define ARCH "win32"
|
2011-07-01 04:24:31 +00:00
|
|
|
|
!else
|
|
|
|
|
!if "${ARCH}" == ""
|
|
|
|
|
!warning "ARCH was empty, defaulting to 'win32'"
|
|
|
|
|
!undef ARCH
|
|
|
|
|
!define ARCH "win32"
|
|
|
|
|
!endif
|
2011-05-05 16:51:05 +00:00
|
|
|
|
!endif
|
|
|
|
|
|
2011-04-26 13:29:14 +00:00
|
|
|
|
#########################################################################################
|
|
|
|
|
# Folders
|
|
|
|
|
#########################################################################################
|
|
|
|
|
!define engine_data "${top_srcdir}\dists\engine-data"
|
|
|
|
|
!define theme_data "${top_srcdir}\gui\themes"
|
|
|
|
|
|
|
|
|
|
#########################################################################################
|
|
|
|
|
# General Symbol Definitions
|
|
|
|
|
#########################################################################################
|
2011-04-27 15:08:05 +00:00
|
|
|
|
!define REGKEY "Software\$(^Name)\$(^Name)"
|
2014-06-30 20:55:38 +00:00
|
|
|
|
!define VERSION "1.8.0git"
|
2011-04-27 15:08:05 +00:00
|
|
|
|
!define COMPANY "ScummVM Team"
|
|
|
|
|
!define URL "http://scummvm.org/"
|
2011-04-26 13:29:14 +00:00
|
|
|
|
!define DESCRIPTION "ScummVM Installer. Look! A three headed monkey (TM)!"
|
2015-01-18 02:24:25 +00:00
|
|
|
|
!define COPYRIGHT "Copyright <20> 2001-2015 The ScummVM Team"
|
2011-04-26 13:29:14 +00:00
|
|
|
|
|
|
|
|
|
#########################################################################################
|
|
|
|
|
# Installer configuration
|
|
|
|
|
#########################################################################################
|
2011-07-01 03:30:05 +00:00
|
|
|
|
OutFile ${staging_dir}\scummvm-${VERSION}-${ARCH}.exe
|
2011-04-27 15:08:05 +00:00
|
|
|
|
InstallDir $PROGRAMFILES\ScummVM ; Default installation folder
|
|
|
|
|
InstallDirRegKey HKCU "Software\ScummVM\ScummVM" "InstallPath" ; Get installation folder from registry if available
|
|
|
|
|
; The application name needs to be refered directly instead of through ${REGKEY}
|
2011-04-26 13:29:14 +00:00
|
|
|
|
; because lang strings aren't initialized at the point InstallDirRegKey is called
|
|
|
|
|
|
|
|
|
|
CRCCheck on
|
2011-04-27 15:08:05 +00:00
|
|
|
|
XPStyle on
|
2011-04-26 13:29:14 +00:00
|
|
|
|
#TargetMinimalOS 5.0 ; Minimal version of windows for installer: Windows 2000 or more recent
|
|
|
|
|
; (will build unicode installer with NSIS 2.50+)
|
|
|
|
|
|
2014-06-30 20:55:38 +00:00
|
|
|
|
VIProductVersion 1.8.0.0
|
2011-04-27 15:08:05 +00:00
|
|
|
|
VIAddVersionKey ProductName $(^Name)
|
|
|
|
|
VIAddVersionKey ProductVersion "${VERSION}"
|
|
|
|
|
VIAddVersionKey CompanyName "${COMPANY}"
|
|
|
|
|
VIAddVersionKey CompanyWebsite "${URL}"
|
|
|
|
|
VIAddVersionKey FileVersion "${VERSION}"
|
|
|
|
|
VIAddVersionKey FileDescription "${DESCRIPTION}"
|
|
|
|
|
VIAddVersionKey LegalCopyright "${COPYRIGHT}"
|
2011-04-26 13:29:14 +00:00
|
|
|
|
|
2011-04-27 15:08:05 +00:00
|
|
|
|
BrandingText "$(^Name) ${VERSION}" ; Change branding text on the installer to show our name and version instead of NSIS's
|
2011-04-26 13:29:14 +00:00
|
|
|
|
|
2011-04-27 15:08:05 +00:00
|
|
|
|
# Show Details when installing/uninstalling files
|
|
|
|
|
ShowInstDetails show
|
2011-04-26 13:29:14 +00:00
|
|
|
|
ShowUninstDetails show
|
|
|
|
|
|
|
|
|
|
!ifdef _DEBUG
|
2011-04-27 15:08:05 +00:00
|
|
|
|
SetCompress off ; for debugging the installer, lzma takes forever
|
2011-04-26 13:29:14 +00:00
|
|
|
|
RequestExecutionLevel user
|
|
|
|
|
!else
|
|
|
|
|
SetCompressor /FINAL /SOLID lzma
|
|
|
|
|
SetCompressorDictSize 64
|
2011-04-27 15:08:05 +00:00
|
|
|
|
RequestExecutionLevel admin ; for installation into program files folders
|
2011-04-26 13:29:14 +00:00
|
|
|
|
!endif
|
|
|
|
|
|
|
|
|
|
#########################################################################################
|
|
|
|
|
# MUI Symbol Definitions
|
|
|
|
|
#########################################################################################
|
|
|
|
|
!define MUI_WELCOMEFINISHPAGE_BITMAP "graphics\left.bmp"
|
2011-04-27 15:08:05 +00:00
|
|
|
|
!define MUI_ICON "graphics\scummvm-install.ico"
|
|
|
|
|
!define MUI_UNICON "graphics\scummvm-install.ico"
|
|
|
|
|
|
|
|
|
|
#Start menu
|
|
|
|
|
!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKCU
|
|
|
|
|
!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}
|
2011-04-26 13:29:14 +00:00
|
|
|
|
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
|
2011-04-27 15:08:05 +00:00
|
|
|
|
!define MUI_STARTMENUPAGE_DEFAULTFOLDER $(^Name)
|
|
|
|
|
|
2011-04-27 19:13:17 +00:00
|
|
|
|
# Finish page
|
2011-04-27 15:08:05 +00:00
|
|
|
|
!define MUI_FINISHPAGE_RUN "$INSTDIR\scummvm.exe"
|
2011-04-26 13:29:14 +00:00
|
|
|
|
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
|
2011-04-27 15:08:05 +00:00
|
|
|
|
!define MUI_FINISHPAGE_RUN_NOTCHECKED
|
2011-04-26 13:29:14 +00:00
|
|
|
|
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
2011-04-27 15:08:05 +00:00
|
|
|
|
|
|
|
|
|
!define MUI_LICENSEPAGE_RADIOBUTTONS
|
|
|
|
|
|
|
|
|
|
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
2011-04-26 13:29:14 +00:00
|
|
|
|
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
|
|
|
|
|
|
|
|
|
|
#########################################################################################
|
|
|
|
|
# Installer pages
|
|
|
|
|
#########################################################################################
|
|
|
|
|
# Variables
|
|
|
|
|
Var StartMenuGroup
|
|
|
|
|
|
|
|
|
|
;Remember the installer language
|
2011-04-27 19:13:17 +00:00
|
|
|
|
!define MUI_LANGDLL_REGISTRY_ROOT HKCU
|
|
|
|
|
!define MUI_LANGDLL_REGISTRY_KEY ${REGKEY}
|
2011-04-26 13:29:14 +00:00
|
|
|
|
!define MUI_LANGDLL_REGISTRY_VALUENAME "InstallerLanguage"
|
|
|
|
|
|
|
|
|
|
!insertmacro MUI_PAGE_WELCOME
|
|
|
|
|
!insertmacro MUI_PAGE_LICENSE ${top_srcdir}\COPYING
|
|
|
|
|
!insertmacro MUI_PAGE_DIRECTORY
|
|
|
|
|
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
|
|
|
|
|
!insertmacro MUI_PAGE_INSTFILES
|
|
|
|
|
!insertmacro MUI_PAGE_FINISH
|
|
|
|
|
!insertmacro MUI_UNPAGE_CONFIRM
|
|
|
|
|
!insertmacro MUI_UNPAGE_INSTFILES
|
|
|
|
|
|
|
|
|
|
# Installer languages
|
|
|
|
|
!insertmacro MUI_LANGUAGE "English" ;first language is the default language
|
|
|
|
|
|
|
|
|
|
!ifndef _DEBUG ; Skip other languages when building debug builds
|
2011-04-27 14:53:04 +00:00
|
|
|
|
;!insertmacro MUI_LANGUAGE "Afrikaans"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Albanian"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Arabic"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Belarusian"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Bosnian"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Breton"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Bulgarian"
|
|
|
|
|
!insertmacro MUI_LANGUAGE "Catalan"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Croatian"
|
|
|
|
|
!insertmacro MUI_LANGUAGE "Czech"
|
|
|
|
|
!insertmacro MUI_LANGUAGE "Danish"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Dutch"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Esperanto"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Estonian"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Farsi"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Finnish"
|
2011-04-26 13:29:14 +00:00
|
|
|
|
!insertmacro MUI_LANGUAGE "French"
|
2011-04-27 14:53:04 +00:00
|
|
|
|
;!insertmacro MUI_LANGUAGE "Galician"
|
2011-04-26 13:29:14 +00:00
|
|
|
|
!insertmacro MUI_LANGUAGE "German"
|
2011-04-27 14:53:04 +00:00
|
|
|
|
;!insertmacro MUI_LANGUAGE "Greek"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Hebrew"
|
|
|
|
|
!insertmacro MUI_LANGUAGE "Hungarian"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Icelandic"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Indonesian"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Irish"
|
2011-04-26 13:29:14 +00:00
|
|
|
|
!insertmacro MUI_LANGUAGE "Italian"
|
2011-04-27 14:53:04 +00:00
|
|
|
|
;!insertmacro MUI_LANGUAGE "Japanese"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Korean"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Kurdish"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Latvian"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Lithuanian"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Luxembourgish"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Macedonian"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Malay"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Mongolian"
|
2011-04-26 13:29:14 +00:00
|
|
|
|
!insertmacro MUI_LANGUAGE "Norwegian"
|
|
|
|
|
!insertmacro MUI_LANGUAGE "NorwegianNynorsk"
|
|
|
|
|
!insertmacro MUI_LANGUAGE "Polish"
|
2011-04-27 14:53:04 +00:00
|
|
|
|
;!insertmacro MUI_LANGUAGE "Portuguese"
|
|
|
|
|
!insertmacro MUI_LANGUAGE "PortugueseBR"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Romanian"
|
|
|
|
|
!insertmacro MUI_LANGUAGE "Russian"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Serbian"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "SerbianLatin"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "SimpChinese"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Slovak"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Slovenian"
|
|
|
|
|
!insertmacro MUI_LANGUAGE "Spanish"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "SpanishInternational"
|
|
|
|
|
!insertmacro MUI_LANGUAGE "Swedish"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Thai"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "TradChinese"
|
|
|
|
|
;!insertmacro MUI_LANGUAGE "Turkish"
|
2011-04-26 13:29:14 +00:00
|
|
|
|
!insertmacro MUI_LANGUAGE "Ukrainian"
|
2011-04-27 14:53:04 +00:00
|
|
|
|
;!insertmacro MUI_LANGUAGE "Uzbek"
|
2011-04-26 13:29:14 +00:00
|
|
|
|
!endif
|
|
|
|
|
|
|
|
|
|
;Reserve Files (will make sure the file will be stored first in the data block
|
|
|
|
|
; making the installer start faster when compressing in solid mode)
|
|
|
|
|
!insertmacro MUI_RESERVEFILE_LANGDLL
|
|
|
|
|
|
|
|
|
|
#########################################################################################
|
|
|
|
|
# Installer sections
|
|
|
|
|
#########################################################################################
|
|
|
|
|
Section "ScummVM" SecMain
|
2011-07-01 13:18:51 +00:00
|
|
|
|
!ifdef _LOG_BUILD
|
|
|
|
|
LogSet on
|
|
|
|
|
!endif
|
2011-04-26 13:29:14 +00:00
|
|
|
|
SetOutPath $INSTDIR
|
|
|
|
|
SetOverwrite on
|
|
|
|
|
|
|
|
|
|
# Text files
|
2011-07-01 04:24:31 +00:00
|
|
|
|
File /oname=AUTHORS.txt "${top_srcdir}\AUTHORS"
|
2011-07-01 03:30:05 +00:00
|
|
|
|
File /oname=COPYING.LGPL.txt "${top_srcdir}\COPYING.LGPL"
|
|
|
|
|
File /oname=COPYING.txt "${top_srcdir}\COPYING"
|
|
|
|
|
File /oname=COPYRIGHT.txt "${top_srcdir}\COPYRIGHT"
|
|
|
|
|
File /oname=NEWS.txt "${top_srcdir}\NEWS"
|
|
|
|
|
File /oname=README.txt "${top_srcdir}\README"
|
|
|
|
|
|
2011-07-01 13:18:51 +00:00
|
|
|
|
!ifdef _CONVERT_TEXT
|
2011-07-01 03:30:05 +00:00
|
|
|
|
# Convert line endings
|
|
|
|
|
Push "$INSTDIR\AUTHORS.txt"
|
2011-07-01 04:24:31 +00:00
|
|
|
|
Call unix2dos
|
2011-07-01 03:30:05 +00:00
|
|
|
|
Push "$INSTDIR\COPYING.LGPL.txt"
|
2011-07-01 04:24:31 +00:00
|
|
|
|
Call unix2dos
|
2011-07-01 03:30:05 +00:00
|
|
|
|
Push "$INSTDIR\COPYING.txt"
|
2011-07-01 04:24:31 +00:00
|
|
|
|
Call unix2dos
|
2011-07-01 03:30:05 +00:00
|
|
|
|
Push "$INSTDIR\COPYRIGHT.txt"
|
2011-07-01 04:24:31 +00:00
|
|
|
|
Call unix2dos
|
2011-07-01 03:30:05 +00:00
|
|
|
|
Push "$INSTDIR\NEWS.txt"
|
2011-07-01 04:24:31 +00:00
|
|
|
|
Call unix2dos
|
2011-07-01 03:30:05 +00:00
|
|
|
|
Push "$INSTDIR\README.txt"
|
|
|
|
|
Call unix2dos
|
2011-07-01 13:18:51 +00:00
|
|
|
|
!endif
|
2011-04-26 13:29:14 +00:00
|
|
|
|
|
2011-05-11 21:58:29 +00:00
|
|
|
|
!ifdef _INCLUDE_DATA_FILES
|
2011-04-26 13:29:14 +00:00
|
|
|
|
# Engine data
|
|
|
|
|
File "${engine_data}\drascula.dat"
|
|
|
|
|
File "${engine_data}\hugo.dat"
|
|
|
|
|
File "${engine_data}\kyra.dat"
|
|
|
|
|
File "${engine_data}\lure.dat"
|
|
|
|
|
File "${engine_data}\queen.tbl"
|
|
|
|
|
File "${engine_data}\sky.cpt"
|
|
|
|
|
File "${engine_data}\teenagent.dat"
|
|
|
|
|
File "${engine_data}\toon.dat"
|
|
|
|
|
|
|
|
|
|
File "${top_srcdir}\dists\pred.dic"
|
|
|
|
|
|
|
|
|
|
# Themes
|
|
|
|
|
File "${theme_data}\scummclassic.zip"
|
|
|
|
|
File "${theme_data}\scummmodern.zip"
|
|
|
|
|
File "${theme_data}\translations.dat"
|
2011-05-11 21:58:29 +00:00
|
|
|
|
!endif
|
2011-04-26 13:29:14 +00:00
|
|
|
|
|
|
|
|
|
# Main exe and dlls
|
2011-07-01 03:30:05 +00:00
|
|
|
|
File "${staging_dir}\scummvm.exe"
|
|
|
|
|
File "${staging_dir}\SDL.dll"
|
2011-04-27 19:13:17 +00:00
|
|
|
|
|
2011-04-26 13:29:14 +00:00
|
|
|
|
WriteRegStr HKCU "${REGKEY}" InstallPath "$INSTDIR" ; Store installation folder
|
2011-07-01 13:18:51 +00:00
|
|
|
|
|
|
|
|
|
#Register with game explorer
|
|
|
|
|
!ifdef _ENABLE_GAME_EXPLORER
|
|
|
|
|
Games::registerGame "$INSTDIR\scummvm.exe"
|
|
|
|
|
pop $0
|
|
|
|
|
# This is for Vista only, for 7 the tasks are defined in the gdf xml
|
|
|
|
|
${If} $0 != "0"
|
|
|
|
|
${AndIf} $0 != ""
|
2011-07-01 20:40:48 +00:00
|
|
|
|
${AndIf} $0 != "$INSTDIR\scummvm.exe"
|
2011-07-01 13:18:51 +00:00
|
|
|
|
CreateDirectory "$0\PlayTasks\0"
|
|
|
|
|
CreateShortcut "$0\PlayTasks\0\Play.lnk" "$INSTDIR\scummvm.exe" "--no-console"
|
|
|
|
|
CreateDirectory "$0\PlayTasks\1"
|
|
|
|
|
CreateShortcut "$0\PlayTasks\1\Play (console).lnk" "$INSTDIR\scummvm.exe"
|
|
|
|
|
CreateDirectory "$0\SupportTasks\0"
|
|
|
|
|
CreateShortcut "$0\SupportTasks\0\Home Page.lnk" "${URL}"
|
|
|
|
|
${EndIf}
|
|
|
|
|
!endif
|
2011-04-26 13:29:14 +00:00
|
|
|
|
SectionEnd
|
|
|
|
|
|
2011-04-27 15:08:05 +00:00
|
|
|
|
# Write Start menu entries and uninstaller
|
2011-04-26 13:29:14 +00:00
|
|
|
|
Section -post SecMainPost
|
|
|
|
|
SetOutPath $INSTDIR
|
|
|
|
|
WriteUninstaller $INSTDIR\uninstall.exe
|
|
|
|
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
2011-04-28 17:35:35 +00:00
|
|
|
|
SetShellVarContext all ; Create shortcuts in the all-users folder
|
2011-04-28 09:16:19 +00:00
|
|
|
|
CreateDirectory "$SMPROGRAMS\$StartMenuGroup"
|
2011-07-01 13:18:51 +00:00
|
|
|
|
CreateShortCut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\$(^Name).exe "" "$INSTDIR\$(^Name).exe" 0 ; Create shortcut with icon
|
|
|
|
|
CreateShortCut "$SMPROGRAMS\$StartMenuGroup\$(^Name) (No console).lnk" $INSTDIR\$(^Name).exe "--no-console" "$INSTDIR\$(^Name).exe" 0
|
2011-04-28 09:16:19 +00:00
|
|
|
|
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Readme.lnk" $INSTDIR\README.txt
|
2011-04-26 13:29:14 +00:00
|
|
|
|
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe
|
|
|
|
|
!insertmacro MUI_STARTMENU_WRITE_END
|
2011-04-27 15:08:05 +00:00
|
|
|
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"
|
|
|
|
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}"
|
|
|
|
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}"
|
|
|
|
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}"
|
|
|
|
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe
|
|
|
|
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe
|
|
|
|
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" InstallLocation $INSTDIR
|
2011-04-26 13:29:14 +00:00
|
|
|
|
WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1
|
|
|
|
|
WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1
|
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
|
|
# Installer functions
|
|
|
|
|
Function .onInit
|
|
|
|
|
!insertmacro MUI_LANGDLL_DISPLAY
|
2011-04-27 19:13:17 +00:00
|
|
|
|
|
2011-04-28 09:16:19 +00:00
|
|
|
|
!ifdef _DEBUG && NSIS_CONFIG_LOG
|
2011-04-27 15:08:05 +00:00
|
|
|
|
LogSet on ; Will write a log file to the install folder (when using the special NSIS logging build)
|
2011-04-26 13:29:14 +00:00
|
|
|
|
!endif
|
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
|
|
#########################################################################################
|
|
|
|
|
# Uninstaller sections
|
|
|
|
|
#########################################################################################
|
2011-04-28 09:26:05 +00:00
|
|
|
|
Section -un.Main SecUninstall
|
2011-04-27 15:08:05 +00:00
|
|
|
|
Delete /REBOOTOK $INSTDIR\AUTHORS.txt
|
|
|
|
|
Delete /REBOOTOK $INSTDIR\COPYING.txt
|
|
|
|
|
Delete /REBOOTOK $INSTDIR\COPYING.LGPL.txt
|
|
|
|
|
Delete /REBOOTOK $INSTDIR\COPYRIGHT.txt
|
|
|
|
|
Delete /REBOOTOK $INSTDIR\NEWS.txt
|
2011-04-26 13:29:14 +00:00
|
|
|
|
Delete /REBOOTOK $INSTDIR\README.txt
|
2011-04-27 15:08:05 +00:00
|
|
|
|
Delete /REBOOTOK $INSTDIR\README-SDL.txt
|
2011-04-27 19:13:17 +00:00
|
|
|
|
|
2011-05-11 21:58:29 +00:00
|
|
|
|
!ifdef _INCLUDE_DATA_FILES
|
2011-04-27 15:08:05 +00:00
|
|
|
|
Delete /REBOOTOK $INSTDIR\drascula.dat
|
|
|
|
|
Delete /REBOOTOK $INSTDIR\hugo.dat
|
|
|
|
|
Delete /REBOOTOK $INSTDIR\kyra.dat
|
|
|
|
|
Delete /REBOOTOK $INSTDIR\lure.dat
|
2011-04-26 13:29:14 +00:00
|
|
|
|
Delete /REBOOTOK $INSTDIR\queen.tbl
|
2011-04-27 15:08:05 +00:00
|
|
|
|
Delete /REBOOTOK $INSTDIR\sky.cpt
|
|
|
|
|
Delete /REBOOTOK $INSTDIR\teenagent.dat
|
|
|
|
|
Delete /REBOOTOK $INSTDIR\toon.dat
|
2011-04-27 19:13:17 +00:00
|
|
|
|
|
2011-04-26 13:29:14 +00:00
|
|
|
|
Delete /REBOOTOK $INSTDIR\pred.dic
|
2011-04-27 19:13:17 +00:00
|
|
|
|
|
2011-04-27 15:08:05 +00:00
|
|
|
|
Delete /REBOOTOK $INSTDIR\scummclassic.zip
|
|
|
|
|
Delete /REBOOTOK $INSTDIR\scummmodern.zip
|
|
|
|
|
Delete /REBOOTOK $INSTDIR\translations.dat
|
2011-05-11 21:58:29 +00:00
|
|
|
|
!endif
|
2011-04-27 19:13:17 +00:00
|
|
|
|
|
2011-07-01 13:18:51 +00:00
|
|
|
|
!ifdef _ENABLE_GAME_EXPLORER
|
|
|
|
|
Games::unregisterGame "$INSTDIR\scummvm.exe"
|
|
|
|
|
!endif
|
|
|
|
|
|
2011-04-27 15:08:05 +00:00
|
|
|
|
Delete /REBOOTOK $INSTDIR\scummvm.exe
|
|
|
|
|
Delete /REBOOTOK $INSTDIR\SDL.dll
|
2011-04-26 13:29:14 +00:00
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
|
|
Section -un.post SecUninstallPost
|
2011-04-28 17:35:35 +00:00
|
|
|
|
# Remove start menu entries
|
|
|
|
|
SetShellVarContext all
|
|
|
|
|
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk"
|
|
|
|
|
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Readme.lnk"
|
2011-04-26 13:29:14 +00:00
|
|
|
|
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk"
|
2011-04-28 17:35:35 +00:00
|
|
|
|
RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup
|
|
|
|
|
|
|
|
|
|
Delete /REBOOTOK $INSTDIR\uninstall.exe
|
|
|
|
|
|
|
|
|
|
DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"
|
2011-04-26 13:29:14 +00:00
|
|
|
|
DeleteRegValue HKCU "${REGKEY}" StartMenuGroup
|
|
|
|
|
DeleteRegValue HKCU "${REGKEY}" InstallPath
|
|
|
|
|
DeleteRegValue HKCU "${REGKEY}" InstallerLanguage
|
|
|
|
|
DeleteRegKey /IfEmpty HKCU "${REGKEY}"
|
2011-04-28 17:35:35 +00:00
|
|
|
|
|
|
|
|
|
RmDir $INSTDIR ; will only remove if empty (pass /r flag for recursive behavior)
|
2011-04-26 13:29:14 +00:00
|
|
|
|
Push $R0
|
|
|
|
|
StrCpy $R0 $StartMenuGroup 1
|
|
|
|
|
StrCmp $R0 ">" no_smgroup
|
|
|
|
|
no_smgroup:
|
|
|
|
|
Pop $R0
|
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
|
|
# Uninstaller functions
|
|
|
|
|
Function un.onInit
|
|
|
|
|
!insertmacro MUI_UNGETLANGUAGE
|
2011-04-27 15:08:05 +00:00
|
|
|
|
ReadRegStr $INSTDIR HKCU "${REGKEY}" InstallPath
|
2011-04-26 13:29:14 +00:00
|
|
|
|
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
|
|
|
|
|
FunctionEnd
|
2011-07-01 03:30:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#########################################################################################
|
|
|
|
|
# Helper functions
|
|
|
|
|
#########################################################################################
|
|
|
|
|
|
2011-07-01 13:18:51 +00:00
|
|
|
|
!ifdef _CONVERT_TEXT
|
2011-07-01 03:30:05 +00:00
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; strips all CRs and then converts all LFs into CRLFs
|
|
|
|
|
; (this is roughly equivalent to "cat file | dos2unix | unix2dos")
|
|
|
|
|
;
|
|
|
|
|
; Usage:
|
|
|
|
|
; Push "infile"
|
|
|
|
|
; Call unix2dos
|
|
|
|
|
;
|
|
|
|
|
; Note: this function destroys $0 $1 $2
|
|
|
|
|
Function unix2dos
|
|
|
|
|
ClearErrors
|
|
|
|
|
|
|
|
|
|
Pop $2
|
|
|
|
|
Rename $2 $2.U2D
|
|
|
|
|
FileOpen $1 $2 w
|
|
|
|
|
|
|
|
|
|
FileOpen $0 $2.U2D r
|
|
|
|
|
|
|
|
|
|
Push $2 ; save name for deleting
|
|
|
|
|
|
|
|
|
|
IfErrors unix2dos_done
|
|
|
|
|
|
|
|
|
|
; $0 = file input (opened for reading)
|
|
|
|
|
; $1 = file output (opened for writing)
|
|
|
|
|
|
|
|
|
|
unix2dos_loop:
|
|
|
|
|
; read a byte (stored in $2)
|
|
|
|
|
FileReadByte $0 $2
|
|
|
|
|
IfErrors unix2dos_done ; EOL
|
|
|
|
|
; skip CR
|
|
|
|
|
StrCmp $2 13 unix2dos_loop
|
|
|
|
|
; if LF write an extra CR
|
|
|
|
|
StrCmp $2 10 unix2dos_cr unix2dos_write
|
|
|
|
|
|
|
|
|
|
unix2dos_cr:
|
|
|
|
|
FileWriteByte $1 13
|
|
|
|
|
|
|
|
|
|
unix2dos_write:
|
|
|
|
|
; write byte
|
|
|
|
|
FileWriteByte $1 $2
|
|
|
|
|
; read next byte
|
|
|
|
|
Goto unix2dos_loop
|
|
|
|
|
|
|
|
|
|
unix2dos_done:
|
|
|
|
|
; close files
|
|
|
|
|
FileClose $0
|
|
|
|
|
FileClose $1
|
|
|
|
|
|
|
|
|
|
; delete original
|
|
|
|
|
Pop $0
|
|
|
|
|
Delete $0.U2D
|
|
|
|
|
FunctionEnd
|
2011-07-01 13:18:51 +00:00
|
|
|
|
!endif
|