Added CPPFLAGS to windres
Moved version information from src/include/stratagus.h to src/include/version.h Added Lua function GetStratagusVersion() which return Stratagus Version (C Macro VERSION) Added Lua function GetStratagusHomepage() which return Stratagus Homepage (C Macro HOMEPAGE) Added VersionInfo to Windows Resource file for stratagus.exe Fixed VersionInfo in Windows NSIS Installer Added support for playlist music in menu too (before only supported in running game)
This commit is contained in:
parent
e3fd2f70c8
commit
499d5ffc13
10 changed files with 121 additions and 30 deletions
2
Makefile
2
Makefile
|
@ -110,7 +110,7 @@ strip:
|
|||
|
||||
src/$(OBJDIR)/stratagusrc.o: src/stratagus.rc
|
||||
if [ ! -d src/$(OBJDIR) ]; then mkdir src/$(OBJDIR); fi
|
||||
cd src; $(WINDRES) -o $(OBJDIR)/stratagusrc.o stratagus.rc; cd ..
|
||||
cd src; $(WINDRES) $(CPPFLAGS) -o $(OBJDIR)/stratagusrc.o stratagus.rc; cd ..
|
||||
|
||||
clean::
|
||||
$(RM) -r $(OBJ)
|
||||
|
|
2
debian/control
vendored
2
debian/control
vendored
|
@ -31,8 +31,8 @@ Description: Strategy Gaming Engine
|
|||
.
|
||||
Games which use Stratagus:
|
||||
* Wargus - Warcraft II - https://launchpad.net/wargus
|
||||
* War1gus - Warcraft I - https://launchpad.net/war1gus
|
||||
* Stargus - Starcraft I - https://launchpad.net/stargus
|
||||
* War1gus - Warcraft I - https://launchpad.net/war1gus
|
||||
.
|
||||
This package provides no game and no game data set. This is only engine.
|
||||
To play one of game, install package wargus, war1gus or stargus.
|
||||
|
|
|
@ -177,7 +177,7 @@ static FullReplay *StartReplay(void)
|
|||
}
|
||||
|
||||
replay->Comment1 = "Generated by Stratagus Version " VERSION "";
|
||||
replay->Comment2 = "Visit https://launchpad.net/stratagus for more information";
|
||||
replay->Comment2 = "Visit " HOMEPAGE " for more information";
|
||||
|
||||
if (GameSettings.NetGameType == SettingsSinglePlayerGame) {
|
||||
replay->Type = ReplaySinglePlayer;
|
||||
|
|
|
@ -169,25 +169,7 @@ inline char *new_strdup(const char *str)
|
|||
-- General
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#define VERSION "2.2.5.2" /// Engine version shown
|
||||
|
||||
#ifndef StratagusMajorVerion
|
||||
/// Stratagus major version
|
||||
#define StratagusMajorVersion 2
|
||||
/// Stratagus minor version (maximal 99)
|
||||
#define StratagusMinorVersion 2
|
||||
/// Stratagus patch level (maximal 99)
|
||||
#define StratagusPatchLevel 5
|
||||
/// Stratagus version (1,2,3) -> 10203
|
||||
#define StratagusVersion \
|
||||
(StratagusMajorVersion * 10000 + StratagusMinorVersion * 100 \
|
||||
+ StratagusPatchLevel)
|
||||
|
||||
/// Stratagus printf format string
|
||||
#define StratagusFormatString "%d.%d.%d"
|
||||
/// Stratagus printf format arguments
|
||||
#define StratagusFormatArgs(v) (v) / 10000, ((v) / 100) % 100, (v) % 100
|
||||
#endif
|
||||
#include "version.h"
|
||||
|
||||
/// Text string: Name, Version, Copyright
|
||||
extern const char NameLine[];
|
||||
|
|
42
src/include/version.h
Normal file
42
src/include/version.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
/// Name
|
||||
#ifdef _WIN64
|
||||
#define NAME "Stratagus (64 bit)"
|
||||
#else
|
||||
#define NAME "Stratagus"
|
||||
#endif
|
||||
|
||||
// Description
|
||||
#define DESCRIPTION NAME " - Strategy Gaming Engine"
|
||||
|
||||
/// Engine version shown
|
||||
#define VERSION "2.2.5.2"
|
||||
|
||||
/// Stratagus major version
|
||||
#define StratagusMajorVersion 2
|
||||
|
||||
/// Stratagus minor version (maximal 99)
|
||||
#define StratagusMinorVersion 2
|
||||
|
||||
/// Stratagus patch level (maximal 99)
|
||||
#define StratagusPatchLevel 5
|
||||
|
||||
/// Stratagus patch level 2
|
||||
#define StratagusPatchLevel2 2
|
||||
|
||||
/// Stratagus version (1,2,3) -> 10203
|
||||
#define StratagusVersion (StratagusMajorVersion * 10000 + StratagusMinorVersion * 100 + StratagusPatchLevel)
|
||||
|
||||
/// Stratagus printf format string
|
||||
#define StratagusFormatString "%d.%d.%d"
|
||||
|
||||
/// Stratagus printf format arguments
|
||||
#define StratagusFormatArgs(v) (v) / 10000, ((v) / 100) % 100, (v) % 100
|
||||
|
||||
/// Homepage
|
||||
#define HOMEPAGE "https://launchpad.net/stratagus"
|
||||
|
||||
/// License
|
||||
#define LICENSE "GPL v2"
|
||||
|
||||
/// Copyright
|
||||
#define COPYRIGHT "Copyright (c) 1998-2010 by The Stratagus Project and Pali Rohar"
|
|
@ -1 +1,35 @@
|
|||
ICN_INSTALL ICON "../contrib/stratagus.ico"
|
||||
#include "include/version.h"
|
||||
|
||||
1 ICON "../contrib/stratagus.ico"
|
||||
1 VERSIONINFO
|
||||
FILEVERSION StratagusMajorVersion,StratagusMinorVersion,StratagusPatchLevel,StratagusPatchLevel2
|
||||
PRODUCTVERSION StratagusMajorVersion,StratagusMinorVersion,StratagusPatchLevel,StratagusPatchLevel2
|
||||
FILEOS 4
|
||||
FILETYPE 1
|
||||
|
||||
#ifdef DEBUG
|
||||
FILEFLAGS 0
|
||||
#endif
|
||||
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
BEGIN
|
||||
VALUE "FileDescription", DESCRIPTION
|
||||
VALUE "FileVersion", VERSION
|
||||
VALUE "InternalName", NAME
|
||||
VALUE "LegalCopyright", COPYRIGHT
|
||||
VALUE "License", LICENSE
|
||||
VALUE "Homepage", HOMEPAGE
|
||||
VALUE "OriginalFilename", "stratagus.exe"
|
||||
VALUE "ProductName", NAME
|
||||
VALUE "ProductVersion", VERSION
|
||||
END
|
||||
END
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
||||
|
|
|
@ -317,6 +317,26 @@ int LuaLoadFile(const std::string &file)
|
|||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
** Get Stratagus Version
|
||||
*/
|
||||
static int CclGetStratagusVersion(lua_State *l)
|
||||
{
|
||||
LuaCheckArgs(l, 0);
|
||||
lua_pushstring(l, VERSION);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
** Get Stratagus Homepage
|
||||
*/
|
||||
static int CclGetStratagusHomepage(lua_State *l)
|
||||
{
|
||||
LuaCheckArgs(l, 0);
|
||||
lua_pushstring(l, HOMEPAGE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
** Get the directory of the current lua file
|
||||
*/
|
||||
|
@ -2430,6 +2450,9 @@ void InitCcl(void)
|
|||
lua_register(Lua, "GetCurrentLuaPath", CclGetCurrentLuaPath);
|
||||
lua_register(Lua, "SavedGameInfo", CclSavedGameInfo);
|
||||
|
||||
lua_register(Lua, "GetStratagusVersion", CclGetStratagusVersion);
|
||||
lua_register(Lua, "GetStratagusHomepage", CclGetStratagusHomepage);
|
||||
|
||||
AliasRegister();
|
||||
ReplayCclRegister();
|
||||
IconCclRegister();
|
||||
|
|
|
@ -249,7 +249,7 @@ std::string LocalPlayerName; /// Name of local player
|
|||
|
||||
/// Name, Version, Copyright
|
||||
const char NameLine[] =
|
||||
"Stratagus V" VERSION ", (c) 1998-2010 by The Stratagus Project.";
|
||||
NAME " V" VERSION ", " COPYRIGHT;
|
||||
|
||||
std::string CliMapName; /// Filename of the map given on the command line
|
||||
std::string CompileOptions; /// Compile options.
|
||||
|
@ -542,7 +542,7 @@ static void PrintHeader(void)
|
|||
"%s\n written by Lutz Sammer, Fabrice Rossi, Vladi Shabanski, Patrice Fortier,\n"
|
||||
" Jon Gabrielson, Andreas Arens, Nehal Mistry, Jimmy Salmon, Pali Rohar,\n"
|
||||
" and others.\n"
|
||||
"\thttps://launchpad.net/stratagus\n"
|
||||
"\t" HOMEPAGE "\n"
|
||||
"Compile options %s",
|
||||
NameLine, CompileOptions.c_str());
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "network.h"
|
||||
#include "netconnect.h"
|
||||
#include "editor.h"
|
||||
#include "sound.h"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
-- Variables
|
||||
|
@ -1499,6 +1500,8 @@ int MenuScreen::run(bool loop)
|
|||
GameCursor = UI.Point.Cursor;
|
||||
CursorOn = CursorOnUnknown;
|
||||
|
||||
CallbackMusicOn();
|
||||
|
||||
if (loop) {
|
||||
const EventCallback *old_callbacks = GetCallbacks();
|
||||
SetCallbacks(&GuichanCallbacks);
|
||||
|
@ -1508,6 +1511,7 @@ int MenuScreen::run(bool loop)
|
|||
UpdateDisplay();
|
||||
RealizeVideoMemory();
|
||||
}
|
||||
CheckMusicFinished();
|
||||
WaitEventsOneFrame();
|
||||
}
|
||||
SetCallbacks(old_callbacks);
|
||||
|
|
|
@ -23,6 +23,9 @@
|
|||
|
||||
!define NAME "Stratagus"
|
||||
!define VERSION "2.2.5.2"
|
||||
!define HOMEPAGE "https://launchpad.net/stratagus"
|
||||
!define LICENSE "GPL v2"
|
||||
!define COPYRIGHT "Copyright (c) 1998-2010 by The Stratagus Project and Pali Rohar"
|
||||
|
||||
;--------------------------------
|
||||
|
||||
|
@ -31,8 +34,6 @@
|
|||
!define UNINSTALL "uninstall.exe"
|
||||
!define INSTALLER "${NAME}-${VERSION}.exe"
|
||||
!define INSTALLDIR "$PROGRAMFILES\${NAME}\"
|
||||
!define HOMEPAGE "https://launchpad.net/stratagus"
|
||||
!define COPYRIGHT "Copyright © 1998-2010 by The Stratagus Project and Pali Rohar"
|
||||
!define LANGUAGE "English"
|
||||
|
||||
!ifdef AMD64
|
||||
|
@ -87,10 +88,15 @@ OutFile "${INSTALLER}"
|
|||
InstallDir "${INSTALLDIR}"
|
||||
InstallDirRegKey HKLM "${REGKEY}" "InstallLocation"
|
||||
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${NAME}"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "${COPYRIGHT}"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${NAME}"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${NAME} Installer - Strategy Gaming Engine"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VERSION}"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "InternalName" "${NAME} Installer"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "${COPYRIGHT}"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "License" "${LICENSE}"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "Homepage" "${HOMEPAGE}"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "OriginalFilename" "${INSTALLER}"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${NAME} Installer"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${VERSION}"
|
||||
VIProductVersion "${VERSION}"
|
||||
|
||||
BrandingText "${NAME} - ${VERSION} ${HOMEPAGE}"
|
||||
|
|
Loading…
Add table
Reference in a new issue