From 2a2bdb3cb560449126bcb2f321b6e737e530ba63 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 10 Aug 2003 03:19:16 +0000 Subject: [PATCH] Move branding and version strings for program and installer into ProductInfo.inc/h. This will make it easier to keep version the information up to date. --- stepmania/src/ProductInfo.h | 6 ++++++ stepmania/src/ProductInfo.inc | 10 ++++++++++ stepmania/src/ScreenTitleMenu.cpp | 3 ++- stepmania/stepmania.nsi | 22 ++++++++-------------- 4 files changed, 26 insertions(+), 15 deletions(-) create mode 100644 stepmania/src/ProductInfo.h create mode 100644 stepmania/src/ProductInfo.inc diff --git a/stepmania/src/ProductInfo.h b/stepmania/src/ProductInfo.h new file mode 100644 index 0000000000..af480c548f --- /dev/null +++ b/stepmania/src/ProductInfo.h @@ -0,0 +1,6 @@ +// Currently, used only by the title screen. +// Don't forget to also change ProductInfo.nsinc! + +#define PRODUCT_NAME "StepMania" +#define PRODUCT_VER "3.9 alpha 2" +#define PRODUCT_NAME_VER PRODUCT_NAME " " PRODUCT_VER \ No newline at end of file diff --git a/stepmania/src/ProductInfo.inc b/stepmania/src/ProductInfo.inc new file mode 100644 index 0000000000..078c04a7dd --- /dev/null +++ b/stepmania/src/ProductInfo.inc @@ -0,0 +1,10 @@ +; Included by the NSIS installer script +; Don't forget to also change ProductInfo.h! + +!define PRODUCT_NAME "StepMania" +!define PRODUCT_VER "3.9 alpha 2" +!define PRODUCT_NAME_VER "${PRODUCT_NAME} ${PRODUCT_VER}" + +; String used for the install directory and registry locations +; Official releases = "StepMania"; intermediate releases = "StepMania CVS". +!define PRODUCT_ID "StepMania CVS" diff --git a/stepmania/src/ScreenTitleMenu.cpp b/stepmania/src/ScreenTitleMenu.cpp index 253c39daaf..db1497320b 100644 --- a/stepmania/src/ScreenTitleMenu.cpp +++ b/stepmania/src/ScreenTitleMenu.cpp @@ -29,6 +29,7 @@ #include "CodeDetector.h" #include "RageTextureManager.h" #include "UnlockSystem.h" +#include "ProductInfo.h" #define LOGO_ON_COMMAND THEME->GetMetric("ScreenTitleMenu","LogoOnCommand") @@ -79,7 +80,7 @@ ScreenTitleMenu::ScreenTitleMenu() : Screen("ScreenTitleMenu") m_textVersion.LoadFromFont( THEME->GetPathToF("Common normal") ); m_textVersion.Command( VERSION_ON_COMMAND ); - m_textVersion.SetText( "CVS" ); + m_textVersion.SetText( PRODUCT_VER ); this->AddChild( &m_textVersion ); diff --git a/stepmania/stepmania.nsi b/stepmania/stepmania.nsi index 9af8b40d9b..e483e82875 100644 --- a/stepmania/stepmania.nsi +++ b/stepmania/stepmania.nsi @@ -4,19 +4,14 @@ ; I use the following command to create the installer: ; D:\Program Files\NSIS>makensis.exe /v3 /cd "m:\Dev Projects\CVS\stepmania\stepmania.nsi" ; -; NOTE: this .NSI script is designed for NSIS v1.8+ +; NOTE: this .NSI script is designed for NSIS v2.0+ -; Don't change this. -!define PRODUCT_NAME "StepMania" -!define VERSION "CVS" -; !define VERSION "3.01" - -; If this is changed, different versions of SM can be installed -; in parallel. Normal releases should be StepMania; CVS releases -; should be StepMania CVS. -!define PRODUCT_ID "StepMania CVS" -!define PRODUCT_NAME_VER "${PRODUCT_NAME} ${VERSION}" +; Product info is in a separate file so that people will change +; the version info for the installer and the program at the same time. +; It's confusing when the installer and shortcut text doesn't match the +; title screen version text. +!include "src\ProductInfo.inc" !system "echo This may take a moment ..." ignore !system "utils\upx StepMania.exe" ignore @@ -27,9 +22,8 @@ !system "utils\upx SDL.dll" ignore !system "utils\upx SDL_image.dll" ignore -Name "${PRODUCT_NAME}" -OutFile "StepMania-CVS-20030715a.exe" -;OutFile "StepMania301.exe" +Name "${PRODUCT_NAME_VER}" +OutFile "${PRODUCT_NAME_VER}.exe" ; Some default compiler settings (uncomment and change at will): SetCompress auto ; (can be off or force)