Revamp Debian and NSIS packaging
The existing scripts for Debian and NSIS packaging were too complex and dealt unnecessarily with lower level details that should be already handled by CMake and CPack. - Packaging-related scripts have been moved to the new cpack/ directory. There, CPack variables common to all generators are defined in cpack/common.cmake, and then generator-specific variables are defined independently (e.g.: cpack/debian.cmake and cpack/nsis.cmake). - Packaging is now optionally done at a second stage, by running `cpack -G <generator>` on the build directory. This removes the requirement to branch based on the system name, and instead all CPack variables are assigned unconditionally. - Since now only one version of the game is packaged, there is no need to maintain the complex scripts in packaging/ and packaging/windows that used to deal with all variants (e.g.: "wip-cars-and-tracks", "hq-cars-and-tracks", etc.). - The use of CPACK_NSIS_EXTRA_INSTALL_COMMANDS, CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS and CPACK_NSIS_CREATE_ICONS_EXTRA should not be required, let alone modifying the HKLM registry manually, since CPack already provides everything required to set up the installer, the uninstaller and shortcuts. - $INSTDIR is not required, since NSIS would already prepend the target installation directory. - PROJECT_VERSION_METADATA is not a standard CMake variable. CMAKE_PROJECT_VERSION_TWEAK is instead meant for this purpose. [1] - OPTION_PACKAGING and OPTION_ALL_IN_ONE_PACKAGING were removed since packaging will always be available, yet optional. Packagers must then run CPack on a second stage, as described above. - Outdated comments were removed to avoid confusion. TODO: - Add shortcut to track editor on NSIS. - dmg packaging was not revamped because of lacking compatible hardware, but still it has been moved to cpack/dmg.cmake. - Windows portable packaging (OPTION_PORTABLE_PACKAGING) has been left out since it required 7z and relied on several hacks to work. Furthermore, portable versions of the game were already not released on the latest release, either. [2] [1]: https://cmake.org/cmake/help/latest/variable/CMAKE_PROJECT_VERSION_TWEAK.html [2]: https://sourceforge.net/projects/speed-dreams/files/2.3.0/
This commit is contained in:
parent
8ae4321be6
commit
2e250d0b91
18 changed files with 96 additions and 2985 deletions
|
@ -79,16 +79,16 @@ endif()
|
|||
|
||||
set(VERSION_LONG ${VERSION})
|
||||
|
||||
# PROJECT_VERSION_METADATA is used by NSIS packagers
|
||||
# CMAKE_PROJECT_VERSION_TWEAK is used by NSIS packagers
|
||||
# its what comes after the '-' sign (if anything)
|
||||
# ie: in tag '2.2.2-rc1' PROJECT_VERSION_METADATA should be '-rc1'
|
||||
# ie: in tag '2.2.2-rc1' CMAKE_PROJECT_VERSION_TWEAK should be '-rc1'
|
||||
STRING(FIND "${VERSION}" "-" _METADATA_INDEX)
|
||||
IF(NOT ${_METADATA_INDEX} EQUAL -1)
|
||||
STRING(SUBSTRING ${VERSION} ${_METADATA_INDEX} -1 PROJECT_VERSION_METADATA)
|
||||
ELSE(NOT ${_METADATA_INDEX} EQUAL -1)
|
||||
SET(PROJECT_VERSION_METADATA )
|
||||
ENDIF(NOT ${_METADATA_INDEX} EQUAL -1)
|
||||
#MESSAGE(STATUS "PROJECT_VERSION_METADATA ${PROJECT_VERSION_METADATA}")
|
||||
STRING(SUBSTRING ${VERSION} ${_METADATA_INDEX} -1 CMAKE_PROJECT_VERSION_TWEAK)
|
||||
ELSE()
|
||||
SET(CMAKE_PROJECT_VERSION_TWEAK)
|
||||
ENDIF()
|
||||
#MESSAGE(STATUS "CMAKE_PROJECT_VERSION_TWEAK ${CMAKE_PROJECT_VERSION_TWEAK}")
|
||||
|
||||
# Generate config.h
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.h.in.cmake
|
||||
|
@ -144,68 +144,5 @@ IF(OPTION_CHECK_CONTENTS)
|
|||
INCLUDE(cmake/prerelease.cmake)
|
||||
ENDIF(OPTION_CHECK_CONTENTS)
|
||||
|
||||
IF(OPTION_PACKAGING OR OPTION_ALL_IN_ONE_PACKAGING)
|
||||
INCLUDE(cmake/packagemaker.cmake)
|
||||
ENDIF(OPTION_PACKAGING OR OPTION_ALL_IN_ONE_PACKAGING)
|
||||
IF(OPTION_PACKAGING)
|
||||
IF(MSVC)
|
||||
INCLUDE(cmake/packagemaker-nsis.cmake)
|
||||
ENDIF(MSVC)
|
||||
IF(APPLE)
|
||||
INCLUDE(cmake/packagemaker-dmg.cmake)
|
||||
ENDIF(APPLE)
|
||||
ENDIF(OPTION_PACKAGING)
|
||||
|
||||
IF(OPTION_ALL_IN_ONE_PACKAGING)
|
||||
IF(MSVC AND ${CMAKE_VERSION} VERSION_LESS "3.17")
|
||||
MESSAGE(SEND_ERROR "OPTION_ALL_IN_ONE_PACKAGING requires CMake 3.17 or greater on Windows")
|
||||
ENDIF(MSVC AND ${CMAKE_VERSION} VERSION_LESS "3.17")
|
||||
INCLUDE(CPack)
|
||||
ENDIF(OPTION_ALL_IN_ONE_PACKAGING)
|
||||
|
||||
IF(OPTION_PORTABLE_PACKAGING)
|
||||
IF(NOT ${CMAKE_VERSION} VERSION_LESS "3.0")
|
||||
#[[
|
||||
This section adds a batch file for running speed-dreams-2.exe with a local settings directory.
|
||||
This is similar to how 'Portable Apps' work.
|
||||
It also adds projects to build a self-extracting 7-zip file (if 7-zip is installed)
|
||||
]]
|
||||
ENDIF(NOT ${CMAKE_VERSION} VERSION_LESS "3.0")
|
||||
IF(WIN32)
|
||||
|
||||
find_program(7ZIP_EXE 7z.exe PATH_SUFFIXES 7-Zip)
|
||||
find_file(7ZIP_WIN 7z.sfx PATH_SUFFIXES 7-Zip)
|
||||
|
||||
set(SD_EXE_NAME "speed-dreams-2.exe")
|
||||
SET(PORTABLE_PACKAGE_FILE_NAME "speed-dreams-2-${VERSION_LONG}-portable-setup" CACHE STRING "Name for portable package file")
|
||||
SET(PORTABLE_BATCH_FILE_NAME "speed-dreams-2-${VERSION_LONG}-portable.bat" CACHE STRING "Name for portable batch file")
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/packaging/portable/sd-portable.bat.in"
|
||||
"${CMAKE_BINARY_DIR}/${PORTABLE_BATCH_FILE_NAME}" @ONLY)
|
||||
|
||||
INSTALL(PROGRAMS "${CMAKE_BINARY_DIR}/${PORTABLE_BATCH_FILE_NAME}" DESTINATION .)
|
||||
|
||||
# NOTE this WILL pick up changes and additions!
|
||||
# just re-build INSTALL no need to rerun CMake configure!
|
||||
INSTALL(DIRECTORY packaging/portable/settings DESTINATION . )
|
||||
|
||||
if(7ZIP_EXE AND 7ZIP_WIN)
|
||||
|
||||
ADD_CUSTOM_TARGET(PORTABLE_INSTALL)
|
||||
ADD_CUSTOM_TARGET(PORTABLE_PACKAGE DEPENDS PORTABLE_INSTALL)
|
||||
|
||||
ADD_CUSTOM_COMMAND(TARGET PORTABLE_INSTALL
|
||||
COMMAND "${CMAKE_COMMAND}" --build . --target INSTALL --config $<CONFIG>
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Building INSTALL...")
|
||||
|
||||
ADD_CUSTOM_COMMAND(TARGET PORTABLE_PACKAGE
|
||||
COMMAND ${7ZIP_EXE} a -sfx7z.sfx ${CMAKE_BINARY_DIR}/${PORTABLE_PACKAGE_FILE_NAME} *
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}
|
||||
COMMENT "Building portable package...")
|
||||
|
||||
else(7ZIP_EXE AND 7ZIP_WIN)
|
||||
message(STATUS "Could not find 7-ZIP. Portable build disabled.")
|
||||
endif(7ZIP_EXE AND 7ZIP_WIN)
|
||||
ENDIF(WIN32)
|
||||
ENDIF(OPTION_PORTABLE_PACKAGING)
|
||||
INCLUDE(cpack/common.cmake)
|
||||
INCLUDE(CPack)
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
# CMake does not allow for braces in $ENV{}, so a temporary variable must be used.
|
||||
set(PROGRAMFILES_X86 "ProgramFiles(x86)")
|
||||
set(NSIS_INET_PLUGIN )
|
||||
|
||||
find_program(NSIS_MAKE_EXE
|
||||
NAMES makensis
|
||||
PATHS $ENV{PROGRAMFILES}/NSIS $ENV{${PROGRAMFILES_X86}}/NSIS
|
||||
)
|
||||
|
||||
|
||||
if(NSIS_MAKE_EXE)
|
||||
get_filename_component(NSIS_LOCATION ${NSIS_MAKE_EXE} DIRECTORY)
|
||||
Message(STATUS "NSIS_LOCATION = ${NSIS_LOCATION}")
|
||||
|
||||
find_file(NSIS_INET_PLUGIN INetC.dll PATHS ${NSIS_LOCATION} PATH_SUFFIXES Plugins)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(NSIS DEFAULT_MSG NSIS_MAKE_EXE)
|
|
@ -86,12 +86,6 @@ MACRO(ADD_SD_COMPILE_OPTIONS)
|
|||
|
||||
SET(OPTION_PARAM_OPTIMIZER false CACHE BOOL "Build with Parameter Optimizer for Robot development")
|
||||
|
||||
SET(OPTION_PACKAGING true CACHE BOOL "Enable Packaging for distribution")
|
||||
|
||||
SET(OPTION_ALL_IN_ONE_PACKAGING false CACHE BOOL "Enable CPack's monolithic PACKAGE")
|
||||
|
||||
SET(OPTION_PORTABLE_PACKAGING false CACHE BOOL "Enable creation of Portable App as a self-extracting zip")
|
||||
|
||||
SET(OPTION_TRACKEDITOR true CACHE BOOL "Build the TrackEditor (Requires Java)")
|
||||
|
||||
IF(APPLE)
|
||||
|
|
|
@ -1,123 +0,0 @@
|
|||
#==============================================================================
|
||||
#
|
||||
# file : .cmake
|
||||
# copyright : (C) 2019 Joe Thompson
|
||||
# email : beaglejoe@users.sourceforge.net
|
||||
# web : www.speed-dreams.org
|
||||
#
|
||||
#==============================================================================
|
||||
#
|
||||
# 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, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#==============================================================================
|
||||
FIND_PACKAGE(NSIS)
|
||||
|
||||
Message(STATUS "NSIS_FOUND = ${NSIS_FOUND}")
|
||||
Message(STATUS "NSIS_MAKE_EXE = ${NSIS_MAKE_EXE}")
|
||||
Message(STATUS "NSIS_INET_PLUGIN = ${NSIS_INET_PLUGIN}")
|
||||
|
||||
|
||||
if(NSIS_FOUND AND NSIS_MAKE_EXE AND NSIS_INET_PLUGIN)
|
||||
FILE(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}" NSIS_INSTALL_DIR)
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/packaging/windows/readme_for_user.txt"
|
||||
"${CMAKE_BINARY_DIR}/packaging/readme_for_user.txt" COPYONLY)
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/packaging/windows/speed-dreams.ini"
|
||||
"${CMAKE_BINARY_DIR}/packaging/speed-dreams.ini" COPYONLY)
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/packaging/windows/speed-dreams.nsh.in"
|
||||
"${CMAKE_BINARY_DIR}/packaging/speed-dreams.nsh" @ONLY)
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/packaging/windows/speed-dreams-base.nsi"
|
||||
"${CMAKE_BINARY_DIR}/packaging/speed-dreams-base.nsi" @ONLY)
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/packaging/windows/speed-dreams-hq-cars-and-tracks.nsi"
|
||||
"${CMAKE_BINARY_DIR}/packaging/speed-dreams-hq-cars-and-tracks.nsi" @ONLY)
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/packaging/windows/speed-dreams-more-hq-cars-and-tracks.nsi"
|
||||
"${CMAKE_BINARY_DIR}/packaging/speed-dreams-more-hq-cars-and-tracks.nsi" @ONLY)
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/packaging/windows/speed-dreams-wip-cars-and-tracks.nsi"
|
||||
"${CMAKE_BINARY_DIR}/packaging/speed-dreams-wip-cars-and-tracks.nsi" @ONLY)
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/packaging/windows/speed-dreams-unmaintained.nsi"
|
||||
"${CMAKE_BINARY_DIR}/packaging/speed-dreams-unmaintained.nsi" @ONLY)
|
||||
|
||||
#ADD_CUSTOM_TARGET(PACKAGE_BASE DEPENDS INSTALL)
|
||||
# can't depend on built-in target INSTALL, so we ADD_CUSTOM_COMMAND
|
||||
# below to make sure INSTALL is done
|
||||
ADD_CUSTOM_TARGET(PACKING_INSTALL)
|
||||
|
||||
ADD_CUSTOM_TARGET(PACKAGE_ALL DEPENDS PACKAGE_BASE
|
||||
PACKAGE_HQ
|
||||
PACKAGE_MORE_HQ
|
||||
PACKAGE_WIP
|
||||
PACKAGE_UNMAINTAINED)
|
||||
|
||||
ADD_CUSTOM_TARGET(PACKAGE_BASE DEPENDS PACKING_INSTALL PACKAGE_MKDIR)
|
||||
ADD_CUSTOM_TARGET(PACKAGE_HQ DEPENDS PACKING_INSTALL PACKAGE_MKDIR)
|
||||
ADD_CUSTOM_TARGET(PACKAGE_MORE_HQ DEPENDS PACKING_INSTALL PACKAGE_MKDIR)
|
||||
ADD_CUSTOM_TARGET(PACKAGE_WIP DEPENDS PACKING_INSTALL PACKAGE_MKDIR)
|
||||
ADD_CUSTOM_TARGET(PACKAGE_UNMAINTAINED DEPENDS PACKING_INSTALL PACKAGE_MKDIR)
|
||||
ADD_CUSTOM_TARGET(PACKAGE_MKDIR)
|
||||
|
||||
ADD_CUSTOM_COMMAND(TARGET PACKING_INSTALL
|
||||
COMMAND "${CMAKE_COMMAND}" --build . --target INSTALL --config $<CONFIG>
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Building INSTALL...")
|
||||
|
||||
ADD_CUSTOM_COMMAND(TARGET PACKAGE_BASE
|
||||
COMMAND ${NSIS_MAKE_EXE} packaging/speed-dreams-base.nsi
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Building base package...")
|
||||
|
||||
ADD_CUSTOM_COMMAND(TARGET PACKAGE_HQ
|
||||
COMMAND ${NSIS_MAKE_EXE} packaging/speed-dreams-hq-cars-and-tracks.nsi
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Building HQ package...")
|
||||
|
||||
ADD_CUSTOM_COMMAND(TARGET PACKAGE_MORE_HQ
|
||||
COMMAND ${NSIS_MAKE_EXE} packaging/speed-dreams-more-hq-cars-and-tracks.nsi
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Building More HQ package...")
|
||||
|
||||
ADD_CUSTOM_COMMAND(TARGET PACKAGE_WIP
|
||||
COMMAND ${NSIS_MAKE_EXE} packaging/speed-dreams-wip-cars-and-tracks.nsi
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Building WIP package...")
|
||||
|
||||
ADD_CUSTOM_COMMAND(TARGET PACKAGE_UNMAINTAINED
|
||||
COMMAND ${NSIS_MAKE_EXE} packaging/speed-dreams-unmaintained.nsi
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Building unmaintained package...")
|
||||
|
||||
# Make sure that SD_PACKAGEDIR is not empty or PACKAGE_MKDIR will fail.
|
||||
# Treat empty string as current directory
|
||||
if(SD_PACKAGEDIR STREQUAL "")
|
||||
set(SD_PACKAGEDIR "." CACHE PATH "Location for the created installers" FORCE)
|
||||
endif(SD_PACKAGEDIR STREQUAL "")
|
||||
|
||||
ADD_CUSTOM_COMMAND(TARGET PACKAGE_MKDIR
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory ${SD_PACKAGEDIR}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Create ${SD_PACKAGEDIR} directory for Packages dir")
|
||||
|
||||
else(NSIS_FOUND AND NSIS_MAKE_EXE AND NSIS_INET_PLUGIN)
|
||||
if(NOT NSIS_FOUND)
|
||||
Message(WARNING "NSIS NOT FOUND Packaging targets NOT added.")
|
||||
elseif(NOT NSIS_INET_PLUGIN)
|
||||
Message(WARNING "INetC.dll NOT FOUND Packaging targets NOT added.")
|
||||
endif(NOT NSIS_FOUND)
|
||||
endif()
|
|
@ -1,263 +0,0 @@
|
|||
##########################################################################################
|
||||
# Settings that are common to all target systems.
|
||||
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
SET(CPACK_SYSTEM_NAME "win32")
|
||||
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
SET(CPACK_SYSTEM_NAME "macos")
|
||||
ELSE()
|
||||
SET(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
|
||||
ENDIF()
|
||||
|
||||
SET(INTERNAL_NAME "speed-dreams")
|
||||
|
||||
SET(CPACK_PACKAGE_NAME "Speed Dreams")
|
||||
SET(CPACK_PACKAGE_VENDOR "The Speed Dreams team")
|
||||
SET(CPACK_PACKAGE_CONTACT "https://sourceforge.net/projects/speed-dreams/")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Speed Dreams (an Open Motorsport Sim) is a racing simulation that allows you to drive in races against opponents simulated by the computer ; it is GPL 2+ and has been forked from TORCS in late 2008")
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${SOURCE_DIR}/COPYING.txt")
|
||||
SET(CPACK_RESOURCE_FILE_README "${SOURCE_DIR}/README.txt")
|
||||
|
||||
SET(EXECUTABLE_NAME "${INTERNAL_NAME}-2")
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "${EXECUTABLE_NAME};Start ${CPACK_PACKAGE_NAME}")
|
||||
|
||||
# Version settings.
|
||||
# * the short way.
|
||||
#SET(CPACK_PACKAGE_VERSION "${VERSION_LONG}")
|
||||
|
||||
# * another way.
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
|
||||
SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}${PROJECT_VERSION_METADATA}")
|
||||
IF(NOT SVN_FIND_REV_FAILED)
|
||||
SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-r${SVN_REV}")
|
||||
ENDIF(NOT SVN_FIND_REV_FAILED)
|
||||
|
||||
# Binary package settings.
|
||||
SET(PACKAGE_FILE_PREFIX "${INTERNAL_NAME}")
|
||||
#SET(CPACK_OUTPUT_CONFIG_FILE "/home/andy/vtk/CMake-bin/CPackConfig.cmake")
|
||||
#SET(CPACK_PACKAGE_DESCRIPTION_FILE "/home/andy/vtk/CMake/Copyright.txt")
|
||||
|
||||
#SET(CPACK_IGNORE_FILES "/\\.svn/;\\.swp$;\\.#;/#;${CPACK_IGNORE_FILES}")
|
||||
|
||||
# Source package settings.
|
||||
#SET(CPACK_SOURCE_OUTPUT_CONFIG_FILE "/home/andy/vtk/CMake-bin/CPackSourceConfig.cmake")
|
||||
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${PACKAGE_FILE_PREFIX}-${CPACK_PACKAGE_VERSION}-src")
|
||||
|
||||
#SET(CPACK_RESOURCE_FILE_LICENSE "/home/andy/vtk/CMake/Copyright.txt")
|
||||
#SET(CPACK_RESOURCE_FILE_README "/home/andy/vtk/CMake/Templates/CPack.GenericDescription.txt")
|
||||
#SET(CPACK_RESOURCE_FILE_WELCOME "/home/andy/vtk/CMake/Templates/CPack.GenericWelcome.txt")
|
||||
|
||||
SET(CPACK_SOURCE_IGNORE_FILES
|
||||
"/installer/" "/doc/design/" "/doc/develdoc" "/doc/website/" "/_CPack_Packages/"
|
||||
"/CMakeCache\\\\.txt$" "/install_manifest\\\\.txt$" "/xmlversion_loc\\\\.txt$"
|
||||
"/config\\\\.h$" "/version\\\\.h$" "/doxygen_config$"
|
||||
"/\\\\.svn/" "/\\\\.dir/" "/CMakeFiles/"
|
||||
"cmake_install\\\\.cmake$" "CPackConfig\\\\.cmake$" "CPackSourceConfig\\\\.cmake$"
|
||||
"\\\\.bak$" "\\\\.flc$" "#.*#$" "~$" "\\\\.~.*"
|
||||
"\\\\.xcf$" "\\\\.xcf\\\\.bz2$" "\\\\.psd$"
|
||||
"\\\\.exe$" "/sd2-.*$" "/speed-dreams-2$" "/xmlversion$"
|
||||
"\\\\.zip$" "\\\\.tar\\\\.bz2$" "\\\\.tar\\\\.gz$" "\\\\.tar\\\\.Z$" "\\\\.tar\\\\.7z$")
|
||||
|
||||
##########################################################################################
|
||||
# Put Linux install information here
|
||||
IF(UNIX AND NOT APPLE)
|
||||
|
||||
SET(PACKAGERS_BINARY "DEB" CACHE STRING "CPack binary package generators to use (separated with ';', among DEB, RPM, STGZ, TGZ, TBZ2, TZ, ZIP)")
|
||||
MARK_AS_ADVANCED(PACKAGERS_BINARY)
|
||||
SET(PACKAGERS_SOURCE "TBZ2" CACHE STRING "CPack source package generators to use (separated with ';', among TGZ, TBZ2, TZ, ZIP)")
|
||||
MARK_AS_ADVANCED(PACKAGERS_SOURCE)
|
||||
|
||||
SET(CPACK_PACKAGE_NAME ${PACKAGE_FILE_PREFIX} CACHE STRING "" FORCE)
|
||||
|
||||
# On debian, auto-detect dependencies
|
||||
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
# Or manually set the dependencies
|
||||
# from Linux Mint 20 (Ubuntu 20.04)
|
||||
#SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.29), libcurl4 (>= 7.16.2), libenet7, libexpat1 (>= 2.0.1), libgcc-s1 (>= 3.0), libglu1-mesa | libglu1, libglx0, libjpeg8 (>= 8c), libopenal1 (>= 1.14), libopengl0, libopenscenegraph160, libopenthreads21, libplib1, libpng16-16 (>= 1.6.2-1), libsdl2-2.0-0 (>= 2.0.10), libsdl2-mixer-2.0-0 (>= 2.0.2), libstdc++6 (>= 9), zlib1g (>= 1:1.1.4)")
|
||||
|
||||
# This causes package name to have undersocres connecting the name, version, and arch
|
||||
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
|
||||
|
||||
# Put other Debian-based distros settings here.
|
||||
|
||||
# Source package specific settings.
|
||||
LIST(APPEND CPACK_SOURCE_IGNORE_FILES "Makefile$" "\\\\.so$")
|
||||
|
||||
ENDIF(UNIX AND NOT APPLE)
|
||||
|
||||
##########################################################################################
|
||||
# Put Windows install information here.
|
||||
# (NSIS must be installed on your computer for this to work)
|
||||
IF(WIN32)
|
||||
|
||||
# General note: There is a bug in NSI that does not handle full unix paths properly.
|
||||
# Make sure there is at least one set of four (4) backlasshes.
|
||||
|
||||
SET(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL True)
|
||||
|
||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${INTERNAL_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}${PROJECT_VERSION_METADATA}")
|
||||
|
||||
SET(EXECUTABLE_PATHNAME "$INSTDIR\\\\bin\\\\${EXECUTABLE_NAME}.exe")
|
||||
|
||||
SET(PACKAGERS_BINARY "NSIS" CACHE STRING "CPack binary package generators to use (separated with ';', among NSIS, CygwinBinary, STGZ, TGZ, TBZ2, TZ, ZIP)")
|
||||
MARK_AS_ADVANCED(PACKAGERS_BINARY)
|
||||
SET(PACKAGERS_SOURCE "ZIP" CACHE STRING "CPack source package generators to use (separated with ';', among TGZ, TBZ2, TZ, ZIP)")
|
||||
MARK_AS_ADVANCED(PACKAGERS_SOURCE)
|
||||
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${PACKAGE_FILE_PREFIX}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}-setup")
|
||||
SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}${PROJECT_VERSION_METADATA}")
|
||||
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}")
|
||||
#SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
|
||||
|
||||
# Icon for the generated installer/uninstaller files.
|
||||
SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}\\\\data\\\\data\\\\icons\\\\icon.ico")
|
||||
SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}\\\\data\\\\data\\\\icons\\\\icon.ico")
|
||||
SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}\\\\data\\\\data\\\\img\\\\header.bmp")
|
||||
|
||||
IF(NOT ${CMAKE_VERSION} VERSION_LESS "3.5")
|
||||
SET(CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP "${CMAKE_SOURCE_DIR}\\\\data\\\\data\\\\img\\\\header-vert.bmp")
|
||||
SET(CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP "${CMAKE_SOURCE_DIR}\\\\data\\\\data\\\\img\\\\header-vert.bmp")
|
||||
ENDIF(NOT ${CMAKE_VERSION} VERSION_LESS "3.5")
|
||||
|
||||
IF(NOT ${CMAKE_VERSION} VERSION_LESS "3.17")
|
||||
SET(CPACK_NSIS_MUI_HEADERIMAGE "${CMAKE_SOURCE_DIR}\\\\data\\\\data\\\\img\\\\header.bmp")
|
||||
ENDIF(NOT ${CMAKE_VERSION} VERSION_LESS "3.17")
|
||||
|
||||
|
||||
# Extra shortcuts to add in the start menu (a list of pairs : URL, Menu label).
|
||||
SET(CPACK_NSIS_MENU_LINKS
|
||||
"${CPACK_PACKAGE_CONTACT}" "Project Homepage"
|
||||
"https://sourceforge.net/p/speed-dreams/discussion/" "Community"
|
||||
"https://sourceforge.net/p/speed-dreams/tickets/" "Bug tracker"
|
||||
"/data/COPYING.txt" "License"
|
||||
"/data/README.txt" "Read me"
|
||||
"/doc/how_to_drive.html" "User manual")
|
||||
|
||||
# Icon in the add/remove control panel. Must be an .exe file
|
||||
Set(CPACK_NSIS_INSTALLED_ICON_NAME "${EXECUTABLE_PATHNAME}")
|
||||
|
||||
# Executable to (optionally) run after install
|
||||
SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "${EXECUTABLE_NAME}")
|
||||
|
||||
SET(CPACK_NSIS_URL_INFO_ABOUT "${CPACK_PACKAGE_CONTACT}")
|
||||
SET(CPACK_NSIS_HELP_LINK "${CPACK_PACKAGE_CONTACT}")
|
||||
|
||||
# Override Start menu entry
|
||||
SET(CPACK_PACKAGE_EXECUTABLES
|
||||
"${EXECUTABLE_NAME}" "${CPACK_NSIS_DISPLAY_NAME}"
|
||||
CACHE STRING "" FORCE)
|
||||
|
||||
# Add a page in the install wizard for options :
|
||||
# - adding the installation path in the PATH,
|
||||
# - adding a shortcut to start the installed app on the desktop.
|
||||
#SET(CPACK_NSIS_MODIFY_PATH "ON")
|
||||
|
||||
# Another way to add a shortcut to start the installed app on the desktop :
|
||||
# This ONLY works if SET(CPACK_NSIS_MODIFY_PATH "ON") which also enables the whole modify PATH page
|
||||
#SET(CPACK_CREATE_DESKTOP_LINKS "${EXECUTABLE_NAME}")
|
||||
|
||||
# But this works.
|
||||
SET(SHORTCUT_TARGET "$DESKTOP\\\\${CPACK_NSIS_DISPLAY_NAME}.lnk")
|
||||
|
||||
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
|
||||
CreateShortCut \\\"${SHORTCUT_TARGET}\\\" \\\"${EXECUTABLE_PATHNAME}\\\"
|
||||
WriteRegStr HKLM 'Software\\\\${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_INSTALL_REGISTRY_KEY}' 'VersionExtra' '${PROJECT_VERSION_METADATA}'
|
||||
WriteRegDWORD HKLM 'Software\\\\${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_INSTALL_REGISTRY_KEY}' 'VersionMajor' '${CPACK_PACKAGE_VERSION_MAJOR}'
|
||||
WriteRegDWORD HKLM 'Software\\\\${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_INSTALL_REGISTRY_KEY}' 'VersionMinor' '${CPACK_PACKAGE_VERSION_MINOR}'
|
||||
WriteRegDWORD HKLM 'Software\\\\${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_INSTALL_REGISTRY_KEY}' 'VersionPatch' '${CPACK_PACKAGE_VERSION_PATCH}'
|
||||
")
|
||||
|
||||
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
|
||||
Delete \\\"${SHORTCUT_TARGET}\\\"
|
||||
")
|
||||
IF(OPTION_TRACKEDITOR)
|
||||
set(CPACK_NSIS_CREATE_ICONS_EXTRA
|
||||
"CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\SD2 TrackEditor.lnk' '$INSTDIR\\\\bin\\\\sd2-trackeditor.jar' '' '' 0 SW_SHOWNORMAL '' 'Track Editor' " )
|
||||
|
||||
set(CPACK_NSIS_DELETE_ICONS_EXTRA
|
||||
"Delete '$SMPROGRAMS\\\\$START_MENU\\\\SD2 TrackEditor.lnk'" )
|
||||
ENDIF(OPTION_TRACKEDITOR)
|
||||
|
||||
|
||||
# Source package specific settings.
|
||||
LIST(APPEND CPACK_SOURCE_IGNORE_FILES
|
||||
"/VTune/"
|
||||
"/Release/" "/Debug/" "/RelWithDebInfo/" "/MinSizeRel/"
|
||||
"/release/" "/debug/" "/relwithdebinfo/" "/minsizerel/"
|
||||
"\\\\.sln$" "\\\\.suo$" "\\\\.ncb$" "\\\\.vcproj*$" "\\\\.dll$")
|
||||
|
||||
# Add the PACKAGE_SRC project in the MSVC solution
|
||||
# (CMake 2.6 and 2.8 fail to do this itself).
|
||||
#ADD_CUSTOM_TARGET(PACKAGE_SRC)
|
||||
#ADD_CUSTOM_COMMAND(TARGET PACKAGE_SRC
|
||||
# COMMAND ${CMAKE_CPACK_COMMAND} -C $(OutDir) --config ./CPackSourceConfig.cmake)
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
||||
##########################################################################################
|
||||
# Put Mac OS X install information here
|
||||
IF(APPLE)
|
||||
|
||||
SET(PACKAGERS_BINARY "DragNDrop" CACHE STRING "CPack binary package generators to use (separated with ';', among Bundle, DragNDrop, PackageMaker, OSXX11, STGZ, TGZ, TBZ2, TZ, ZIP)")
|
||||
MARK_AS_ADVANCED(PACKAGERS_BINARY)
|
||||
SET(PACKAGERS_SOURCE "TBZ2" CACHE STRING "CPack source package generators to use (separated with ';', among TGZ, TBZ2, TZ, ZIP)")
|
||||
MARK_AS_ADVANCED(PACKAGERS_SOURCE)
|
||||
|
||||
# Source package specific settings.
|
||||
LIST(APPEND CPACK_SOURCE_IGNORE_FILES "Makefile$")
|
||||
SET(CPACK_INSTALLED_DIRECTORIES "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX};${CMAKE_INSTALL_PREFIX}")
|
||||
SET(CPACK_INSTALL_CMAKE_PROJECTS "")
|
||||
SET(CPACK_DMG_DS_STORE "${CMAKE_SOURCE_DIR}/packaging/OSX/DS_Store-full")
|
||||
SET(CPACK_DMG_VOLUME_NAME "Speed Dreams ${VERSION}")
|
||||
|
||||
# Configure the base package scripts...
|
||||
# TODO use ${CPACK_PACKAGE_NAME} ${VERSION}" ??
|
||||
SET(DMG_VOL_NAME "Speed Dreams base ${VERSION}")
|
||||
SET(DMG_FINDER_SCRIPT "findersettingsbase.scpt")
|
||||
|
||||
SET(READ_WRITE_DMG_NAME "${INTERNAL_NAME}-base-${VERSION}-r${SVN_REV}-${CPACK_SYSTEM_NAME}-rw.dmg")
|
||||
SET(READ_ONLY_DMG_NAME "${INTERNAL_NAME}-base-${VERSION}-r${SVN_REV}-${CPACK_SYSTEM_NAME}.dmg")
|
||||
|
||||
string(REPLACE ".app" "-base.app" SD_BASE_BUNDLE_NAME "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# TODO make ${SD_BUNDLE_NAME} a CACHE variable and use it everywhere instead of ${CMAKE_INSTALL_PREFIX}??
|
||||
SET(SD_BUNDLE_NAME "${SD_BASE_BUNDLE_NAME}")
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/packaging/OSX/packagedmg.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/packagebasedmg.cmake" @ONLY)
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/packaging/OSX/findersettings.scpt.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${DMG_FINDER_SCRIPT}" @ONLY)
|
||||
|
||||
|
||||
# Now configure the full package scripts...
|
||||
# TODO use ${CPACK_PACKAGE_NAME} ${VERSION}" ??
|
||||
SET(DMG_VOL_NAME "Speed Dreams ${VERSION}")
|
||||
SET(DMG_FINDER_SCRIPT "findersettingsfull.scpt")
|
||||
|
||||
SET(READ_WRITE_DMG_NAME "${INTERNAL_NAME}-${VERSION}-r${SVN_REV}-${CPACK_SYSTEM_NAME}-rw.dmg")
|
||||
SET(READ_ONLY_DMG_NAME "${INTERNAL_NAME}-${VERSION}-r${SVN_REV}-${CPACK_SYSTEM_NAME}.dmg")
|
||||
|
||||
# TODO make ${SD_BUNDLE_NAME} a CACHE variable and use it everywhere instead of ${CMAKE_INSTALL_PREFIX}??
|
||||
SET(SD_BUNDLE_NAME "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/packaging/OSX/packagedmg.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/packagefulldmg.cmake" @ONLY)
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/packaging/OSX/findersettings.scpt.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${DMG_FINDER_SCRIPT}" @ONLY)
|
||||
|
||||
# Create a script to create the base bundle from the full bundle
|
||||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/packaging/OSX/createbaseapp.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/createbaseapp.cmake" @ONLY)
|
||||
|
||||
ENDIF(APPLE)
|
||||
|
||||
##########################################################################################
|
||||
# Final settings.
|
||||
SET(CPACK_GENERATOR ${PACKAGERS_BINARY})
|
||||
SET(CPACK_SOURCE_GENERATOR ${PACKAGERS_SOURCE})
|
||||
|
||||
#INCLUDE(CPack)
|
36
cpack/common.cmake
Normal file
36
cpack/common.cmake
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Speed Dreams, a free and open source motorsport simulator.
|
||||
# Copyright (C) 2019 Joe Thompson, 2025 Xavier Del Campo Romero
|
||||
#
|
||||
# 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.
|
||||
|
||||
set(CPACK_PACKAGE_NAME "speed-dreams")
|
||||
set(CPACK_PACKAGE_VENDOR "The Speed Dreams Team")
|
||||
set(CPACK_PACKAGE_CONTACT "The Speed Dreams Team <contact@speed-dreams.net>")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
|
||||
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
|
||||
set(CPACK_PACKAGE_VERSION "${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR}.${CMAKE_PROJECT_VERSION_PATCH}${CMAKE_PROJECT_VERSION_TWEAK}")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-src")
|
||||
set(CPACK_PACKAGE_DESCRIPTION
|
||||
"Speed Dreams is a free and open source motorsport simulator. Originally a
|
||||
fork of the TORCS project, it has evolved into a higher level of maturity,
|
||||
featuring realistic physics with tens of high-quality cars and tracks to
|
||||
choose from.
|
||||
|
||||
Speed Dreams features multiple categories from all racing eras (36GP
|
||||
and 67GP, Supercars, Long Day Series 1/2, and many more), 4
|
||||
computer-controlled driver implementations, flexible race configuration
|
||||
(real-time weather conditions, multi-class races, etc.), as well as a
|
||||
master server to compare your best lap times against other players."
|
||||
)
|
||||
|
||||
if(SD_DATADIR_ABS)
|
||||
set(CPACK_PACKAGE_ICON "${SD_DATADIR_ABS}/data/img/header.bmp")
|
||||
endif()
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/debian.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/dmg.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/nsis.cmake)
|
16
cpack/debian.cmake
Normal file
16
cpack/debian.cmake
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Speed Dreams, a free and open source motorsport simulator.
|
||||
# Copyright (C) 2019 Joe Thompson, 2025 Xavier Del Campo Romero
|
||||
#
|
||||
# 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.
|
||||
|
||||
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "speed-dreams-data(>= ${data_version})")
|
||||
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION
|
||||
"Free and open source motorsport simulator
|
||||
${CPACK_PACKAGE_DESCRIPTION}
|
||||
|
||||
This package contains the engine and tools binaries."
|
||||
)
|
|
@ -67,9 +67,4 @@ MESSAGE(STATUS "TODO - fix up the dependencies. Try to not run the install multi
|
|||
COMMAND "${CMAKE_COMMAND}" -P packagefulldmg.cmake
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Building full package...")
|
||||
|
||||
|
||||
|
||||
ELSE((APPLE) AND ("${CMAKE_INSTALL_PREFIX}" MATCHES "\\.app$"))
|
||||
MESSAGE(WARNING "Custom DMG creation requires *.app")
|
||||
ENDIF((APPLE) AND ("${CMAKE_INSTALL_PREFIX}" MATCHES "\\.app$"))
|
35
cpack/nsis.cmake
Normal file
35
cpack/nsis.cmake
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Speed Dreams, a free and open source motorsport simulator.
|
||||
# Copyright (C) 2019 Joe Thompson, 2025 Xavier Del Campo Romero
|
||||
#
|
||||
# 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.
|
||||
|
||||
set(CPACK_NSIS_INSTALLED_ICON_NAME ${PROJECT_NAME})
|
||||
set(CPACK_NSIS_MUI_FINISHPAGE_RUN ${PROJECT_NAME})
|
||||
set(CPACK_NSIS_DISPLAY_NAME "Speed Dreams ${CPACK_PACKAGE_VERSION} (engine and tools)")
|
||||
set(CPACK_NSIS_URL_INFO_ABOUT "${CMAKE_PROJECT_HOMEPAGE_URL}")
|
||||
set(CPACK_NSIS_HELP_LINK "https://forge.a-lec.org/speed-dreams/")
|
||||
set(CPACK_PACKAGE_EXECUTABLES
|
||||
${PROJECT_NAME} "${CPACK_NSIS_DISPLAY_NAME}"
|
||||
)
|
||||
set(CPACK_CREATE_DESKTOP_LINKS ${PROJECT_NAME})
|
||||
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL True)
|
||||
|
||||
# Extra shortcuts to add in the start menu (a list of pairs : URL, Menu label).
|
||||
set(CPACK_NSIS_MENU_LINKS
|
||||
"${CMAKE_PROJECT_HOMEPAGE_URL}" "Project website"
|
||||
"https://forge.a-lec.org/speed-dreams/" "Project source repositories"
|
||||
"/doc/userman/how_to_drive.html" "User manual")
|
||||
|
||||
if(SD_DATADIR_ABS)
|
||||
set(CPACK_NSIS_MUI_ICON "${SD_DATADIR_ABS}/data/icons/icon.ico")
|
||||
set(CPACK_NSIS_MUI_UNIICON "${SD_DATADIR_ABS}/data/icons/icon.ico")
|
||||
set(CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP "${SD_DATADIR_ABS}/data/img/header-vert.bmp")
|
||||
set(CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP "${SD_DATADIR_ABS}/data/img/header-vert.bmp")
|
||||
|
||||
if(NOT ${CMAKE_VERSION} VERSION_LESS "3.17")
|
||||
set(CPACK_NSIS_MUI_HEADERIMAGE "${SD_DATADIR_ABS}/data/img/header.bmp")
|
||||
endif(NOT ${CMAKE_VERSION} VERSION_LESS "3.17")
|
||||
endif()
|
|
@ -1,108 +0,0 @@
|
|||
License
|
||||
-------
|
||||
|
||||
The whole distribution is licensed according to the GPL 2+ and the Free Art Licenses.
|
||||
|
||||
Installation instructions
|
||||
-------------------------
|
||||
|
||||
Among the 5 binary packages (speed-dreams-xxxx-2.3.0-rYYYY-win32-setup.exe),
|
||||
only the "base" one is mandatory : it contains the core components of the game.
|
||||
It is also a kind of "demo" package, as it also ships 1 track (Espie)
|
||||
and 1 car set (the Supercars), plus the relevant AI drivers :
|
||||
that way, you can quickly get the taste of Speed Dreams.
|
||||
|
||||
If you're reading this, sure you already installed it :-)
|
||||
|
||||
Then, you might want to download and install at least one
|
||||
of the "HQ cars and tracks" packages :-)
|
||||
You can install them in any order, either by directly running them,
|
||||
or by re-running the "base" installer and "Add / re-install components".
|
||||
|
||||
Completing the installation
|
||||
---------------------------
|
||||
|
||||
After installing Speed Dreams and starting it, if you get and error box
|
||||
that says something like "Can't find MSVCxxx.dll" or so,
|
||||
try installing the MS Visual C++ redistribuable package :
|
||||
- Be carefull to use the x86 (32bits) version,
|
||||
- You can download it here, at Microsoft's official web site:
|
||||
https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist
|
||||
|
||||
Game Requirements
|
||||
-----------------
|
||||
|
||||
Torcs was told to need at least a 600 MHz CPU (800 MHz recommended), 128 Mb RAM (256 Mb
|
||||
recommended) and an OpenGL 1.3 capable graphics card with 32Mb GRAM (64Mb recommended).
|
||||
|
||||
You need more now, as Speed Dreams is constantly improving visual rendering :
|
||||
- Video card : at least 128Mb ; better with 256 Mb or more
|
||||
- CPU : at least 1 GHz ; better with 1.5 or 2.0 GHz
|
||||
- RAM : from at least 512 Mb (Win XP 32) to 2Gb (Win Vista 32) ; better with 1 to 3 Gb
|
||||
|
||||
For more details, see http://sourceforge.net/p/speed-dreams/wiki/HardSoftRequirements
|
||||
|
||||
Moreover: Make sure that you have installed the latest sound and graphics drivers.
|
||||
|
||||
Running the game
|
||||
----------------
|
||||
|
||||
- Read the "User manual" :
|
||||
* Simon's great online tutorial videos http://www.youtube.com/user/mungewell/feed?feature=context https://www.youtube.com/user/mungewell/videos
|
||||
* WIP online manual http://sourceforge.net/p/speed-dreams/wiki/SD2.0Manual https://sourceforge.net/p/speed-dreams/wiki/SD2.0Manual/
|
||||
* Windows : Start menu / Programs / Speed Dreams x.y.z / User Manual
|
||||
* Others (soon available online at https://sourceforge.net/projects/speed-dreams/) :
|
||||
- source distribution : open speed-dreams-x.y.z-src/doc/userman/how_to_drive.html
|
||||
in a web browser
|
||||
- SubVersion repository : download a GNU tarball of the user manual here :
|
||||
http://speed-dreams.svn.sourceforge.net/p/speed-dreams/code/HEAD/tree/tags/x.y.z/doc/userman
|
||||
then uncompress it and finally open how_to_drive.html in a web browser
|
||||
|
||||
- Start the game :
|
||||
* Windows : Start menu / Programs / Speed Dreams x.y.z / Speed Dreams
|
||||
* Linux : after (compiling it from the source distribution and) installing it,
|
||||
run /usr/local/games/speed-dreams-2 in a shell.
|
||||
|
||||
Note: Under Windows XP at least, first-ever startups sometimes fail to correctly write
|
||||
the necesary stuff into <My documents>\speed-dreams-2.settings and this prevents
|
||||
the game from starting.
|
||||
If this happens, remove the <My documents>\speed-dreams-2.settings folder
|
||||
with the Windows explorer, and restart the game : it should now work.
|
||||
|
||||
- Press F1 in any screen to get help (do it as well during the ride, to learn about the options).
|
||||
|
||||
- Read the FAQ to learn about split screen multiplayer and more.
|
||||
|
||||
Getting Help
|
||||
------------
|
||||
|
||||
See here : https://sourceforge.net/projects/speed-dreams/
|
||||
|
||||
Car Setups
|
||||
----------
|
||||
|
||||
For the player driver, the default car parameters are located in the files
|
||||
"<install>/drivers/human/car*.xml" depending on the car used.
|
||||
|
||||
You can have your own customized version of these files by copying them
|
||||
to <My documents>/speed-dreams-2.settings/drivers/human/car*.xml
|
||||
and changing them with a text editor ; for more information look into the
|
||||
robot tutorial chapter 5 (http://www.berniw.org/tutorials/robot/).
|
||||
|
||||
Creating Tracks
|
||||
---------------
|
||||
|
||||
There is a new track editor in development (by Robert) :
|
||||
have a look soon at Speed Dreams SVN repository (https://sourceforge.net/p/speed-dreams/code/HEAD/tree/trunk/src/tools/trackeditor/).
|
||||
|
||||
Robot programming
|
||||
-----------------
|
||||
|
||||
You'll find a robot programming tutorial at http://www.berniw.org/tutorials/robot/ in the TORCS section.
|
||||
|
||||
Wolf-Dieter is also starting a new "Robot Programming Academy" : soon news !
|
||||
|
||||
Robot racing
|
||||
------------
|
||||
|
||||
Visit www.berniw.org/trb for more information.
|
|
@ -1,509 +0,0 @@
|
|||
;
|
||||
; Windows NSIS configuration file for the base=main=minimal=core installer
|
||||
;
|
||||
; copyright : (C) 2005 Bernhard Wymann, 2009-2012 Xavier Bertaux, Jean-Philippe Meuret
|
||||
;
|
||||
; 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.
|
||||
|
||||
; Common definitions.
|
||||
!include "speed-dreams.nsh"
|
||||
|
||||
; MUI Settings
|
||||
!define MUI_WELCOMEPAGE_TITLE "${GAME_NAME}\n ${GAME_SUBTITLE}"
|
||||
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
||||
;!define MUI_WELCOMEPAGE_TEXT "MUI welcome page text\n2nd line\n3rd line\n... etc ..."
|
||||
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\bin\${GAME_FS_NAME}.exe"
|
||||
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\readme.txt"
|
||||
!define MUI_FINISHPAGE_TITLE_3LINES
|
||||
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
||||
|
||||
; Installer pages
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE "${BUILD_INST_DIR}\data\COPYING.txt"
|
||||
Page custom EnterReinstallPage LeaveReinstallPage
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
; Uninstaller pages
|
||||
;!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
;Reserve Files (these files should be inserted before other files in the data block)
|
||||
ReserveFile "speed-dreams.ini"
|
||||
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
||||
|
||||
; Language files (Warning: Can't be upper in the script)
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
!insertmacro MUI_LANGUAGE "Dutch"
|
||||
!insertmacro MUI_LANGUAGE "Danish"
|
||||
!insertmacro MUI_LANGUAGE "Swedish"
|
||||
!insertmacro MUI_LANGUAGE "Finnish"
|
||||
!insertmacro MUI_LANGUAGE "Norwegian"
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
!insertmacro MUI_LANGUAGE "French"
|
||||
!insertmacro MUI_LANGUAGE "Spanish"
|
||||
!insertmacro MUI_LANGUAGE "Italian"
|
||||
!insertmacro MUI_LANGUAGE "Russian"
|
||||
!insertmacro MUI_LANGUAGE "Polish"
|
||||
!insertmacro MUI_LANGUAGE "Czech"
|
||||
!insertmacro MUI_LANGUAGE "Slovak"
|
||||
!insertmacro MUI_LANGUAGE "Hungarian"
|
||||
!insertmacro MUI_LANGUAGE "Romanian"
|
||||
!insertmacro MUI_LANGUAGE "Greek"
|
||||
!insertmacro MUI_LANGUAGE "Turkish"
|
||||
!insertmacro MUI_LANGUAGE "Arabic"
|
||||
!insertmacro MUI_LANGUAGE "Farsi"
|
||||
!insertmacro MUI_LANGUAGE "Japanese"
|
||||
!insertmacro MUI_LANGUAGE "SimpChinese"
|
||||
|
||||
; Global installer settings.
|
||||
Name "${GAME_VERSIONNED_NAME}"
|
||||
Caption "Install ${GAME_VERSIONNED_NAME}"
|
||||
UninstallCaption "Uninstall ${GAME_VERSIONNED_NAME}"
|
||||
OutFile "${OUT_PATH}\${GAME_SHORT_FS_NAME}-${BASE_SETUP_KEY}-${GAME_LONG_VERSION}-win32-setup.exe"
|
||||
InstallDir "$PROGRAMFILES\${INST_INST_DIR_SUFFIX}"
|
||||
InstallDirRegKey ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" ""
|
||||
ShowInstDetails show
|
||||
ShowUnInstDetails show
|
||||
|
||||
Section "!Base System" SEC01
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
; License and readme files
|
||||
SetOutPath "$INSTDIR"
|
||||
File /oname=licence.txt "${BUILD_INST_DIR}\data\COPYING.txt"
|
||||
File /oname=changes.txt "${BUILD_INST_DIR}\data\CHANGES.txt"
|
||||
;File /oname=todo.txt "${BUILD_INST_DIR}\data\TODO.txt"
|
||||
File /oname=readme.txt readme_for_user.txt
|
||||
|
||||
; Executable and DLLs ... but no mod tool (see later)
|
||||
SetOutPath "$INSTDIR\bin"
|
||||
File /x sd2-*.* /x *.lib /x *.jar "${BUILD_INST_DIR}\bin\*.*"
|
||||
|
||||
; Core loadable modules (physics and graphics engines, track loader, ...)
|
||||
SetOutPath "$INSTDIR\lib\modules\graphic"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\modules\graphic\*.*"
|
||||
SetOutPath "$INSTDIR\lib\modules\simu"
|
||||
File "${BUILD_INST_DIR}\lib\modules\simu\simuv5.dll"
|
||||
SetOutPath "$INSTDIR\lib\modules\telemetry"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\modules\telemetry\*.*"
|
||||
SetOutPath "$INSTDIR\lib\modules\track"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\modules\track\*.*"
|
||||
SetOutPath "$INSTDIR\lib\modules\userinterface"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\modules\userinterface\*.*"
|
||||
SetOutPath "$INSTDIR\lib\modules\sound"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\modules\sound\*.*"
|
||||
SetOutPath "$INSTDIR\lib\modules\racing"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\modules\racing\*.*"
|
||||
;SetOutPath "$INSTDIR\lib\modules\networking"
|
||||
;File /r /x *.lib "${BUILD_INST_DIR}\lib\modules\networking\*.*"
|
||||
|
||||
; Core data files (sound, textures, menus, car categories, ...)
|
||||
SetOutPath "$INSTDIR\data"
|
||||
File "${BUILD_INST_DIR}\data\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\categories"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\categories\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\config"
|
||||
File "${BUILD_INST_DIR}\data\config\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\config\raceman\extra"
|
||||
File /r "${BUILD_INST_DIR}\data\config\raceman\extra\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\config\raceman"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\practice.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\quickrace.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\singleevent-challenge.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\singleevent-endurance.xml"
|
||||
|
||||
; Moved to 'speed-dreams-wip-cars-and-tracks.nsi' for version 2.1.0
|
||||
;File "${BUILD_INST_DIR}\data\config\raceman\networkrace.xml"
|
||||
|
||||
SetOutPath "$INSTDIR\data\data"
|
||||
File /r "${BUILD_INST_DIR}\data\data\*.*"
|
||||
|
||||
; Documentation
|
||||
SetOutPath "$INSTDIR\doc"
|
||||
File /r /x .svn "${BUILD_INST_DIR}\doc\*.*"
|
||||
|
||||
; Base robots binaries
|
||||
SetOutPath "$INSTDIR\lib\drivers\human"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\human\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\networkhuman"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\networkhuman\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\dandroid_sc"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\dandroid_sc\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\simplix_sc"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\simplix_sc\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\usr_sc"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\usr_sc\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\shadow_sc"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\shadow_sc\*.*"
|
||||
|
||||
; Base robots data files (car and track setups)
|
||||
SetOutPath "$INSTDIR\data\drivers\human"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\drivers\human\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\networkhuman"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\drivers\networkhuman\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\dandroid_sc"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\drivers\dandroid_sc\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\simplix_sc"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\drivers\simplix_sc\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\usr_sc"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\drivers\usr_sc\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\shadow_sc"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\drivers\shadow_sc\*.*"
|
||||
|
||||
; Base car models (only Supercars)
|
||||
SetOutPath "$INSTDIR\data\cars\models\sc-boxer-96"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\cars\models\sc-boxer-96\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\sc-cavallo-360"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\cars\models\sc-cavallo-360\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\sc-deckard-conejo"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\cars\models\sc-deckard-conejo\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\sc-fmc-gt4"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\cars\models\sc-fmc-gt4\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\sc-kanagawa-z35gts"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\cars\models\sc-kanagawa-z35gts\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\sc-kongei-kk8s"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\cars\models\sc-kongei-kk8s\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\sc-lynx-220"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\cars\models\sc-lynx-220\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\sc-murasama-nsx"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\cars\models\sc-murasama-nsx\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\sc-spirit-300"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\cars\models\sc-spirit-300\*.*"
|
||||
|
||||
; Base tracks (only Espie)
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\espie"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\data\tracks\circuit\espie\*.*"
|
||||
|
||||
; Write the install dir to the registry so that optional installs can find it.
|
||||
WriteRegStr ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" "" "$INSTDIR"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section /o "Basic mod Tools" SEC02
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
; Customizable robots binaries
|
||||
SetOutPath "$INSTDIR\lib\drivers\simplix"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\simplix\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\usr"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\usr\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\shadow"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\shadow\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\dandroid"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\dandroid\*.*"
|
||||
|
||||
; Customizable robot data files (car and track setups)
|
||||
SetOutPath "$INSTDIR\data\drivers\simplix"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\simplix\*.*"
|
||||
|
||||
; Tools executables
|
||||
SetOutPath "$INSTDIR\bin"
|
||||
File "${BUILD_INST_DIR}\bin\sd2-*.*"
|
||||
File "${BUILD_INST_DIR}\bin\*.lib"
|
||||
|
||||
; Java trackeditor
|
||||
File "${BUILD_INST_DIR}\bin\*.jar"
|
||||
|
||||
SetShellVarContext all
|
||||
; Start menu entries
|
||||
CreateDirectory "$SMPROGRAMS\${GAME_VERSIONNED_NAME}"
|
||||
CreateShortCut "$SMPROGRAMS\${GAME_VERSIONNED_NAME}\${TRACKEDITOR_VERSIONNED_NAME}.lnk" "$INSTDIR\bin\${TRACKEDITOR_JAR_NAME}.jar" "" "" 0 SW_SHOWNORMAL "" "Track Editor"
|
||||
|
||||
; Cmake macros for robot developers
|
||||
SetOutPath "$INSTDIR\data\cmake"
|
||||
File /r "${BUILD_INST_DIR}\data\cmake\*.*"
|
||||
|
||||
; Includes for robot developers
|
||||
SetOutPath "$INSTDIR\include"
|
||||
File /r "${BUILD_INST_DIR}\include\*.*"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section /o "HQ cars and tracks (1)" SEC03
|
||||
|
||||
StrCpy $1 "speed-dreams-${HQCARSTRACKS_SETUP_KEY}-${GAME_LONG_VERSION}-win32-setup.exe"
|
||||
StrCpy $2 "HQ cars and tracks (1)"
|
||||
!insertmacro DownloadPackageIfNeededAndThenInstall $1 $2 475
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section /o "HQ cars and tracks (2)" SEC04
|
||||
|
||||
StrCpy $1 "speed-dreams-${MOREHQCARSTRACKS_SETUP_KEY}-${GAME_LONG_VERSION}-win32-setup.exe"
|
||||
StrCpy $2 "HQ cars and tracks (2)"
|
||||
!insertmacro DownloadPackageIfNeededAndThenInstall $1 $2 480
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section /o "WIP cars and tracks" SEC05
|
||||
|
||||
StrCpy $1 "speed-dreams-${WIPCARSTRACKS_SETUP_KEY}-${GAME_LONG_VERSION}-win32-setup.exe"
|
||||
StrCpy $2 "WIP cars and tracks"
|
||||
!insertmacro DownloadPackageIfNeededAndThenInstall $1 $2 600
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section /o "Unmaintained" SEC06
|
||||
|
||||
StrCpy $1 "speed-dreams-${UNMAINTAINED_SETUP_KEY}-${GAME_LONG_VERSION}-win32-setup.exe"
|
||||
StrCpy $2 "Unmaintained contents"
|
||||
!insertmacro DownloadPackageIfNeededAndThenInstall $1 $2 1
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -Shortcuts
|
||||
|
||||
SetShellVarContext all
|
||||
; Start menu entries
|
||||
CreateDirectory "$SMPROGRAMS\${GAME_VERSIONNED_NAME}"
|
||||
|
||||
SetOutPath "$INSTDIR\bin"
|
||||
|
||||
CreateShortCut "$SMPROGRAMS\${GAME_VERSIONNED_NAME}\${GAME_VERSIONNED_NAME}.lnk" "$INSTDIR\bin\${GAME_FS_NAME}.exe" "" "" 0 SW_SHOWNORMAL "" "an Open Motorsport Sim"
|
||||
CreateShortCut "$SMPROGRAMS\${GAME_VERSIONNED_NAME}\User Manual.lnk" "$INSTDIR\doc\how_to_drive.html"
|
||||
CreateShortCut "$SMPROGRAMS\${GAME_VERSIONNED_NAME}\Frequently Asked Questions.lnk" "$INSTDIR\doc\faq.html"
|
||||
CreateShortCut "$SMPROGRAMS\${GAME_VERSIONNED_NAME}\Read me.lnk" "$INSTDIR\readme.txt"
|
||||
CreateShortCut "$SMPROGRAMS\${GAME_VERSIONNED_NAME}\Licence.lnk" "$INSTDIR\licence.txt"
|
||||
WriteIniStr "$INSTDIR\${GAME_NAME}.url" "InternetShortcut" "URL" "${GAME_WEB_SITE}"
|
||||
CreateShortCut "$SMPROGRAMS\${GAME_VERSIONNED_NAME}\Web site.lnk" "$INSTDIR\${GAME_NAME}.url"
|
||||
WriteIniStr "$INSTDIR\${GAME_NAME} Community.url" "InternetShortcut" "URL" "${COMMUNITY_WEB_SITE}"
|
||||
CreateShortCut "$SMPROGRAMS\${GAME_VERSIONNED_NAME}\Community.lnk" "$INSTDIR\${GAME_NAME} Community.url"
|
||||
WriteIniStr "$INSTDIR\BugTracker.url" "InternetShortcut" "URL" "${GAME_BUG_TRACKER}"
|
||||
CreateShortCut "$SMPROGRAMS\${GAME_VERSIONNED_NAME}\Bug tracker.lnk" "$INSTDIR\BugTracker.url"
|
||||
CreateShortCut "$SMPROGRAMS\${GAME_VERSIONNED_NAME}\Uninstall.lnk" "$INSTDIR\uninst.exe"
|
||||
|
||||
; Desktop shortcut
|
||||
CreateShortCut "$DESKTOP\${GAME_VERSIONNED_NAME}.lnk" "$INSTDIR\bin\${GAME_FS_NAME}.exe" "" "" 0 SW_SHOWNORMAL "" "an Open Motorsport Sim"
|
||||
|
||||
; Game shortcuts console settings for more accurate/easy bug reports (120x9999 history, 120x40 window)
|
||||
WriteRegDWORD HKCU "Console\${GAME_VERSIONNED_NAME}" "ScreenBufferSize" 0x270f0078
|
||||
WriteRegDWORD HKCU "Console\${GAME_VERSIONNED_NAME}" "WindowSize" 0x280078
|
||||
WriteRegDWORD HKCU "Console\${GAME_VERSIONNED_NAME}" "QuickEdit" 0x1
|
||||
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -Post
|
||||
|
||||
WriteUninstaller "$INSTDIR\uninst.exe"
|
||||
|
||||
; Standard Windows-conformant (?) registry keys
|
||||
WriteRegStr ${GAME_ROOT_REGKEY} "${GAME_INST_REGKEY}" "" "$INSTDIR\bin\${GAME_FS_NAME}.exe"
|
||||
WriteRegStr ${GAME_ROOT_REGKEY} "${GAME_INST_REGKEY}" "Path" "$INSTDIR\bin"
|
||||
|
||||
WriteRegStr ${GAME_ROOT_REGKEY} "${GAME_UNINST_REGKEY}" "DisplayName" "$(^Name)"
|
||||
WriteRegStr ${GAME_ROOT_REGKEY} "${GAME_UNINST_REGKEY}" "DisplayVersion" "${GAME_VERSION}"
|
||||
WriteRegStr ${GAME_ROOT_REGKEY} "${GAME_UNINST_REGKEY}" "UninstallString" "$INSTDIR\uninst.exe"
|
||||
WriteRegStr ${GAME_ROOT_REGKEY} "${GAME_UNINST_REGKEY}" "DisplayIcon" "$INSTDIR\bin\${GAME_FS_NAME}.exe"
|
||||
WriteRegStr ${GAME_ROOT_REGKEY} "${GAME_UNINST_REGKEY}" "URLInfoAbout" "${GAME_WEB_SITE}"
|
||||
WriteRegStr ${GAME_ROOT_REGKEY} "${GAME_UNINST_REGKEY}" "Publisher" "${GAME_PUBLISHER}"
|
||||
|
||||
; Registry keys for detecting already installed older/newer version
|
||||
; and other secondary installers.
|
||||
WriteRegStr ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" "" "$INSTDIR"
|
||||
WriteRegDword ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" "VersionMajor" "${VER_MAJOR}"
|
||||
WriteRegDword ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" "VersionMinor" "${VER_MINOR}"
|
||||
WriteRegDword ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" "VersionPatch" "${VER_PATCH}"
|
||||
WriteRegStr ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" "VersionExtra" "${VER_EXTRA}"
|
||||
WriteRegDword ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" "VersionDate" "${VER_RELDATE}"
|
||||
|
||||
SectionEnd
|
||||
|
||||
; Description of the installer sections (for the "Components" page)
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Game core components, Supercars set, AI drivers, and Espie track$\nA kind of minimal and / or demo package"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Basic tools for building / moding cars, tracks, robots, menus."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "HQ tracks, fine-tuned LS1 + 36GP cars and AI drivers$\n(will be downloaded if needed and agreed)"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "More HQ tracks, fine-tuned TRB1 cars and AI drivers$\n(will be downloaded if needed and agreed)"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC05} "Work-in-progress cars (LS2, RS, MP5) and tracks$\n(will be downloaded if needed and agreed)"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC06} "Unmaintained contents (Old physics engines)$\n(will be downloaded if needed and agreed)"
|
||||
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
Section Uninstall
|
||||
|
||||
SetShellVarContext all
|
||||
;SetAutoClose true
|
||||
|
||||
; Start menu entries.
|
||||
RMDir /r "$SMPROGRAMS\${GAME_VERSIONNED_NAME}"
|
||||
|
||||
; Desktop shortcut.
|
||||
Delete "$DESKTOP\${GAME_VERSIONNED_NAME}.lnk"
|
||||
|
||||
; Registry keys.
|
||||
DeleteRegKey ${GAME_ROOT_REGKEY} "${GAME_INST_REGKEY}"
|
||||
DeleteRegKey ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}"
|
||||
DeleteRegKey ${GAME_ROOT_REGKEY} "${GAME_UNINST_REGKEY}"
|
||||
|
||||
; The whole installation folder
|
||||
; (Need to be do that way - inside first, outside last -
|
||||
; because when the uninstaller is called by LeaveReinstallPage,
|
||||
; $INSTDIR\uninst.exe is in the way, and RMDir /r "$INSTDIR" fails).
|
||||
RMDir /r "$INSTDIR\bin"
|
||||
RMDir /r "$INSTDIR\lib"
|
||||
RMDir /r "$INSTDIR\data"
|
||||
RMDir /r "$INSTDIR\doc"
|
||||
RMDir /r "$INSTDIR\include"
|
||||
RMDir /r "$INSTDIR"
|
||||
|
||||
SectionEnd
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
;Installer Functions
|
||||
|
||||
; This one is called at installer startup.
|
||||
Function .onInit
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "speed-dreams.ini"
|
||||
|
||||
FunctionEnd
|
||||
|
||||
; This one is called when entering the "Reinstall" page,
|
||||
; in order to check if another older/newer version is already installed,
|
||||
; and ask the user what he really wants to do.
|
||||
Function EnterReinstallPage
|
||||
|
||||
ReadRegStr $R0 ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" ""
|
||||
|
||||
StrCmp $R0 "" 0 other_version_present
|
||||
Abort
|
||||
|
||||
other_version_present:
|
||||
|
||||
;Detect version
|
||||
ReadRegDWORD $R0 ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" "VersionMajor"
|
||||
IntCmp $R0 ${VER_MAJOR} minor_check older_version newer_version
|
||||
minor_check:
|
||||
ReadRegDWORD $R0 ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" "VersionMinor"
|
||||
IntCmp $R0 ${VER_MINOR} patch_check older_version newer_version
|
||||
patch_check:
|
||||
ReadRegDWORD $R0 ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" "VersionPatch"
|
||||
IntCmp $R0 ${VER_PATCH} build_check older_version newer_version
|
||||
build_check:
|
||||
ReadRegDWORD $R0 ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" "VersionDate"
|
||||
IntCmp $R0 ${VER_RELDATE} same_version older_version newer_version
|
||||
|
||||
older_version:
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "speed-dreams.ini" "Field 1" "Text" "An older version of ${GAME_NAME} is installed on your system. It is recommended that you uninstall the current version before installing. Select the operation you want to perform and click Next to continue."
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "speed-dreams.ini" "Field 2" "Text" "Un-install before installing"
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "speed-dreams.ini" "Field 3" "Text" "Do not un-install"
|
||||
!insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${GAME_VERSIONNED_NAME}."
|
||||
StrCpy $R0 "1"
|
||||
|
||||
Goto reinst_start
|
||||
|
||||
newer_version:
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "speed-dreams.ini" "Field 1" "Text" "A newer version of ${GAME_NAME} is already installed! It is not recommended that you install an older version. If you really want to install this older version, it's better to uninstall the current version first. Select the operation you want to perform and click Next to continue."
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "speed-dreams.ini" "Field 2" "Text" "Un-install before installing"
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "speed-dreams.ini" "Field 3" "Text" "Do not un-install"
|
||||
!insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${GAME_VERSIONNED_NAME}."
|
||||
StrCpy $R0 "1"
|
||||
|
||||
Goto reinst_start
|
||||
|
||||
same_version:
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "speed-dreams.ini" "Field 1" "Text" "${GAME_VERSIONNED_NAME} is already installed. Select the operation you want to perform and click Next to continue."
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "speed-dreams.ini" "Field 2" "Text" "Add / re-install components"
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "speed-dreams.ini" "Field 3" "Text" "Un-install ${GAME_VERSIONNED_NAME}"
|
||||
!insertmacro MUI_HEADER_TEXT "Already Installed" "Choose the maintenance option to perform."
|
||||
StrCpy $R0 "2"
|
||||
|
||||
reinst_start:
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "speed-dreams.ini"
|
||||
|
||||
FunctionEnd
|
||||
|
||||
; This one is called when leaving the "Reinstall" page,
|
||||
; after the user has answered what he really wanted to do.
|
||||
; Here we do what the user decided.
|
||||
Function LeaveReinstallPage
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $R1 "speed-dreams.ini" "Field 2" "State"
|
||||
|
||||
StrCmp $R0 "1" 0 +2
|
||||
StrCmp $R1 "1" reinst_uninstall reinst_done
|
||||
|
||||
StrCmp $R0 "2" 0 +3
|
||||
StrCmp $R1 "1" reinst_done reinst_uninstall
|
||||
|
||||
reinst_uninstall:
|
||||
ReadRegStr $R1 ${GAME_ROOT_REGKEY} "${GAME_UNINST_REGKEY}" "UninstallString"
|
||||
|
||||
;Run uninstaller
|
||||
HideWindow
|
||||
|
||||
ClearErrors
|
||||
ExecWait '$R1 _?=$INSTDIR'
|
||||
|
||||
IfErrors no_remove_uninstaller
|
||||
IfFileExists "$INSTDIR\bin\${GAME_FS_NAME}.exe" no_remove_uninstaller
|
||||
|
||||
Delete $R1
|
||||
RMDir $INSTDIR
|
||||
|
||||
no_remove_uninstaller:
|
||||
|
||||
StrCmp $R0 "2" 0 +2
|
||||
Quit
|
||||
|
||||
BringToFront
|
||||
|
||||
reinst_done:
|
||||
|
||||
FunctionEnd
|
||||
|
||||
; This one is called at uninstaller startup.
|
||||
Function un.onInit
|
||||
|
||||
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Do you really want to uninstall $(^Name) and all its components ?" IDYES +2
|
||||
Abort
|
||||
|
||||
FunctionEnd
|
||||
|
||||
; This one is called at uninstaller end, when it was successfull.
|
||||
Function un.onUninstSuccess
|
||||
|
||||
HideWindow
|
||||
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully uninstalled."
|
||||
|
||||
FunctionEnd
|
|
@ -1,260 +0,0 @@
|
|||
;
|
||||
; Windows NSIS configuration file for the "HQ Cars & Tracks (1)" installer
|
||||
; (HQ tracks and cars with full AI support)
|
||||
;
|
||||
; copyright : (C) 2011 onwards Jean-Philippe Meuret
|
||||
;
|
||||
; 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.
|
||||
|
||||
; Common definitions.
|
||||
!include "speed-dreams.nsh"
|
||||
|
||||
;SetCompressor /SOLID lzma ; 1-block compression, smaller but longer (generation, extraction)
|
||||
|
||||
; MUI Settings
|
||||
!define MUI_WELCOMEPAGE_TITLE "${GAME_NAME}\n ${GAME_SUBTITLE}\nHQ (1) tracks, cars and AI drivers"
|
||||
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
||||
|
||||
; Installer pages
|
||||
;Page custom EnterXXXPage LeaveXXXPage
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
; Language files (Warning: Can't be upper in the script)
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
!insertmacro MUI_LANGUAGE "Dutch"
|
||||
!insertmacro MUI_LANGUAGE "Danish"
|
||||
!insertmacro MUI_LANGUAGE "Swedish"
|
||||
!insertmacro MUI_LANGUAGE "Finnish"
|
||||
!insertmacro MUI_LANGUAGE "Norwegian"
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
!insertmacro MUI_LANGUAGE "French"
|
||||
!insertmacro MUI_LANGUAGE "Spanish"
|
||||
!insertmacro MUI_LANGUAGE "Italian"
|
||||
!insertmacro MUI_LANGUAGE "Russian"
|
||||
!insertmacro MUI_LANGUAGE "Polish"
|
||||
!insertmacro MUI_LANGUAGE "Czech"
|
||||
!insertmacro MUI_LANGUAGE "Slovak"
|
||||
!insertmacro MUI_LANGUAGE "Hungarian"
|
||||
!insertmacro MUI_LANGUAGE "Romanian"
|
||||
!insertmacro MUI_LANGUAGE "Greek"
|
||||
!insertmacro MUI_LANGUAGE "Turkish"
|
||||
!insertmacro MUI_LANGUAGE "Arabic"
|
||||
!insertmacro MUI_LANGUAGE "Farsi"
|
||||
!insertmacro MUI_LANGUAGE "Japanese"
|
||||
!insertmacro MUI_LANGUAGE "SimpChinese"
|
||||
|
||||
; Global installer settings.
|
||||
Name "${GAME_VERSIONNED_NAME}"
|
||||
Caption "Install HQ tracks, cars & AI drivers for ${GAME_VERSIONNED_NAME}"
|
||||
OutFile "${OUT_PATH}\${GAME_SHORT_FS_NAME}-${HQCARSTRACKS_SETUP_KEY}-${GAME_LONG_VERSION}-win32-setup.exe"
|
||||
InstallDir "$PROGRAMFILES\${INST_INST_DIR_SUFFIX}"
|
||||
InstallDirRegKey ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" ""
|
||||
ShowInstDetails show
|
||||
ShowUnInstDetails show
|
||||
|
||||
Section -CoreData
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
; Game core data files (racemanagers, ...)
|
||||
SetOutPath "$INSTDIR\data\config\raceman"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\singleevent-36gp.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\singleevent-ls-gt1.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\championship.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\championship-supercars.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\championship-36gp.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\championship-ls-gt1.xml"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -Drivers
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
; Customizable robots binaries (needed for the Career mode)
|
||||
SetOutPath "$INSTDIR\lib\drivers\simplix"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\simplix\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\usr"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\usr\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\dandroid"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\dandroid\*.*"
|
||||
|
||||
; Customizable robot data files (car and track setups) (needed for the Career mode)
|
||||
SetOutPath "$INSTDIR\data\drivers\simplix"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\simplix\*.*"
|
||||
|
||||
; Robots binaries
|
||||
SetOutPath "$INSTDIR\lib\drivers\simplix_ls1"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\simplix_ls1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\simplix_36GP"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\simplix_36GP\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\usr_ls1"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\usr_ls1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\dandroid_36GP"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\dandroid_36GP\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\usr_36GP"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\usr_36GP\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\shadow_ls1"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\shadow_ls1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\shadow_36GP"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\shadow_36GP\*.*"
|
||||
|
||||
; SetOutPath "$INSTDIR\lib\drivers\kilo2008"
|
||||
; File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\kilo2008\*.*"
|
||||
|
||||
; Robots data files (car and track setups)
|
||||
SetOutPath "$INSTDIR\data\drivers\simplix_ls1"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\simplix_ls1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\simplix_36GP"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\simplix_36GP\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\usr_ls1"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\usr_ls1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\dandroid_36GP"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\dandroid_36GP\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\usr_36GP"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\usr_36GP\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\shadow_ls1"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\shadow_ls1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\shadow_36GP"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\shadow_36GP\*.*"
|
||||
|
||||
; SetOutPath "$INSTDIR\data\drivers\kilo2008"
|
||||
; File /r "${BUILD_INST_DIR}\data\drivers\kilo2008\*.*"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -Cars
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
; HQ / AI driven LD-GT1 car models
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls1-archer-r9"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls1-archer-r9\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls1-cavallo-570s1"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls1-cavallo-570s1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls1-marisatech-gt4r"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls1-marisatech-gt4r\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls1-newcastle-fury"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls1-newcastle-fury\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls1-taipan-ltsr"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls1-taipan-ltsr\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls1-toro-rgt"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls1-toro-rgt\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls1-vulture-v5r"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls1-vulture-v5r\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls1-vulture-v6r"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls1-vulture-v6r\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls1-zentek-z7r"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls1-zentek-z7r\*.*"
|
||||
|
||||
; HQ / AI driven 36 Grand-Prix car models
|
||||
SetOutPath "$INSTDIR\data\cars\models\36gp-century-r11b"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\36gp-century-r11b\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\36gp-ettore-t59"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\36gp-ettore-t59\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\36gp-milano-12c36"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\36gp-milano-12c36\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\36gp-milano-tipop3"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\36gp-milano-tipop3\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\36gp-motorunion-typec"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\36gp-motorunion-typec\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\36gp-silber-w25b"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\36gp-silber-w25b\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\36gp-tridenti-6c34"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\36gp-tridenti-6c34\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\36gp-tridenti-v8ri"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\36gp-tridenti-v8ri\*.*"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -Tracks
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
; HQ (1) circuits
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\brondehach"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\brondehach\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\chemisay"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\chemisay\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\corkscrew"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\corkscrew\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\forza"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\forza\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\karwada"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\karwada\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\hidden-valley"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\hidden-valley\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\melbourne"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\melbourne\*.*"
|
||||
|
||||
; HQ (1) road tracks
|
||||
SetOutPath "$INSTDIR\data\tracks\road\allondaz"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\allondaz\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\road\alicante"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\alicante\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\road\auriac"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\auriac\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\road\charmey"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\charmey\*.*"
|
||||
|
||||
; HQ (1) speed ways
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\arizona"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\arizona\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\manton"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\manton\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\mile"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\mile\*.*"
|
||||
|
||||
SectionEnd
|
||||
|
||||
; This function is called at installer startup.
|
||||
Function .onInit
|
||||
|
||||
; Check if the base package is installed and OK, and abort if not.
|
||||
!insertmacro CheckIfBasePackageInstalled
|
||||
|
||||
FunctionEnd
|
|
@ -1,292 +0,0 @@
|
|||
;
|
||||
; Windows NSIS configuration file for the "HQ Cars & Tracks (2)" installer
|
||||
; (HQ tracks and cars with full AI support)
|
||||
;
|
||||
; copyright : (C) 2011 onwards Jean-Philippe Meuret
|
||||
;
|
||||
; 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.
|
||||
|
||||
; Common definitions.
|
||||
!include "speed-dreams.nsh"
|
||||
|
||||
;SetCompressor /SOLID lzma ; 1-block compression, smaller but longer (generation, extraction)
|
||||
|
||||
; MUI Settings
|
||||
!define MUI_WELCOMEPAGE_TITLE "${GAME_NAME}\n ${GAME_SUBTITLE}\nHQ (2) tracks, cars and AI drivers"
|
||||
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
||||
|
||||
; Installer pages
|
||||
;Page custom EnterXXXPage LeaveXXXPage
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
; Language files (Warning: Can't be upper in the script)
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
!insertmacro MUI_LANGUAGE "Dutch"
|
||||
!insertmacro MUI_LANGUAGE "Danish"
|
||||
!insertmacro MUI_LANGUAGE "Swedish"
|
||||
!insertmacro MUI_LANGUAGE "Finnish"
|
||||
!insertmacro MUI_LANGUAGE "Norwegian"
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
!insertmacro MUI_LANGUAGE "French"
|
||||
!insertmacro MUI_LANGUAGE "Spanish"
|
||||
!insertmacro MUI_LANGUAGE "Italian"
|
||||
!insertmacro MUI_LANGUAGE "Russian"
|
||||
!insertmacro MUI_LANGUAGE "Polish"
|
||||
!insertmacro MUI_LANGUAGE "Czech"
|
||||
!insertmacro MUI_LANGUAGE "Slovak"
|
||||
!insertmacro MUI_LANGUAGE "Hungarian"
|
||||
!insertmacro MUI_LANGUAGE "Romanian"
|
||||
!insertmacro MUI_LANGUAGE "Greek"
|
||||
!insertmacro MUI_LANGUAGE "Turkish"
|
||||
!insertmacro MUI_LANGUAGE "Arabic"
|
||||
!insertmacro MUI_LANGUAGE "Farsi"
|
||||
!insertmacro MUI_LANGUAGE "Japanese"
|
||||
!insertmacro MUI_LANGUAGE "SimpChinese"
|
||||
|
||||
; Global installer settings.
|
||||
Name "${GAME_VERSIONNED_NAME}"
|
||||
Caption "Install more HQ tracks, cars & AI drivers for ${GAME_VERSIONNED_NAME}"
|
||||
OutFile "${OUT_PATH}\${GAME_SHORT_FS_NAME}-${MOREHQCARSTRACKS_SETUP_KEY}-${GAME_LONG_VERSION}-win32-setup.exe"
|
||||
InstallDir "$PROGRAMFILES\${INST_INST_DIR_SUFFIX}"
|
||||
InstallDirRegKey ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" ""
|
||||
ShowInstDetails show
|
||||
ShowUnInstDetails show
|
||||
|
||||
Section -CoreData
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
; Game core data files (racemanagers, ...)
|
||||
SetOutPath "$INSTDIR\data\config\raceman"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\championship.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\championship-supercars.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\championship-trb1.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\championship-mp1.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\championship-mpa1.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\championship-mpa11.xml"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -Drivers
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
; Robots binaries
|
||||
SetOutPath "$INSTDIR\lib\drivers\shadow_mp1"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\shadow_mp1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\simplix_trb1"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\simplix_trb1\*.*"
|
||||
|
||||
; Robots binaries
|
||||
;SetOutPath "$INSTDIR\lib\drivers\simplix_mpa1"
|
||||
;File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\simplix_mpa1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\usr_trb1"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\usr_trb1\*.*"
|
||||
|
||||
;SetOutPath "$INSTDIR\lib\drivers\usr_mpa1"
|
||||
;File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\usr_mpa1\*.*"
|
||||
|
||||
;SetOutPath "$INSTDIR\lib\drivers\shadow_mpa1"
|
||||
;File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\shadow_mpa1\*.*"
|
||||
|
||||
; Robots data files (car and track setups)
|
||||
SetOutPath "$INSTDIR\data\drivers\shadow_mp1"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\shadow_mp1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\simplix_trb1"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\simplix_trb1\*.*"
|
||||
|
||||
; Robots data files (car and track setups)
|
||||
;SetOutPath "$INSTDIR\data\drivers\simplix_mpa1"
|
||||
;File /r "${BUILD_INST_DIR}\data\drivers\simplix_mpa1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\usr_trb1"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\usr_trb1\*.*"
|
||||
|
||||
;SetOutPath "$INSTDIR\data\drivers\usr_mpa1"
|
||||
;File /r "${BUILD_INST_DIR}\data\drivers\usr_mpa1\*.*"
|
||||
|
||||
;SetOutPath "$INSTDIR\data\drivers\shadow_mpa1"
|
||||
;File /r "${BUILD_INST_DIR}\data\drivers\shadow_mpa1\*.*"
|
||||
|
||||
|
||||
; Warning: Must be here because kilo2008 also drivers the TRB1 cars.
|
||||
; SetOutPath "$INSTDIR\data\drivers\kilo2008"
|
||||
; File /r "${BUILD_INST_DIR}\data\drivers\kilo2008\*.*"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -Cars
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
; HQ / AI driven TORCS Racing Board car models
|
||||
SetOutPath "$INSTDIR\data\cars\models\trb1-boxer-trbrs"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\trb1-boxer-trbrs\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\trb1-cavallo-360rb"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\trb1-cavallo-360rb\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\trb1-sector-rb1"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\trb1-sector-rb1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\trb1-silber-rblk"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\trb1-silber-rblk\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\trb1-spirit-rb1lt"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\trb1-spirit-rb1lt\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\trb1-taipan-rb1"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\trb1-taipan-rb1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\trb1-vieringe-5rb"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\trb1-vieringe-5rb\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\trb1-zaxxon-rb"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\trb1-zaxxon-rb\*.*"
|
||||
|
||||
; HQ / AI driven MPA1 car models
|
||||
SetOutPath "$INSTDIR\data\cars\models\mpa1-ffr"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mpa1-ffr\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mpa1-furia"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mpa1-furia\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mpa1-hartbill-2002"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mpa1-hartbill-2002\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mpa1-murasama"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mpa1-murasama\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mpa1-team-lynx"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mpa1-team-lynx\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mp1-aichi-ej15"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mp1-aichi-ej15\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mp1-aichi-tf105"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mp1-aichi-tf105\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mp1-cavallo-f2005"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mp1-cavallo-f2005\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mp1-sector-mp420"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mp1-sector-mp420\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mp1-diamond-r25"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mp1-diamond-r25\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mp1-bavaria-fw27"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mp1-bavaria-fw27\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mp1-kuala-c24"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mp1-kuala-c24\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mp1-midland-ps05"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mp1-midland-ps05\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mp1-midland-rb1"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mp1-midland-rb1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mp1-murasama-007"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mp1-murasama-007\*.*"
|
||||
|
||||
; SetOutPath "$INSTDIR\data\cars\models\mp1-vicente"
|
||||
; File /r "${BUILD_INST_DIR}\data\cars\models\mp1-vicente\*.*"
|
||||
|
||||
; HQ / AI driven MPA11 car models
|
||||
SetOutPath "$INSTDIR\data\cars\models\mpa11-murasama"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mpa11-murasama\*.*"
|
||||
|
||||
; HQ / AI driven MPA12 car models
|
||||
SetOutPath "$INSTDIR\data\cars\models\mpa12-deckard"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mpa12-deckard\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mpa12-murasama"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mpa12-murasama\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mpa12-spirit"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mpa12-spirit\*.*"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -Tracks
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
; HQ (2) circuits
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\aalborg"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\aalborg\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\kurpfalzring"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\kurpfalzring\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\migrants"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\migrants\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\ruudskogen"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\ruudskogen\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\sao-paulo"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\sao-paulo\*.*"
|
||||
|
||||
; HQ (2) dirt tracks
|
||||
SetOutPath "$INSTDIR\data\tracks\dirt\garguree"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\dirt\garguree\*.*"
|
||||
|
||||
; HQ (2) road tracks
|
||||
SetOutPath "$INSTDIR\data\tracks\road\inuksuk"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\inuksuk\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\road\lombaro"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\lombaro\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\road\longday"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\longday\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\road\ole-road-1"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\ole-road-1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\road\peters"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\peters\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\road\pinabashi"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\pinabashi\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\road\prenzlau"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\prenzlau\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\road\salty"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\salty\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\road\torino"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\torino\*.*"
|
||||
|
||||
; HQ (2) speedways
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\longpond"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\longpond\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\alamo"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\alamo\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\milky-five"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\milky-five\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\newton"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\newton\*.*"
|
||||
|
||||
SectionEnd
|
||||
|
||||
; This function is called at installer startup.
|
||||
Function .onInit
|
||||
|
||||
; Check if the base package is installed and OK, and abort if not.
|
||||
!insertmacro CheckIfBasePackageInstalled
|
||||
|
||||
FunctionEnd
|
|
@ -1,105 +0,0 @@
|
|||
;
|
||||
; Windows NSIS configuration file for the "Unmaintained contents" installer
|
||||
; (obsolete physics engines, ...)
|
||||
;
|
||||
; copyright : (C) 2012 onwards Jean-Philippe Meuret
|
||||
;
|
||||
; 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.
|
||||
|
||||
; Common definitions.
|
||||
!include "speed-dreams.nsh"
|
||||
|
||||
; MUI Settings
|
||||
!define MUI_WELCOMEPAGE_TITLE "${GAME_NAME}\n ${GAME_SUBTITLE}\nUnmaintained contents"
|
||||
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
||||
|
||||
; Installer pages
|
||||
;Page custom EnterXXXPage LeaveXXXPage
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
; Language files (Warning: Can't be upper in the script)
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
!insertmacro MUI_LANGUAGE "Dutch"
|
||||
!insertmacro MUI_LANGUAGE "Danish"
|
||||
!insertmacro MUI_LANGUAGE "Swedish"
|
||||
!insertmacro MUI_LANGUAGE "Finnish"
|
||||
!insertmacro MUI_LANGUAGE "Norwegian"
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
!insertmacro MUI_LANGUAGE "French"
|
||||
!insertmacro MUI_LANGUAGE "Spanish"
|
||||
!insertmacro MUI_LANGUAGE "Italian"
|
||||
!insertmacro MUI_LANGUAGE "Russian"
|
||||
!insertmacro MUI_LANGUAGE "Polish"
|
||||
!insertmacro MUI_LANGUAGE "Czech"
|
||||
!insertmacro MUI_LANGUAGE "Slovak"
|
||||
!insertmacro MUI_LANGUAGE "Hungarian"
|
||||
!insertmacro MUI_LANGUAGE "Romanian"
|
||||
!insertmacro MUI_LANGUAGE "Greek"
|
||||
!insertmacro MUI_LANGUAGE "Turkish"
|
||||
!insertmacro MUI_LANGUAGE "Arabic"
|
||||
!insertmacro MUI_LANGUAGE "Farsi"
|
||||
!insertmacro MUI_LANGUAGE "Japanese"
|
||||
!insertmacro MUI_LANGUAGE "SimpChinese"
|
||||
|
||||
; Global installer settings.
|
||||
Name "${GAME_VERSIONNED_NAME}"
|
||||
Caption "Install Unmaintained contents for ${GAME_VERSIONNED_NAME}"
|
||||
OutFile "${OUT_PATH}\${GAME_SHORT_FS_NAME}-${UNMAINTAINED_SETUP_KEY}-${GAME_LONG_VERSION}-win32-setup.exe"
|
||||
InstallDir "$PROGRAMFILES\${INST_INST_DIR_SUFFIX}" ; TODO: Detect base package install dir
|
||||
InstallDirRegKey ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" ""
|
||||
ShowInstDetails show
|
||||
ShowUnInstDetails show
|
||||
|
||||
Section -CoreBinaries
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
; Obsolete physics engines.
|
||||
SetOutPath "$INSTDIR\lib\modules\simu"
|
||||
File "${BUILD_INST_DIR}\lib\modules\simu\simuv2.1.dll"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -CoreData
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -Drivers
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
; Warning: Must be here because kilo2008 also drivers the TRB1 cars.
|
||||
; SetOutPath "$INSTDIR\lib\drivers\kilo2008"
|
||||
; File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\kilo2008\*.*"
|
||||
|
||||
; Warning: Must be here because kilo2008 also drivers the TRB1 cars.
|
||||
; SetOutPath "$INSTDIR\data\drivers\kilo2008"
|
||||
; File /r "${BUILD_INST_DIR}\data\drivers\kilo2008\*.*"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -Cars
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -Tracks
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
SectionEnd
|
||||
|
||||
; This function is called at installer startup.
|
||||
Function .onInit
|
||||
|
||||
; Check if the base package is installed and OK, and abort if not.
|
||||
!insertmacro CheckIfBasePackageInstalled
|
||||
|
||||
FunctionEnd
|
|
@ -1,389 +0,0 @@
|
|||
;
|
||||
; Windows NSIS configuration file for the "WIP cars and tracks" installer
|
||||
; (remaining cars and tracks that don't fit into the "HQ cars and tracks (i)" packages,
|
||||
; because of lower quality graphics, unfinished AI support, ...)
|
||||
;
|
||||
; copyright : (C) 2011 onwards Jean-Philippe Meuret
|
||||
;
|
||||
; 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.
|
||||
|
||||
; Common definitions.
|
||||
!include "speed-dreams.nsh"
|
||||
|
||||
; MUI Settings
|
||||
!define MUI_WELCOMEPAGE_TITLE "${GAME_NAME}\n ${GAME_SUBTITLE}\nMore tracks, cars and AI drivers (WIP)"
|
||||
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
||||
|
||||
; Installer pages
|
||||
;Page custom EnterXXXPage LeaveXXXPage
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
; Language files (Warning: Can't be upper in the script)
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
!insertmacro MUI_LANGUAGE "Dutch"
|
||||
!insertmacro MUI_LANGUAGE "Danish"
|
||||
!insertmacro MUI_LANGUAGE "Swedish"
|
||||
!insertmacro MUI_LANGUAGE "Finnish"
|
||||
!insertmacro MUI_LANGUAGE "Norwegian"
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
!insertmacro MUI_LANGUAGE "French"
|
||||
!insertmacro MUI_LANGUAGE "Spanish"
|
||||
!insertmacro MUI_LANGUAGE "Italian"
|
||||
!insertmacro MUI_LANGUAGE "Russian"
|
||||
!insertmacro MUI_LANGUAGE "Polish"
|
||||
!insertmacro MUI_LANGUAGE "Czech"
|
||||
!insertmacro MUI_LANGUAGE "Slovak"
|
||||
!insertmacro MUI_LANGUAGE "Hungarian"
|
||||
!insertmacro MUI_LANGUAGE "Romanian"
|
||||
!insertmacro MUI_LANGUAGE "Greek"
|
||||
!insertmacro MUI_LANGUAGE "Turkish"
|
||||
!insertmacro MUI_LANGUAGE "Arabic"
|
||||
!insertmacro MUI_LANGUAGE "Farsi"
|
||||
!insertmacro MUI_LANGUAGE "Japanese"
|
||||
!insertmacro MUI_LANGUAGE "SimpChinese"
|
||||
|
||||
; Global installer settings.
|
||||
Name "${GAME_VERSIONNED_NAME}"
|
||||
Caption "Install WIP tracks, cars & AI drivers for ${GAME_VERSIONNED_NAME}"
|
||||
OutFile "${OUT_PATH}\${GAME_SHORT_FS_NAME}-${WIPCARSTRACKS_SETUP_KEY}-${GAME_LONG_VERSION}-win32-setup.exe"
|
||||
InstallDir "$PROGRAMFILES\${INST_INST_DIR_SUFFIX}" ; TODO: Detect base package install dir
|
||||
InstallDirRegKey ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" ""
|
||||
ShowInstDetails show
|
||||
ShowUnInstDetails show
|
||||
|
||||
Section -CoreBinaries
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
; WIP physics engines.
|
||||
SetOutPath "$INSTDIR\lib\modules\simu"
|
||||
File "${BUILD_INST_DIR}\lib\modules\simu\simuv4.1.dll"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -CoreData
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
; Game core data files (racemanagers, ...)
|
||||
SetOutPath "$INSTDIR\data\config\raceman"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\singleevent-mp5.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\championship.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\championship-24h.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\championship-67gp.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\championship-supercars.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\championship-mp5.xml"
|
||||
;File "${BUILD_INST_DIR}\data\config\raceman\career.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\career-36GP.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\career-supercars.xml"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\career_supercars.xmls"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\career_ls1.xmls"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\career_36GP.xmls"
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\career_MPA1.xmls"
|
||||
|
||||
; Moved from 'speed-dreams-base.nsi' for version 2.1.0
|
||||
File "${BUILD_INST_DIR}\data\config\raceman\networkrace.xml"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -Drivers
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
; Robots binaries
|
||||
SetOutPath "$INSTDIR\lib\drivers\simplix_mp5"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\simplix_mp5\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\simplix_ls2"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\simplix_ls2\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\simplix_67GP"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\simplix_67GP\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\usr_ls2"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\usr_ls2\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\usr_rs"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\usr_rs\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\usr_67GP"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\usr_67GP\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\shadow_ls2"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\shadow_ls2\*.*"
|
||||
|
||||
;SetOutPath "$INSTDIR\lib\drivers\shadow_rs"
|
||||
;File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\shadow_rs\*.*"
|
||||
|
||||
;SetOutPath "$INSTDIR\lib\drivers\shadow_mp1"
|
||||
;File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\shadow_mp1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\shadow_67GP"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\shadow_67GP\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\dandroid_ls1"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\dandroid_ls1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\dandroid_ls2"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\dandroid_ls2\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\dandroid_mpa1"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\dandroid_mpa1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\dandroid_rs"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\dandroid_rs\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\dandroid_srw"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\dandroid_srw\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\dandroid_trb1"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\dandroid_trb1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\lib\drivers\dandroid_67GP"
|
||||
File /r /x *.lib "${BUILD_INST_DIR}\lib\drivers\dandroid_67GP\*.*"
|
||||
|
||||
; Robots data files (car and track setups)
|
||||
SetOutPath "$INSTDIR\data\drivers\simplix_mp5"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\simplix_mp5\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\simplix_ls2"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\simplix_ls2\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\simplix_67GP"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\simplix_67GP\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\usr_ls2"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\usr_ls2\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\usr_rs"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\usr_rs\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\usr_67GP"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\usr_67GP\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\shadow_ls2"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\shadow_ls2\*.*"
|
||||
|
||||
;SetOutPath "$INSTDIR\data\drivers\shadow_rs"
|
||||
;File /r "${BUILD_INST_DIR}\data\drivers\shadow_rs\*.*"
|
||||
|
||||
;SetOutPath "$INSTDIR\data\drivers\shadow_mp1"
|
||||
;File /r "${BUILD_INST_DIR}\data\drivers\shadow_mp1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\shadow_67GP"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\shadow_67GP\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\dandroid_ls1"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\dandroid_ls1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\dandroid_ls2"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\dandroid_ls2\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\dandroid_mpa1"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\dandroid_mpa1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\dandroid_rs"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\dandroid_rs\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\dandroid_srw"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\dandroid_srw\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\dandroid_trb1"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\dandroid_trb1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\drivers\dandroid_67GP"
|
||||
File /r "${BUILD_INST_DIR}\data\drivers\dandroid_67GP\*.*"
|
||||
|
||||
|
||||
SectionEnd
|
||||
|
||||
; Lower quality / not AI-driven / work-in-progress car models
|
||||
Section -Cars
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mp5-fmc"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mp5-fmc\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mp5-fmc-drift"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mp5-fmc-drift\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\mp5-fmc-speedy"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\mp5-fmc-speedy\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\rs1-citrus-cs4"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\rs1-citrus-cs4\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\rs1-fmc-centre"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\rs1-fmc-centre\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\rs1-kenji-08"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\rs1-kenji-08\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\rs2-fai-dot"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\rs2-fai-dot\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\rs2-lion-2m"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\rs2-lion-2m\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls2-bavaria-g3gtr"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls2-bavaria-g3gtr\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls2-boxer-96rsr"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls2-boxer-96rsr\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls2-cavallo-360r"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls2-cavallo-360r\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls2-condor-c400r"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls2-condor-c400r\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls2-lynx-xkr"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls2-lynx-xkr\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls2-morley-r900"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls2-morley-r900\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls2-sprite-gts"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls2-sprite-gts\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\ls2-vortex-gt"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\ls2-vortex-gt\*.*"
|
||||
|
||||
;SetOutPath "$INSTDIR\data\cars\models\ls1-cavallo-570s1"
|
||||
;File /r "${BUILD_INST_DIR}\data\cars\models\ls1-cavallo-570s1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\srw-boxer-ts"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\srw-boxer-ts\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\srw-kanagawa-gtr"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\srw-kanagawa-gtr\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\srw-kongei-kk8s"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\srw-kongei-kk8s\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\srw-sector-p4"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\srw-sector-p4\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\67gp-upping-ut19"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\67gp-upping-ut19\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\67gp-cavallo-123"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\67gp-cavallo-123\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\67gp-guthrie-eagle"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\67gp-guthrie-eagle\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\67gp-kuiper-t81"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\67gp-kuiper-t81\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\67gp-mango-ms7"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\67gp-mango-ms7\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\cars\models\67gp-murasama-37a"
|
||||
File /r "${BUILD_INST_DIR}\data\cars\models\67gp-murasama-37a\*.*"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -Tracks
|
||||
|
||||
SetOverwrite on
|
||||
|
||||
; Lower quality / work-in-progress tracks
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\braga"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\braga\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\dijon"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\dijon\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\goldstone-sand"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\goldstone-sand\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\jarama"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\jarama\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\tuna"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\circuit\tuna\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\circuit\atlanta"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\atlanta\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\road\e-track-4"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\e-track-4\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\road\spring"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\spring\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\road\street-1"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\street-1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\road\nordschleife"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\road\nordschleife\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\dirt\dirt-1"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\dirt\dirt-1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\dirt\dirt-2"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\dirt\dirt-2\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\dirt\dirt-4"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\dirt\dirt-4\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\dirt\dirt-6"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\dirt\dirt-6\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\dirt\mixed-1"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\dirt\mixed-1\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\dirt\mixed-2"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\dirt\mixed-2\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\a-speedway"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\a-speedway\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\b-speedway"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\b-speedway\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\c-speedway"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\c-speedway\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\caddo"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\caddo\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\corn"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\corn\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\d-speedway"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\d-speedway\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\e-speedway"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\e-speedway\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\e-track-5"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\e-track-5\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\f-speedway"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\f-speedway\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\longpond"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\longpond\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\sunshine"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\sunshine\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR\data\tracks\speedway\tennessee"
|
||||
File /r "${BUILD_INST_DIR}\data\tracks\speedway\tennessee\*.*"
|
||||
|
||||
SectionEnd
|
||||
|
||||
; This function is called at installer startup.
|
||||
Function .onInit
|
||||
|
||||
; Check if the base package is installed and OK, and abort if not.
|
||||
!insertmacro CheckIfBasePackageInstalled
|
||||
|
||||
FunctionEnd
|
|
@ -1,21 +0,0 @@
|
|||
[Settings]
|
||||
NumFields=3
|
||||
[Field 1]
|
||||
Type=Label
|
||||
Left=0
|
||||
Right=-1
|
||||
Top=0
|
||||
Bottom=24
|
||||
[Field 2]
|
||||
Type=RadioButton
|
||||
Left=30
|
||||
Right=-1
|
||||
Top=50
|
||||
Bottom=58
|
||||
State=1
|
||||
[Field 3]
|
||||
Type=RadioButton
|
||||
Left=30
|
||||
Right=-1
|
||||
Top=70
|
||||
Bottom=78
|
|
@ -1,406 +0,0 @@
|
|||
;
|
||||
; Common definitions for all the Speed Dreams installers
|
||||
;
|
||||
; copyright : (C) 2011 onwards Jean-Philippe Meuret
|
||||
;
|
||||
; 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.
|
||||
|
||||
!ifndef VER_MAJOR
|
||||
!define VER_MAJOR 2
|
||||
!endif
|
||||
|
||||
!ifndef VER_MINOR
|
||||
!define VER_MINOR 2
|
||||
!endif
|
||||
|
||||
!ifndef VER_PATCH
|
||||
!define VER_PATCH 3
|
||||
!endif
|
||||
|
||||
!ifndef VER_EXTRA
|
||||
!define VER_EXTRA ""
|
||||
!endif
|
||||
|
||||
;!echo "VER_EXTRA = ${VER_EXTRA}"
|
||||
|
||||
!ifndef VER_REVISION
|
||||
!define VER_REVISION ""
|
||||
!endif
|
||||
|
||||
; Create TODAY variable containing today's date in the format we use
|
||||
!define /date TODAY "%Y%m%d"
|
||||
|
||||
!ifndef VER_RELDATE
|
||||
!define VER_RELDATE ${TODAY} ; Initial guess ;-)
|
||||
;!define VER_RELDATE 20131102 ; Initial guess ;-)
|
||||
!endif
|
||||
|
||||
!ifndef OUT_PATH
|
||||
!define OUT_PATH "."
|
||||
!endif
|
||||
|
||||
!define GAME_SHORT_NAME "Speed Dreams"
|
||||
!define GAME_NAME "${GAME_SHORT_NAME} ${VER_MAJOR}"
|
||||
!define GAME_SHORT_FS_NAME "speed-dreams"
|
||||
!define GAME_FS_NAME "${GAME_SHORT_FS_NAME}-${VER_MAJOR}"
|
||||
!define GAME_SUBTITLE "'an Open Motorsport Sim'"
|
||||
!define GAME_VERSION "${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}${VER_EXTRA}"
|
||||
!define GAME_VERSIONNED_NAME "${GAME_SHORT_NAME} ${GAME_VERSION}"
|
||||
!define GAME_LONG_VERSION "${GAME_VERSION}-${VER_REVISION}"
|
||||
!define GAME_LONG_NAME "${GAME_SHORT_NAME} ${GAME_LONG_VERSION}"
|
||||
!define GAME_PUBLISHER "The Speed Dreams Team"
|
||||
!define GAME_WEB_SITE "https://sourceforge.net/projects/speed-dreams/"
|
||||
!define GAME_BUG_TRACKER "https://sourceforge.net/p/speed-dreams/tickets/"
|
||||
!define GAME_DOWNLOAD_URL "https://sourceforge.net/projects/speed-dreams/files/${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}"
|
||||
!define COMMUNITY_WEB_SITE "https://sourceforge.net/p/speed-dreams/discussion/"
|
||||
|
||||
!define GAME_ROOT_REGKEY "HKLM"
|
||||
!define GAME_INST_REGKEY "Software\Microsoft\Windows\CurrentVersion\${GAME_FS_NAME}.exe"
|
||||
!define GAME_UNINST_REGKEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GAME_NAME}"
|
||||
!define GAME_DIR_REGKEY "Software\${GAME_PUBLISHER}\${GAME_NAME}"
|
||||
|
||||
; TrackEditor Items
|
||||
!define TRACKEDITOR_JAR_NAME "sd2-trackeditor"
|
||||
!define TRACKEDITOR_VERSIONNED_NAME "SD2 TrackEditor"
|
||||
|
||||
; Folder where the build system installed everything
|
||||
!ifndef BUILD_INST_DIR
|
||||
!define BUILD_INST_DIR "\${GAME_FS_NAME}-build"
|
||||
!endif
|
||||
|
||||
; Default target installation folder
|
||||
!define INST_INST_DIR_SUFFIX "${GAME_SHORT_FS_NAME}-${GAME_VERSION}"
|
||||
|
||||
; Core name for each installer
|
||||
!define BASE_SETUP_KEY "base"
|
||||
!define HQCARSTRACKS_SETUP_KEY "hq-cars-and-tracks"
|
||||
!define MOREHQCARSTRACKS_SETUP_KEY "more-hq-cars-and-tracks"
|
||||
!define WIPCARSTRACKS_SETUP_KEY "wip-cars-and-tracks"
|
||||
!define UNMAINTAINED_SETUP_KEY "unmaintained"
|
||||
|
||||
; Common installer settings
|
||||
SetCompressor /SOLID lzma ; 1-block compression, smaller but longer (generation, extraction)
|
||||
;SetCompressor lzma ; A bit bigger, but faster generation and extraction
|
||||
|
||||
; Usefull libs.
|
||||
!include "LogicLib.nsh"
|
||||
|
||||
; Common MUI Settings
|
||||
!include "MUI.nsh" ; TODO: Move to MUI2
|
||||
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_HEADERIMAGE_BITMAP "..\..\data\data\img\header.bmp"
|
||||
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP "..\..\data\data\img\header-vert.bmp"
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
|
||||
!define MUI_ICON "..\..\data\data\icons\icon.ico"
|
||||
!define MUI_UNICON "..\..\data\data\icons\icon.ico"
|
||||
|
||||
!define MUI_LICENSEPAGE_CHECKBOX
|
||||
|
||||
; StrLoc function ===========================================================
|
||||
; This function outputs the relative index position from the start or end of a string,
|
||||
; where a substring is located.
|
||||
; Adapted from StrLoc 2.0 by Diego Pedroso (http://nsis.sourceforge.net/StrLoc)
|
||||
|
||||
!define StrLoc "!insertmacro _StrLoc"
|
||||
|
||||
!macro _StrLoc Result String SubString StartPoint
|
||||
Push `${String}`
|
||||
Push `${SubString}`
|
||||
Push `${StartPoint}`
|
||||
Call StrLoc
|
||||
Pop `${Result}`
|
||||
!macroend
|
||||
|
||||
Function StrLoc
|
||||
|
||||
;Get arguments from the stack
|
||||
Exch $R0 ; R0 : StartPoint
|
||||
Exch 1
|
||||
Exch $R1 ; R1 : SubString
|
||||
Exch 2
|
||||
Exch $R2 ; R2 : String
|
||||
Push $R3
|
||||
Push $R4
|
||||
Push $R5
|
||||
Push $R6
|
||||
|
||||
;Get "String" and "SubString" length
|
||||
StrLen $R3 $R1 ; R3 : SubStringLen
|
||||
StrLen $R4 $R2 ; R4 : StringLen
|
||||
|
||||
;Start "StartCharPos" counter
|
||||
StrCpy $R5 0 ; R5 : StartCharPos
|
||||
|
||||
;Loop until "SubString" is found or "String" reaches its end
|
||||
${Do}
|
||||
|
||||
;Remove everything before and after the searched part ("TempStr")
|
||||
StrCpy $R6 $R2 $R3 $R5 ; R6 : TmpString
|
||||
|
||||
;Compare "TempStr" with "SubString"
|
||||
${If} $R6 == $R1
|
||||
${If} $R0 == "<"
|
||||
IntOp $R6 $R3 + $R5
|
||||
IntOp $R0 $R4 - $R6
|
||||
${Else}
|
||||
StrCpy $R0 $R5
|
||||
${EndIf}
|
||||
${ExitDo}
|
||||
${EndIf}
|
||||
;If not "SubString", this could be "String"'s end
|
||||
${If} $R5 >= $R4
|
||||
StrCpy $R0 ""
|
||||
${ExitDo}
|
||||
${EndIf}
|
||||
;If not, continue the loop
|
||||
IntOp $R5 $R5 + 1
|
||||
${Loop}
|
||||
|
||||
;Return
|
||||
Pop $R6
|
||||
Pop $R5
|
||||
Pop $R4
|
||||
Pop $R3
|
||||
Pop $R2
|
||||
Exch
|
||||
Pop $R1
|
||||
Exch $R0
|
||||
|
||||
FunctionEnd
|
||||
|
||||
; Parse the given SF.net download page ========================================
|
||||
; and retrieve the URL of the target file on the default (auto-select) mirror.
|
||||
!define GetAutoSelectMirrorURL "!insertmacro _GetAutoSelectMirrorURL"
|
||||
|
||||
!macro _GetAutoSelectMirrorURL ResultURL HTMLFile
|
||||
Push "${HTMLFile}"
|
||||
Call GetAutoSelectMirrorURL
|
||||
Pop "${ResultURL}"
|
||||
!macroend
|
||||
|
||||
Function GetAutoSelectMirrorURL
|
||||
|
||||
;Get arguments from the stack
|
||||
Exch $R0 ; R0 : HTMLFile
|
||||
Push $R1
|
||||
Push $R2
|
||||
Push $R3
|
||||
Push $R4
|
||||
Push $R5
|
||||
|
||||
;DetailPrint "GetAutoSelectMirrorURL:"
|
||||
;DetailPrint " HTMLFile='$R0' ..."
|
||||
|
||||
StrCpy $R2 "" ; R2 : ResultURL
|
||||
|
||||
ClearErrors
|
||||
FileOpen $R1 $R0 r ; R1 : FileHdle
|
||||
IfErrors Done
|
||||
|
||||
;DetailPrint " File open ..."
|
||||
|
||||
StrCpy $R3 "" ; R3 : Line
|
||||
|
||||
${Do}
|
||||
|
||||
ClearErrors
|
||||
StrCpy $R4 $R3 ; R4 : PrevLine
|
||||
FileRead $R1 $R3
|
||||
IfErrors DoneRead
|
||||
|
||||
;DetailPrint " Line read ..."
|
||||
;DetailPrint " '$R3'"
|
||||
|
||||
${StrLoc} $R5 $R3 "direct link</a>, or try another" 0 ; R5 : StringPos
|
||||
;DetailPrint "Found direct link ? $R5"
|
||||
${If} $R5 != ""
|
||||
${StrLoc} $R5 $R4 "<a href=" 0
|
||||
;DetailPrint "Found href in '$R4' ? $R5"
|
||||
;DetailPrint "(in '$R4')"
|
||||
${If} $R5 != ""
|
||||
${StrLoc} $R5 $R4 '"' 0 ; First " in '<a href="..."'
|
||||
;DetailPrint "Found 1st $\" ? $R5"
|
||||
;DetailPrint "(in '$R4')"
|
||||
IntOp $R5 $R5 + 1
|
||||
StrCpy $R2 $R4 200 $R5
|
||||
${StrLoc} $R5 $R2 '"' 0 ; Last " in '<a href="..."'
|
||||
;DetailPrint "Found 1st $\" ? $R5"
|
||||
;DetailPrint "(in '$R2')"
|
||||
StrCpy $R2 $R2 $R5
|
||||
;DetailPrint "Result='$R2'"
|
||||
${ExitDo}
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
${Loop}
|
||||
|
||||
DoneRead:
|
||||
FileClose $R1
|
||||
|
||||
Done:
|
||||
|
||||
; Return
|
||||
StrCpy $R0 $R2 ; R0 : ResultURL
|
||||
Pop $R5
|
||||
Pop $R4
|
||||
Pop $R3
|
||||
Pop $R2
|
||||
Pop $R1
|
||||
Exch $R0 ;Mirror URL found (empty if not found)
|
||||
|
||||
FunctionEnd
|
||||
|
||||
; Download a file from SF.net using the default mirror =========================
|
||||
; ${Status} = "success" on success, or else "<error message>"
|
||||
!define DownloadFromSFNet "!insertmacro _DownloadFromSFNet"
|
||||
|
||||
!macro _DownloadFromSFNet StatusVar SourceURL TargetPathName
|
||||
Push "${SourceURL}"
|
||||
Push "${TargetPathName}"
|
||||
Call DownloadFromSFNet
|
||||
Pop "${StatusVar}"
|
||||
!macroend
|
||||
|
||||
Function DownloadFromSFNet
|
||||
|
||||
;Get arguments from the stack
|
||||
Exch $R0 ; R0 : TargetPathName
|
||||
Exch 1
|
||||
Exch $R1 ; R1 : SourceURL
|
||||
Push $R2
|
||||
Push $R3
|
||||
Push $R4
|
||||
|
||||
StrCpy $R2 $R0 ; R2 : TargetPathName
|
||||
|
||||
StrCpy $R3 "success" ; R3 : Status
|
||||
|
||||
DetailPrint "1) Downloading default mirror URL (auto-selected by SF.net) ..."
|
||||
inetc::get "$R1" "$R2.html" /end
|
||||
Pop $R0
|
||||
${If} $R0 != "OK"
|
||||
|
||||
${If} $R0 == "cancel"
|
||||
StrCpy $R3 "Mirror selection page download was cancelled"
|
||||
DetailPrint "... cancelled."
|
||||
${Else}
|
||||
StrCpy $R3 "Mirror selection page download failed$\n($R0)"
|
||||
DetailPrint "... failed."
|
||||
${EndIf}
|
||||
MessageBox MB_OK|MB_ICONSTOP "$R3"
|
||||
|
||||
${Else}
|
||||
|
||||
${GetAutoSelectMirrorURL} $R4 $R2.html ; R4 : RealURL
|
||||
;DetailPrint " File='$R2.html' ..."
|
||||
;DetailPrint " URL='$R4' ..."
|
||||
|
||||
${If} $R4 == ""
|
||||
|
||||
StrCpy $R3 "Failed to get file URL on default mirror$\nfrom $R1"
|
||||
MessageBox MB_OK|MB_ICONSTOP "$R3"
|
||||
DetailPrint "... failed to extract default mirror URL."
|
||||
|
||||
${Else}
|
||||
|
||||
DetailPrint "2) Downloading file from $R4 ..."
|
||||
inetc::get "$R4" "$R2" /end
|
||||
Pop $R0
|
||||
${If} $R0 != "OK"
|
||||
|
||||
${If} $R0 == "cancel"
|
||||
StrCpy $R3 "File download was cancelled"
|
||||
DetailPrint "... cancelled."
|
||||
${Else}
|
||||
StrCpy $R3 "Failed to download file$\nfrom $R4$\n($R0)"
|
||||
DetailPrint "... failed."
|
||||
${EndIf}
|
||||
Delete "$R2"
|
||||
MessageBox MB_OK|MB_ICONSTOP "$R3"
|
||||
|
||||
${Else}
|
||||
|
||||
DetailPrint "3) Done in $R2."
|
||||
|
||||
${EndIf}
|
||||
|
||||
${EndIf}
|
||||
|
||||
${EndIf}
|
||||
|
||||
Delete "$R2.html"
|
||||
|
||||
; Return
|
||||
StrCpy $R0 $R3 ; R0 : Status
|
||||
Pop $R4
|
||||
Pop $R3
|
||||
Pop $R2
|
||||
Pop $R1
|
||||
Exch $R0 ; "success" on success, or else "<error message>"
|
||||
|
||||
FunctionEnd
|
||||
|
||||
|
||||
!macro DownloadPackageIfNeededAndThenInstall PackageFileName PackageTitle PackageSizeMb
|
||||
|
||||
; Check if the target installer file is already here, next to the current one.
|
||||
${IfNot} ${FileExists} "$EXEDIR\${PackageFileName}"
|
||||
|
||||
; If not, ask the user if he really wants to download.
|
||||
MessageBox MB_OKCANCEL|MB_ICONQUESTION "${PackageFileName} not found$\nnext to $EXEFILE on your disk.$\n$\nClick OK to download it from ${GAME_DOWNLOAD_URL},$\nor Cancel to skip.$\n$\nNote: This might take several minutes, as it's about ${PackageSizeMb} megabytes." IDCANCEL SkipDownload
|
||||
|
||||
; Download
|
||||
DetailPrint "Downloading ${PackageTitle} ..."
|
||||
${DownloadFromSFNet} $0 "${GAME_DOWNLOAD_URL}/${PackageFileName}" "$EXEDIR\${PackageFileName}"
|
||||
|
||||
${If} $0 != "success"
|
||||
|
||||
MessageBox MB_OK|MB_ICONSTOP "Skipping installation of ${PackageTitle}."
|
||||
|
||||
SetAutoClose false
|
||||
|
||||
Return
|
||||
|
||||
${EndIf}
|
||||
|
||||
${EndIf}
|
||||
|
||||
DetailPrint "Installing ${PackageTitle} ..."
|
||||
ExecWait '$EXEDIR\${PackageFileName}' $0
|
||||
DetailPrint "Done (exit code $0)."
|
||||
${If} $0 != "0"
|
||||
SetAutoClose false
|
||||
${EndIf}
|
||||
|
||||
Return
|
||||
|
||||
SkipDownload:
|
||||
|
||||
DetailPrint "Skipping installation of ${PackageTitle} on user's request."
|
||||
|
||||
!macroend
|
||||
|
||||
!macro CheckIfBasePackageInstalled
|
||||
|
||||
; Check if the base package is installed and OK, and abort if not.
|
||||
ReadRegStr $R0 ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" ""
|
||||
${If} $R0 == ""
|
||||
MessageBox MB_OK|MB_ICONSTOP "No base package found for ${GAME_NAME}$\n$\nPlease, first download and run ${GAME_SHORT_FS_NAME}-${BASE_SETUP_KEY}-${GAME_LONG_VERSION}-win32-setup.exe$\nfrom ${GAME_DOWNLOAD_URL}"
|
||||
Abort
|
||||
${EndIf}
|
||||
|
||||
${If} ${FileExists} "$R0\bin\${GAME_FS_NAME}.exe"
|
||||
Nop
|
||||
${Else}
|
||||
MessageBox MB_OK|MB_ICONSTOP "A base package for ${GAME_NAME} was found, but it is no more usable and/or corrupted$\n$\nPlease, first (download and) run again ${GAME_SHORT_FS_NAME}-${BASE_SETUP_KEY}-${GAME_LONG_VERSION}-win32-setup.exe$\nfrom ${GAME_DOWNLOAD_URL}"
|
||||
Abort
|
||||
${EndIf}
|
||||
|
||||
!macroend
|
|
@ -1,407 +0,0 @@
|
|||
;
|
||||
; Common definitions for all the Speed Dreams installers
|
||||
;
|
||||
; copyright : (C) 2011 onwards Jean-Philippe Meuret
|
||||
;
|
||||
; 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.
|
||||
|
||||
!ifndef VER_MAJOR
|
||||
!define VER_MAJOR @PROJECT_VERSION_MAJOR@
|
||||
!endif
|
||||
|
||||
!ifndef VER_MINOR
|
||||
!define VER_MINOR @PROJECT_VERSION_MINOR@
|
||||
!endif
|
||||
|
||||
!ifndef VER_PATCH
|
||||
!define VER_PATCH @PROJECT_VERSION_PATCH@
|
||||
!endif
|
||||
|
||||
!ifndef VER_EXTRA
|
||||
!define VER_EXTRA "@PROJECT_VERSION_METADATA@"
|
||||
!endif
|
||||
|
||||
;!echo "VER_EXTRA = ${VER_EXTRA}"
|
||||
|
||||
!ifndef VER_REVISION
|
||||
!define VER_REVISION "r@SVN_REV@"
|
||||
!endif
|
||||
|
||||
; Create TODAY variable containing today's date in the format we use
|
||||
!define /date TODAY "%Y%m%d"
|
||||
|
||||
!ifndef VER_RELDATE
|
||||
!define VER_RELDATE ${TODAY} ; Initial guess ;-)
|
||||
;!define VER_RELDATE 20131102 ; Initial guess ;-)
|
||||
!endif
|
||||
|
||||
!ifndef OUT_PATH
|
||||
!define OUT_PATH "@SD_PACKAGEDIR@"
|
||||
!endif
|
||||
|
||||
!define GAME_SHORT_NAME "Speed Dreams"
|
||||
!define GAME_NAME "${GAME_SHORT_NAME} ${VER_MAJOR}"
|
||||
!define GAME_SHORT_FS_NAME "speed-dreams"
|
||||
!define GAME_FS_NAME "${GAME_SHORT_FS_NAME}-${VER_MAJOR}"
|
||||
!define GAME_SUBTITLE "'an Open Motorsport Sim'"
|
||||
!define GAME_VERSION "${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}${VER_EXTRA}"
|
||||
!define GAME_VERSIONNED_NAME "${GAME_SHORT_NAME} ${GAME_VERSION}"
|
||||
!define GAME_LONG_VERSION "${GAME_VERSION}-${VER_REVISION}"
|
||||
!define GAME_LONG_NAME "${GAME_SHORT_NAME} ${GAME_LONG_VERSION}"
|
||||
!define GAME_PUBLISHER "The Speed Dreams Team"
|
||||
!define GAME_WEB_SITE "https://sourceforge.net/projects/speed-dreams/"
|
||||
!define GAME_BUG_TRACKER "https://sourceforge.net/p/speed-dreams/tickets/"
|
||||
!define GAME_DOWNLOAD_URL "https://sourceforge.net/projects/speed-dreams/files/${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}"
|
||||
!define COMMUNITY_WEB_SITE "https://sourceforge.net/p/speed-dreams/discussion/"
|
||||
|
||||
!define GAME_ROOT_REGKEY "HKLM"
|
||||
!define GAME_INST_REGKEY "Software\Microsoft\Windows\CurrentVersion\${GAME_FS_NAME}.exe"
|
||||
!define GAME_UNINST_REGKEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GAME_NAME}"
|
||||
!define GAME_DIR_REGKEY "Software\${GAME_PUBLISHER}\${GAME_NAME}"
|
||||
|
||||
; TrackEditor Items
|
||||
!define TRACKEDITOR_JAR_NAME "sd2-trackeditor"
|
||||
!define TRACKEDITOR_VERSIONNED_NAME "SD2 TrackEditor"
|
||||
|
||||
; Folder where the build system installed everything
|
||||
!ifndef BUILD_INST_DIR
|
||||
; !define BUILD_INST_DIR "\${GAME_FS_NAME}-build"
|
||||
!define BUILD_INST_DIR "@NSIS_INSTALL_DIR@"
|
||||
!endif
|
||||
|
||||
; Default target installation folder
|
||||
!define INST_INST_DIR_SUFFIX "${GAME_SHORT_FS_NAME}-${GAME_VERSION}"
|
||||
|
||||
; Core name for each installer
|
||||
!define BASE_SETUP_KEY "base"
|
||||
!define HQCARSTRACKS_SETUP_KEY "hq-cars-and-tracks"
|
||||
!define MOREHQCARSTRACKS_SETUP_KEY "more-hq-cars-and-tracks"
|
||||
!define WIPCARSTRACKS_SETUP_KEY "wip-cars-and-tracks"
|
||||
!define UNMAINTAINED_SETUP_KEY "unmaintained"
|
||||
|
||||
; Common installer settings
|
||||
SetCompressor /SOLID lzma ; 1-block compression, smaller but longer (generation, extraction)
|
||||
;SetCompressor lzma ; A bit bigger, but faster generation and extraction
|
||||
|
||||
; Usefull libs.
|
||||
!include "LogicLib.nsh"
|
||||
|
||||
; Common MUI Settings
|
||||
!include "MUI.nsh" ; TODO: Move to MUI2
|
||||
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_HEADERIMAGE_BITMAP "${BUILD_INST_DIR}\data\data\img\header.bmp"
|
||||
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP "${BUILD_INST_DIR}\data\data\img\header-vert.bmp"
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
|
||||
!define MUI_ICON "${BUILD_INST_DIR}\data\data\icons\icon.ico"
|
||||
!define MUI_UNICON "${BUILD_INST_DIR}\data\data\icons\icon.ico"
|
||||
|
||||
!define MUI_LICENSEPAGE_CHECKBOX
|
||||
|
||||
; StrLoc function ===========================================================
|
||||
; This function outputs the relative index position from the start or end of a string,
|
||||
; where a substring is located.
|
||||
; Adapted from StrLoc 2.0 by Diego Pedroso (http://nsis.sourceforge.net/StrLoc)
|
||||
|
||||
!define StrLoc "!insertmacro _StrLoc"
|
||||
|
||||
!macro _StrLoc Result String SubString StartPoint
|
||||
Push `${String}`
|
||||
Push `${SubString}`
|
||||
Push `${StartPoint}`
|
||||
Call StrLoc
|
||||
Pop `${Result}`
|
||||
!macroend
|
||||
|
||||
Function StrLoc
|
||||
|
||||
;Get arguments from the stack
|
||||
Exch $R0 ; R0 : StartPoint
|
||||
Exch 1
|
||||
Exch $R1 ; R1 : SubString
|
||||
Exch 2
|
||||
Exch $R2 ; R2 : String
|
||||
Push $R3
|
||||
Push $R4
|
||||
Push $R5
|
||||
Push $R6
|
||||
|
||||
;Get "String" and "SubString" length
|
||||
StrLen $R3 $R1 ; R3 : SubStringLen
|
||||
StrLen $R4 $R2 ; R4 : StringLen
|
||||
|
||||
;Start "StartCharPos" counter
|
||||
StrCpy $R5 0 ; R5 : StartCharPos
|
||||
|
||||
;Loop until "SubString" is found or "String" reaches its end
|
||||
${Do}
|
||||
|
||||
;Remove everything before and after the searched part ("TempStr")
|
||||
StrCpy $R6 $R2 $R3 $R5 ; R6 : TmpString
|
||||
|
||||
;Compare "TempStr" with "SubString"
|
||||
${If} $R6 == $R1
|
||||
${If} $R0 == "<"
|
||||
IntOp $R6 $R3 + $R5
|
||||
IntOp $R0 $R4 - $R6
|
||||
${Else}
|
||||
StrCpy $R0 $R5
|
||||
${EndIf}
|
||||
${ExitDo}
|
||||
${EndIf}
|
||||
;If not "SubString", this could be "String"'s end
|
||||
${If} $R5 >= $R4
|
||||
StrCpy $R0 ""
|
||||
${ExitDo}
|
||||
${EndIf}
|
||||
;If not, continue the loop
|
||||
IntOp $R5 $R5 + 1
|
||||
${Loop}
|
||||
|
||||
;Return
|
||||
Pop $R6
|
||||
Pop $R5
|
||||
Pop $R4
|
||||
Pop $R3
|
||||
Pop $R2
|
||||
Exch
|
||||
Pop $R1
|
||||
Exch $R0
|
||||
|
||||
FunctionEnd
|
||||
|
||||
; Parse the given SF.net download page ========================================
|
||||
; and retrieve the URL of the target file on the default (auto-select) mirror.
|
||||
!define GetAutoSelectMirrorURL "!insertmacro _GetAutoSelectMirrorURL"
|
||||
|
||||
!macro _GetAutoSelectMirrorURL ResultURL HTMLFile
|
||||
Push "${HTMLFile}"
|
||||
Call GetAutoSelectMirrorURL
|
||||
Pop "${ResultURL}"
|
||||
!macroend
|
||||
|
||||
Function GetAutoSelectMirrorURL
|
||||
|
||||
;Get arguments from the stack
|
||||
Exch $R0 ; R0 : HTMLFile
|
||||
Push $R1
|
||||
Push $R2
|
||||
Push $R3
|
||||
Push $R4
|
||||
Push $R5
|
||||
|
||||
;DetailPrint "GetAutoSelectMirrorURL:"
|
||||
;DetailPrint " HTMLFile='$R0' ..."
|
||||
|
||||
StrCpy $R2 "" ; R2 : ResultURL
|
||||
|
||||
ClearErrors
|
||||
FileOpen $R1 $R0 r ; R1 : FileHdle
|
||||
IfErrors Done
|
||||
|
||||
;DetailPrint " File open ..."
|
||||
|
||||
StrCpy $R3 "" ; R3 : Line
|
||||
|
||||
${Do}
|
||||
|
||||
ClearErrors
|
||||
StrCpy $R4 $R3 ; R4 : PrevLine
|
||||
FileRead $R1 $R3
|
||||
IfErrors DoneRead
|
||||
|
||||
;DetailPrint " Line read ..."
|
||||
;DetailPrint " '$R3'"
|
||||
|
||||
${StrLoc} $R5 $R3 "direct link</a>, or try another" 0 ; R5 : StringPos
|
||||
;DetailPrint "Found direct link ? $R5"
|
||||
${If} $R5 != ""
|
||||
${StrLoc} $R5 $R4 "<a href=" 0
|
||||
;DetailPrint "Found href in '$R4' ? $R5"
|
||||
;DetailPrint "(in '$R4')"
|
||||
${If} $R5 != ""
|
||||
${StrLoc} $R5 $R4 '"' 0 ; First " in '<a href="..."'
|
||||
;DetailPrint "Found 1st $\" ? $R5"
|
||||
;DetailPrint "(in '$R4')"
|
||||
IntOp $R5 $R5 + 1
|
||||
StrCpy $R2 $R4 200 $R5
|
||||
${StrLoc} $R5 $R2 '"' 0 ; Last " in '<a href="..."'
|
||||
;DetailPrint "Found 1st $\" ? $R5"
|
||||
;DetailPrint "(in '$R2')"
|
||||
StrCpy $R2 $R2 $R5
|
||||
;DetailPrint "Result='$R2'"
|
||||
${ExitDo}
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
${Loop}
|
||||
|
||||
DoneRead:
|
||||
FileClose $R1
|
||||
|
||||
Done:
|
||||
|
||||
; Return
|
||||
StrCpy $R0 $R2 ; R0 : ResultURL
|
||||
Pop $R5
|
||||
Pop $R4
|
||||
Pop $R3
|
||||
Pop $R2
|
||||
Pop $R1
|
||||
Exch $R0 ;Mirror URL found (empty if not found)
|
||||
|
||||
FunctionEnd
|
||||
|
||||
; Download a file from SF.net using the default mirror =========================
|
||||
; ${Status} = "success" on success, or else "<error message>"
|
||||
!define DownloadFromSFNet "!insertmacro _DownloadFromSFNet"
|
||||
|
||||
!macro _DownloadFromSFNet StatusVar SourceURL TargetPathName
|
||||
Push "${SourceURL}"
|
||||
Push "${TargetPathName}"
|
||||
Call DownloadFromSFNet
|
||||
Pop "${StatusVar}"
|
||||
!macroend
|
||||
|
||||
Function DownloadFromSFNet
|
||||
|
||||
;Get arguments from the stack
|
||||
Exch $R0 ; R0 : TargetPathName
|
||||
Exch 1
|
||||
Exch $R1 ; R1 : SourceURL
|
||||
Push $R2
|
||||
Push $R3
|
||||
Push $R4
|
||||
|
||||
StrCpy $R2 $R0 ; R2 : TargetPathName
|
||||
|
||||
StrCpy $R3 "success" ; R3 : Status
|
||||
|
||||
DetailPrint "1) Downloading default mirror URL (auto-selected by SF.net) ..."
|
||||
inetc::get "$R1" "$R2.html" /end
|
||||
Pop $R0
|
||||
${If} $R0 != "OK"
|
||||
|
||||
${If} $R0 == "cancel"
|
||||
StrCpy $R3 "Mirror selection page download was cancelled"
|
||||
DetailPrint "... cancelled."
|
||||
${Else}
|
||||
StrCpy $R3 "Mirror selection page download failed$\n($R0)"
|
||||
DetailPrint "... failed."
|
||||
${EndIf}
|
||||
MessageBox MB_OK|MB_ICONSTOP "$R3"
|
||||
|
||||
${Else}
|
||||
|
||||
${GetAutoSelectMirrorURL} $R4 $R2.html ; R4 : RealURL
|
||||
;DetailPrint " File='$R2.html' ..."
|
||||
;DetailPrint " URL='$R4' ..."
|
||||
|
||||
${If} $R4 == ""
|
||||
|
||||
StrCpy $R3 "Failed to get file URL on default mirror$\nfrom $R1"
|
||||
MessageBox MB_OK|MB_ICONSTOP "$R3"
|
||||
DetailPrint "... failed to extract default mirror URL."
|
||||
|
||||
${Else}
|
||||
|
||||
DetailPrint "2) Downloading file from $R4 ..."
|
||||
inetc::get "$R4" "$R2" /end
|
||||
Pop $R0
|
||||
${If} $R0 != "OK"
|
||||
|
||||
${If} $R0 == "cancel"
|
||||
StrCpy $R3 "File download was cancelled"
|
||||
DetailPrint "... cancelled."
|
||||
${Else}
|
||||
StrCpy $R3 "Failed to download file$\nfrom $R4$\n($R0)"
|
||||
DetailPrint "... failed."
|
||||
${EndIf}
|
||||
Delete "$R2"
|
||||
MessageBox MB_OK|MB_ICONSTOP "$R3"
|
||||
|
||||
${Else}
|
||||
|
||||
DetailPrint "3) Done in $R2."
|
||||
|
||||
${EndIf}
|
||||
|
||||
${EndIf}
|
||||
|
||||
${EndIf}
|
||||
|
||||
Delete "$R2.html"
|
||||
|
||||
; Return
|
||||
StrCpy $R0 $R3 ; R0 : Status
|
||||
Pop $R4
|
||||
Pop $R3
|
||||
Pop $R2
|
||||
Pop $R1
|
||||
Exch $R0 ; "success" on success, or else "<error message>"
|
||||
|
||||
FunctionEnd
|
||||
|
||||
|
||||
!macro DownloadPackageIfNeededAndThenInstall PackageFileName PackageTitle PackageSizeMb
|
||||
|
||||
; Check if the target installer file is already here, next to the current one.
|
||||
${IfNot} ${FileExists} "$EXEDIR\${PackageFileName}"
|
||||
|
||||
; If not, ask the user if he really wants to download.
|
||||
MessageBox MB_OKCANCEL|MB_ICONQUESTION "${PackageFileName} not found$\nnext to $EXEFILE on your disk.$\n$\nClick OK to download it from ${GAME_DOWNLOAD_URL},$\nor Cancel to skip.$\n$\nNote: This might take several minutes, as it's about ${PackageSizeMb} megabytes." IDCANCEL SkipDownload
|
||||
|
||||
; Download
|
||||
DetailPrint "Downloading ${PackageTitle} ..."
|
||||
${DownloadFromSFNet} $0 "${GAME_DOWNLOAD_URL}/${PackageFileName}" "$EXEDIR\${PackageFileName}"
|
||||
|
||||
${If} $0 != "success"
|
||||
|
||||
MessageBox MB_OK|MB_ICONSTOP "Skipping installation of ${PackageTitle}."
|
||||
|
||||
SetAutoClose false
|
||||
|
||||
Return
|
||||
|
||||
${EndIf}
|
||||
|
||||
${EndIf}
|
||||
|
||||
DetailPrint "Installing ${PackageTitle} ..."
|
||||
ExecWait '$EXEDIR\${PackageFileName}' $0
|
||||
DetailPrint "Done (exit code $0)."
|
||||
${If} $0 != "0"
|
||||
SetAutoClose false
|
||||
${EndIf}
|
||||
|
||||
Return
|
||||
|
||||
SkipDownload:
|
||||
|
||||
DetailPrint "Skipping installation of ${PackageTitle} on user's request."
|
||||
|
||||
!macroend
|
||||
|
||||
!macro CheckIfBasePackageInstalled
|
||||
|
||||
; Check if the base package is installed and OK, and abort if not.
|
||||
ReadRegStr $R0 ${GAME_ROOT_REGKEY} "${GAME_DIR_REGKEY}" ""
|
||||
${If} $R0 == ""
|
||||
MessageBox MB_OK|MB_ICONSTOP "No base package found for ${GAME_NAME}$\n$\nPlease, first download and run ${GAME_SHORT_FS_NAME}-${BASE_SETUP_KEY}-${GAME_LONG_VERSION}-win32-setup.exe$\nfrom ${GAME_DOWNLOAD_URL}"
|
||||
Abort
|
||||
${EndIf}
|
||||
|
||||
${If} ${FileExists} "$R0\bin\${GAME_FS_NAME}.exe"
|
||||
Nop
|
||||
${Else}
|
||||
MessageBox MB_OK|MB_ICONSTOP "A base package for ${GAME_NAME} was found, but it is no more usable and/or corrupted$\n$\nPlease, first (download and) run again ${GAME_SHORT_FS_NAME}-${BASE_SETUP_KEY}-${GAME_LONG_VERSION}-win32-setup.exe$\nfrom ${GAME_DOWNLOAD_URL}"
|
||||
Abort
|
||||
${EndIf}
|
||||
|
||||
!macroend
|
Loading…
Reference in a new issue