Merge pull request #6 from filux/filux-attr

Game is even more cross platform2.
This commit is contained in:
filux 2014-01-26 23:34:05 -08:00
commit b45c9dcdb1
23 changed files with 1408 additions and 1516 deletions

20
.gitattributes vendored
View File

@ -1,9 +1,15 @@
* text=auto * text=auto
*.bat -text *.bat eol=crlf
*.vcproj -text *.vcproj eol=crlf
*.nsi -text *.nsi eol=crlf
*.sln -text *.sln eol=crlf
*.vbs -text *.vbs eol=crlf
*.txt eol=crlf
CMake*.txt eol=lf
version.txt eol=lf
VERSION.txt eol=lf
robots.txt eol=lf
*.ttc -text -diff *.ttc -text -diff
*.ttf -text -diff *.ttf -text -diff
@ -27,6 +33,8 @@
*.xcf -text -diff *.xcf -text -diff
*.blend -text -diff *.blend -text -diff
*.blend1 -text -diff *.blend1 -text -diff
.gitattributes export-ignore
.git export-ignore
.gitignore export-ignore .gitignore export-ignore
.gitattributes export-ignore
.gitmodules export-ignore .gitmodules export-ignore

35
.gitignore vendored
View File

@ -6,17 +6,16 @@
# Vim # Vim
*.un~ *.un~
Session.vim Session.vim
MegaGlest.kdev4 # KDevelop
/mk/linux/mydata *.kdev4
/mk/linux/release # Meld
/mk/linux/linux_symbols *.orig
/mk/linux/core
/mk/linux/core.bak
## OSX ## OSX
Icon Icon
## Windows ## Windows
*.old
# Windows image file caches # Windows image file caches
Thumbs.db Thumbs.db
thumbs.db thumbs.db
@ -55,26 +54,8 @@ $RECYCLE.BIN/
## Repo ## Repo
*.blend *.blend
*.blend1 *.blend1
# Linux_build
/mk/linux/build/
/google-breakpad
/mk/linux/megaglest.6
# Windows_build
*.dll
*.exe
*.pdb
*.exp
*.lib
*.map
*.dmp
*.dat
/data/glest_game/lua/
#
/source/windows_deps_2012 /google-breakpad/
/source/windows_deps_2010
/source/windows_deps_2010_old
# Coverity # convert_faction_xml2html
/cov-int /html/
/cov-int/.*

@ -1 +1 @@
Subproject commit aec11c737122384e87957f287ea00314d5523eb2 Subproject commit 8e0dc1b0a3f856da10fb66e3b703e79f86a78b18

View File

@ -9,7 +9,8 @@ v3.9.1
- Many bug fixes as reported on the forums since 3.9.0 - Many bug fixes as reported on the forums since 3.9.0
- Moved the project from sourceforge.net to github.com and from subversion to git - Moved the project from sourceforge.net to github.com and from subversion to git
- Better handling of lagging clients in network games - Better handling of lagging clients in network games
- Fixed cmake scripts to correctly detect dependencies that were previously partially working on some distros and improved build support for Mac OS X - Fixed cmake scripts to correctly detect dependencies that were previously partially
working on some distros and improved build support for Mac OS X
- Added numerous new LUA functions as documented at http://wiki.megaglest.org - Added numerous new LUA functions as documented at http://wiki.megaglest.org
- Code quality improvements as reported by cppcheck and coverity (and clang) - Code quality improvements as reported by cppcheck and coverity (and clang)
- Better color picking algorithm thanks to willvarfar makes color picking very stable - Better color picking algorithm thanks to willvarfar makes color picking very stable
@ -21,7 +22,8 @@ v3.9.0
- we hopefully now really solved the last out of sync problems for cross platform games. - we hopefully now really solved the last out of sync problems for cross platform games.
- animated tileset object support. - animated tileset object support.
- new tileset texturing possibilities - new tileset texturing possibilities
- new tilesets birchforest, desert4 and updated mediterran using animated objects and new texture system - new tilesets birchforest, desert4 and updated mediterran using animated objects and
new texture system
- greatly improved textures and animations for the roman faction - greatly improved textures and animations for the roman faction
- new maps - new maps
- better network game performance / management to handle slower clients. - better network game performance / management to handle slower clients.
@ -55,23 +57,30 @@ v3.7.0
- auto word wrapping for message boxes - auto word wrapping for message boxes
- headless server can run in local lan mode (does not broadcast to master server) - headless server can run in local lan mode (does not broadcast to master server)
- Added lua security sandbox - Added lua security sandbox
- third person view allows you to follow a selected unit. Select one unit anf press f4 to enable (deselect anf f4 to disable). - third person view allows you to follow a selected unit. Select one unit anf press f4 to
- cell markers allow players to create markers anywhere on the map and associate a note with them. All team players see the markers. enable (deselect anf f4 to disable).
- cell markers allow players to create markers anywhere on the map and associate a note
with them. All team players see the markers.
- quick sonar signal to tell team players where the action is happening - quick sonar signal to tell team players where the action is happening
- admin player can disconnect other network players in game - admin player can disconnect other network players in game
- saving / loading games. - saving / loading games.
- when placing a new unit, we display a 'ghosted' model while units walk to the build location to show the space it will occupy - when placing a new unit, we display a 'ghosted' model while units walk to the build
location to show the space it will occupy
- video playback support (using libvlc) - video playback support (using libvlc)
- network multi-player scenarios - network multi-player scenarios
- campaign scenarios - campaign scenarios
- Integrated language translation support (translate / update your favorite language @ https://www.transifex.com/projects/p/megaglest and pull the files into the game via advanced translation options to test your changes) - Integrated language translation support (translate / update your favorite language @
https://www.transifex.com/projects/p/megaglest and pull the files into the game via
advanced translation options to test your changes)
- play a sound when player mentions your name in chat mode - play a sound when player mentions your name in chat mode
- more game data validation for commandline modders, see --help for more info - more game data validation for commandline modders, see --help for more info
- many new lua commands for scenario modders - many new lua commands for scenario modders
- enhanced AI management (logging and modding) and added more intellegence to decsions - enhanced AI management (logging and modding) and added more intellegence to decsions
- enhanced game data downloads now allow for downloading data from the mod center instead of game server if available. - enhanced game data downloads now allow for downloading data from the mod center instead
of game server if available.
- Quick keys in game lobby, SHIFT+<letter>+listbox arrow to jump to that letter in a list - Quick keys in game lobby, SHIFT+<letter>+listbox arrow to jump to that letter in a list
or Hold CTRL when clicking listbox for network control type to change all non human control values or Hold CTRL when clicking listbox for network control type to change all non human
control values
- enhanced unicode support for non-ascii characters - enhanced unicode support for non-ascii characters
- customizable unit, resource and upgrade language files - customizable unit, resource and upgrade language files
- tilesets support animated models - tilesets support animated models
@ -81,17 +90,21 @@ v3.7.0
- particle colors are now affected by the time of day - particle colors are now affected by the time of day
- new game hints are displayed while loading a new game - new game hints are displayed while loading a new game
- linked faction support (and new techtree MagiTech for classic Glest play) - linked faction support (and new techtree MagiTech for classic Glest play)
- added runtime checks to ensure cpu supports expected optimizations of the binary used (sse, x87) - added runtime checks to ensure cpu supports expected optimizations of the binary used
(sse, x87)
- lots of code cleanup from static analysis such as cppcheck and valgrind - lots of code cleanup from static analysis such as cppcheck and valgrind
- experimental big endian and non x86 architecure support (need testers to give feedback) - experimental big endian and non x86 architecure support (need testers to give feedback)
v3.6.0 v3.6.0
- bugfixes reported in the bugs forum from beta1 and 2 - bugfixes reported in the bugs forum from beta1 and 2
- iso639-1 style language loading example: megaglest --use-language=zh and auto language detect on first time launch - iso639-1 style language loading example: megaglest --use-language=zh and auto language
detect on first time launch
- new and updated translations (Greek, Japanese, Russian, Italian, Czech etc) - new and updated translations (Greek, Japanese, Russian, Italian, Czech etc)
- auto complete player names in chat mode using tab character - auto complete player names in chat mode using tab character
- customized port # override via commandline (useful for multiple headless servers) example: megaglest --use-ports=x,y (x is internal port y is external port) - customized port # override via commandline (useful for multiple headless servers) example:
- new commandline option to support standalone modes example: megaglest --load-mod=x (x is the path to the mod) megaglest --use-ports=x,y (x is internal port y is external port)
- new commandline option to support standalone modes example: megaglest --load-mod=x
(x is the path to the mod)
- new lua functions added (to be documented on the MG wiki) - new lua functions added (to be documented on the MG wiki)
- lower CPU / RAM requirements in headless server mode - lower CPU / RAM requirements in headless server mode
- attack-boosts can be named and shared for proper re-use and singleton usage. - attack-boosts can be named and shared for proper re-use and singleton usage.
@ -104,14 +117,18 @@ v3.6.0
- Ability to toggle languages anywhere in the game using CTRL-L - Ability to toggle languages anywhere in the game using CTRL-L
- Numerous bug fixes as reported in the bugs forum - Numerous bug fixes as reported in the bugs forum
- Improved Megapack including better balanced Romans faction - Improved Megapack including better balanced Romans faction
- New attack boost system (currently used by Romans faction) which allows new types of in game unit effects. - New attack boost system (currently used by Romans faction) which allows new types of
- New headless server mode allows dedicated servers to host games for network players (command line option --headless-server-mode) in game unit effects.
- Added ability to 'pause' network games by press ESC in game to show a new popup-menu with in game options. - New headless server mode allows dedicated servers to host games for network players
(command line option --headless-server-mode)
- Added ability to 'pause' network games by press ESC in game to show a new popup-menu
with in game options.
- Hosts can now set a title for their game for network games. - Hosts can now set a title for their game for network games.
- Music fades in and out of game start/stop - Music fades in and out of game start/stop
- New low food warning indicators tells players when they are running out of food - New low food warning indicators tells players when they are running out of food
- MacOSX support (thanks weltall) - MacOSX support (thanks weltall)
- Players are no longer dropped in game lobby when toggling maps (player status may show as unassigned network node if they are ina slot that is not applicable to the selected map) - Players are no longer dropped in game lobby when toggling maps (player status may show
as unassigned network node if they are ina slot that is not applicable to the selected map)
- Bugfixes for supported UPNP for auto router configuration when hosting games - Bugfixes for supported UPNP for auto router configuration when hosting games
- many more... - many more...
@ -121,21 +138,25 @@ v3.5.2
- Map editor now supports diagonal flipping - Map editor now supports diagonal flipping
- Windows users now have a shortcut to the mod folder in their MegaGlest programs Menu. - Windows users now have a shortcut to the mod folder in their MegaGlest programs Menu.
- Bug fixes including: - Bug fixes including:
- Fix corrupted g3d viewer screenshots, and automatic screenshot mode does not steal focus for Linux users - Fix corrupted g3d viewer screenshots, and automatic screenshot mode does not steal
focus for Linux users
- Proper network disconnect detection when connection drops in an abnormal way - Proper network disconnect detection when connection drops in an abnormal way
- Avoid crash when user has no soundcard installed - Avoid crash when user has no soundcard installed
- Better video handling for buggy opengl drivers that don't properly handle non power of two textures - Better video handling for buggy opengl drivers that don't properly handle non power
- Better support for non ASCII file paths (like Japanese, etc) for international users and Unicode enabled parts of the code of two textures
- Better support for non ASCII file paths (like Japanese, etc) for international users
and Unicode enabled parts of the code
3.5.1 3.5.1
- Much better pathfinder performance - Much better pathfinder performance
- Allow servers to temporary block specified network players from the game lobby - Allow servers to temporary block specified network players from the game lobby
- Better Linux distro packaing support (by default megaglest works in standard linux paths and make install added) - Better Linux distro packaing support (by default megaglest works in standard linux
- Game data cleanup (duplicate sound files have been merged in megapack) and non free content replaced. paths and make install added)
(autumn and desert tilesets) - Game data cleanup (duplicate sound files have been merged in megapack) and non free
content replaced. (autumn and desert tilesets)
- Displayed up to 15 queued commands (observers can view all players queued commands) - Displayed up to 15 queued commands (observers can view all players queued commands)
- Allow factions in a techtree to share common data using the special tag in xml files $COMMONDATAPATH - Allow factions in a techtree to share common data using the special tag in xml files
which points to the techtrees commondata/ folder. $COMMONDATAPATH which points to the techtrees commondata/ folder.
- standardized games and tools startup scripts with names starting with 'startup_' - standardized games and tools startup scripts with names starting with 'startup_'
- updated translations for German, Italian and French - updated translations for German, Italian and French
- bugfixes reported in 3.5.0 - bugfixes reported in 3.5.0
@ -158,12 +179,14 @@ v3.5.2
- Default screenshot format is now jpg (configurable in options menu) - Default screenshot format is now jpg (configurable in options menu)
- Fixed some performance problems with 'stuck' units - Fixed some performance problems with 'stuck' units
- improved resource selection - improved resource selection
- performance improvements, now make it possible to play with more units and slower hardware than before. - performance improvements, now make it possible to play with more units and slower
hardware than before.
- new maps with cliffs and higher terrain - new maps with cliffs and higher terrain
- support for sending 7z tilesets and techtrees over network - support for sending 7z tilesets and techtrees over network
- new game mod management console to download new game content or remove existing mod content - new game mod management console to download new game content or remove existing mod content
- multi-threaded pathfinding for better performance when many units are moving - multi-threaded pathfinding for better performance when many units are moving
- CPU AI player improvements (units get unstuck more often and stationary air units attack more efficiently) - CPU AI player improvements (units get unstuck more often and stationary air units
attack more efficiently)
- new tileset and resource particle support. - new tileset and resource particle support.
- added jpg screenshot support - added jpg screenshot support
- optional compressed GPU texture support - optional compressed GPU texture support
@ -175,9 +198,12 @@ v3.5.2
3.4.0 3.4.0
- new attack alarms use visual and audio cues to indicate when and where you or your team are under attack - new attack alarms use visual and audio cues to indicate when and where you or your
- new auto router configuration for Internet hosted games will auto port forward (for UPNP enabled routers) team are under attack
- new network file transfer system current allows servers to send missing maps and tilesets to clients - new auto router configuration for Internet hosted games will auto port forward (for
UPNP enabled routers)
- new network file transfer system current allows servers to send missing maps and
tilesets to clients
- new IRC client built into the Internet lobby (uses freenode's megaglest-lobby channel) - new IRC client built into the Internet lobby (uses freenode's megaglest-lobby channel)
- improved sound handling for better stability and smoother game play - improved sound handling for better stability and smoother game play
- CPU AI players now can have their resource multiplier manually changed - CPU AI players now can have their resource multiplier manually changed
@ -638,7 +664,8 @@ All versions before 3.2.2 refer to vanilla Glest
- New particle systems: fire ball and ice nova - New particle systems: fire ball and ice nova
- Damage and armor types - Damage and armor types
- Now it is possible to attack your own units - Now it is possible to attack your own units
- Now it possible to give "follow" and "attack unit" orders (using move and attack targeting a unit) - Now it possible to give "follow" and "attack unit" orders (using move and attack
targeting a unit)
0.5.2 0.5.2
- Fixed a bug in pathfinding algorithm - Fixed a bug in pathfinding algorithm
@ -657,12 +684,14 @@ All versions before 3.2.2 refer to vanilla Glest
- New 3d models for units - New 3d models for units
0.4.3 0.4.3
- Fixed a bug when double clicking two towers, one under construction and the other one built, caused the first one to finish its construction. - Fixed a bug when double clicking two towers, one under construction and the other one
built, caused the first one to finish its construction.
- Fixed a bug that made that fire never stopped when repairing buildings - Fixed a bug that made that fire never stopped when repairing buildings
- Performance counters added for world update timing - Performance counters added for world update timing
0.4.2 0.4.2
- Fixed a bug that made the game crash when right clicking outside the map and a building was selected - Fixed a bug that made the game crash when right clicking outside the map and a building
was selected
0.4.1 0.4.1
- Fixed a bug that made the game crash when canceling unit production - Fixed a bug that made the game crash when canceling unit production
@ -721,16 +750,16 @@ All versions before 3.2.2 refer to vanilla Glest
- Lots of bug fixes. - Lots of bug fixes.
0.1.6 0.1.6
- Unit models have been redesigned, now they have more polygons and detailed animations. - Unit models have been redesigned, now they have more polygons and detailed animations.
- Minor bug fixes. - Minor bug fixes.
The following earlier versions have been released, but no changelog is available: The following earlier versions have been released, but no changelog is available:
0.1.5 0.1.5
0.1.4 0.1.4
0.1.3 0.1.3
0.1.2 0.1.2
0.1.1 0.1.1
0.1.0 0.1.0
0.0.3 0.0.3
0.0.2 0.0.2
0.0.1 0.0.1

View File

@ -43,9 +43,11 @@ included in the Glest Game setup package is copyrighted by the Glest Team.
Copyright (C) 2001-2009 The Glest Team. All rights reserved. Copyright (C) 2001-2009 The Glest Team. All rights reserved.
This software is provided without any express or implied warranty. In no event shall the author be held liable for any damages arising from the use of this software. This software is provided without any express or implied warranty. In no event shall the
author be held liable for any damages arising from the use of this software.
This software may be redistributed freely, but all redistributions must retain all occurences of the above copyright notice and web site addresses that are currently in place. This software may be redistributed freely, but all redistributions must retain all
occurences of the above copyright notice and web site addresses that are currently in place.
email: contact_game@glest.org email: contact_game@glest.org

Binary file not shown.

28
mk/linux/.gitignore vendored
View File

@ -1,16 +1,20 @@
megaglest megaglest
megaglest.6
megaglest_* megaglest_*
lib !*.desktop
lib/
mojosetup/build core
mojosetup/build/ core.bak
mojosetup/cmake-build
mojosetup/cmake-build/ /build/
mojosetup/megaglest-installer/MegaGlest* /release/
mojosetup/megaglest-installer/data /linux_symbols/
mojosetup/megaglest-installer/data/ /mydata
/lib/
/lib_bkp/
# Coverity # Coverity
cov-analysis*/ /cov-analysis*/
cov-int /cov-int
cov-int/

2
mk/linux/mojosetup/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/build
/cmake-build

View File

@ -1,28 +1,28 @@
@rem Script to build Lua under "Visual Studio .NET Command Prompt". @rem Script to build Lua under "Visual Studio .NET Command Prompt".
@rem Do not run from this directory; run it from the toplevel: etc\luavs.bat . @rem Do not run from this directory; run it from the toplevel: etc\luavs.bat .
@rem It creates lua51.dll, lua51.lib, lua.exe, and luac.exe in src. @rem It creates lua51.dll, lua51.lib, lua.exe, and luac.exe in src.
@rem (contributed by David Manura and Mike Pall) @rem (contributed by David Manura and Mike Pall)
@setlocal @setlocal
@set MYCOMPILE=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE @set MYCOMPILE=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE
@set MYLINK=link /nologo @set MYLINK=link /nologo
@set MYMT=mt /nologo @set MYMT=mt /nologo
cd src cd src
%MYCOMPILE% /DLUA_BUILD_AS_DLL l*.c %MYCOMPILE% /DLUA_BUILD_AS_DLL l*.c
del lua.obj luac.obj del lua.obj luac.obj
%MYLINK% /DLL /out:lua51.dll l*.obj %MYLINK% /DLL /out:lua51.dll l*.obj
if exist lua51.dll.manifest^ if exist lua51.dll.manifest^
%MYMT% -manifest lua51.dll.manifest -outputresource:lua51.dll;2 %MYMT% -manifest lua51.dll.manifest -outputresource:lua51.dll;2
%MYCOMPILE% /DLUA_BUILD_AS_DLL lua.c %MYCOMPILE% /DLUA_BUILD_AS_DLL lua.c
%MYLINK% /out:lua.exe lua.obj lua51.lib %MYLINK% /out:lua.exe lua.obj lua51.lib
if exist lua.exe.manifest^ if exist lua.exe.manifest^
%MYMT% -manifest lua.exe.manifest -outputresource:lua.exe %MYMT% -manifest lua.exe.manifest -outputresource:lua.exe
%MYCOMPILE% l*.c print.c %MYCOMPILE% l*.c print.c
del lua.obj linit.obj lbaselib.obj ldblib.obj liolib.obj lmathlib.obj^ del lua.obj linit.obj lbaselib.obj ldblib.obj liolib.obj lmathlib.obj^
loslib.obj ltablib.obj lstrlib.obj loadlib.obj loslib.obj ltablib.obj lstrlib.obj loadlib.obj
%MYLINK% /out:luac.exe *.obj %MYLINK% /out:luac.exe *.obj
if exist luac.exe.manifest^ if exist luac.exe.manifest^
%MYMT% -manifest luac.exe.manifest -outputresource:luac.exe %MYMT% -manifest luac.exe.manifest -outputresource:luac.exe
del *.obj *.manifest del *.obj *.manifest
cd .. cd ..

View File

@ -0,0 +1,2 @@
/MegaGlest*
/data

21
mk/windoze/.gitignore vendored
View File

@ -1,4 +1,16 @@
Release/ /Release/
# Windows_build
*.dll
*.exe
*.pdb
*.exp
*.lib
*.map
*.dmp
*.dat
/lua/
#
/ipch /ipch
@ -6,10 +18,7 @@ Release/
/glestkeys.ini /glestkeys.ini
/servers.ini /servers.ini
/xml_test_malformed.xml /xml_test_malformed.xml
lua/
# Coverity # Coverity
cov-analysis*/ /cov-analysis*/
cov-int /cov-int
cov-int/

View File

@ -1,353 +1,353 @@
;-------------------------------- ;--------------------------------
; General Attributes ; General Attributes
!define APNAME MegaGlest !define APNAME MegaGlest
!define APNAME_OLD Mega-Glest !define APNAME_OLD Mega-Glest
!define APVER_OLD 3.9.0 !define APVER_OLD 3.9.0
!define APVER 3.9.1 !define APVER 3.9.1
Name "${APNAME} ${APVER}" Name "${APNAME} ${APVER}"
SetCompressor /FINAL /SOLID lzma SetCompressor /FINAL /SOLID lzma
SetCompressorDictSize 64 SetCompressorDictSize 64
OutFile "${APNAME}-Installer-${APVER}_i386_win32.exe" OutFile "${APNAME}-Installer-${APVER}_i386_win32.exe"
Icon "..\..\shared\megaglest.ico" Icon "..\..\shared\megaglest.ico"
UninstallIcon "..\..\shared\megaglest.ico" UninstallIcon "..\..\shared\megaglest.ico"
!define MUI_ICON "..\..\shared\megaglest.ico" !define MUI_ICON "..\..\shared\megaglest.ico"
!define MUI_UNICON "..\..\shared\megaglest.ico" !define MUI_UNICON "..\..\shared\megaglest.ico"
InstallDir "$PROGRAMFILES\${APNAME}" InstallDir "$PROGRAMFILES\${APNAME}"
ShowInstDetails show ShowInstDetails show
BGGradient 0xDF9437 0xffffff BGGradient 0xDF9437 0xffffff
; Request application privileges for Windows Vista ; Request application privileges for Windows Vista
RequestExecutionLevel none RequestExecutionLevel none
PageEx license PageEx license
LicenseText "MegaGlest Game License" LicenseText "MegaGlest Game License"
LicenseData "..\..\..\docs\gnu_gpl_3.0.txt" LicenseData "..\..\..\docs\gnu_gpl_3.0.txt"
PageExEnd PageExEnd
PageEx license PageEx license
LicenseText "MegaGlest Data License" LicenseText "MegaGlest Data License"
LicenseData "..\..\..\data\glest_game\docs\cc-by-sa-3.0-unported.txt" LicenseData "..\..\..\data\glest_game\docs\cc-by-sa-3.0-unported.txt"
PageExEnd PageExEnd
;-------------------------------- ;--------------------------------
; Images not included! ; Images not included!
; Use your own animated GIFs please ; Use your own animated GIFs please
;-------------------------------- ;--------------------------------
;-------------------------------- ;--------------------------------
;Interface Settings ;Interface Settings
!include "MUI.nsh" !include "MUI.nsh"
!define MUI_CUSTOMFUNCTION_GUIINIT MUIGUIInit !define MUI_CUSTOMFUNCTION_GUIINIT MUIGUIInit
!insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_WELCOME
#!insertmacro MUI_PAGE_DIRECTORY #!insertmacro MUI_PAGE_DIRECTORY
#!insertmacro MUI_PAGE_INSTFILES #!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English" !insertmacro MUI_LANGUAGE "English"
; Registry key to check for directory (so if you install again, it will ; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically) ; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\${APNAME}" "Install_Dir" InstallDirRegKey HKLM "Software\${APNAME}" "Install_Dir"
; Pages ; Pages
Page directory Page directory
Page instfiles Page instfiles
UninstPage uninstConfirm UninstPage uninstConfirm
UninstPage instfiles UninstPage instfiles
Function .onInit Function .onInit
InitPluginsDir InitPluginsDir
FunctionEnd FunctionEnd
Function myGUIInit Function myGUIInit
SetOutPath '$PLUGINSDIR' SetOutPath '$PLUGINSDIR'
File megaglestinstallscreen.jpg File megaglestinstallscreen.jpg
FindWindow $0 '_Nb' FindWindow $0 '_Nb'
EBanner::show /NOUNLOAD /FIT=BOTH /HWND=$0 "$PLUGINSDIR\megaglestinstallscreen.jpg" EBanner::show /NOUNLOAD /FIT=BOTH /HWND=$0 "$PLUGINSDIR\megaglestinstallscreen.jpg"
#BgImage::SetBg /NOUNLOAD /FILLSCREEN "$PLUGINSDIR\megaglestinstallscreen.jpg" #BgImage::SetBg /NOUNLOAD /FILLSCREEN "$PLUGINSDIR\megaglestinstallscreen.jpg"
#BgImage::Redraw /NOUNLOAD #BgImage::Redraw /NOUNLOAD
# FindWindow $0 "#32770" "" $HWNDPARENT # FindWindow $0 "#32770" "" $HWNDPARENT
# GetDlgItem $0 $0 1006 # GetDlgItem $0 $0 1006
# SetCtlColors $0 0xDF9437 0xDF9437 # SetCtlColors $0 0xDF9437 0xDF9437
FunctionEnd FunctionEnd
Function un.myGUIInit Function un.myGUIInit
SetOutPath '$PLUGINSDIR' SetOutPath '$PLUGINSDIR'
File megaglestinstallscreen.jpg File megaglestinstallscreen.jpg
FindWindow $0 '_Nb' FindWindow $0 '_Nb'
EBanner::show /NOUNLOAD /FIT=BOTH /HWND=$0 "$PLUGINSDIR\megaglestinstallscreen.jpg" EBanner::show /NOUNLOAD /FIT=BOTH /HWND=$0 "$PLUGINSDIR\megaglestinstallscreen.jpg"
FunctionEnd FunctionEnd
Function MUIGUIInit Function MUIGUIInit
Call myGUIInit Call myGUIInit
# look for known older versions # look for known older versions
StrCpy $R2 ${APVER} StrCpy $R2 ${APVER}
ReadRegStr $R0 HKLM Software\${APNAME} "Install_Dir" ReadRegStr $R0 HKLM Software\${APNAME} "Install_Dir"
StrCmp $R0 "" +2 0 StrCmp $R0 "" +2 0
ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME}" "UninstallString" ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME}" "UninstallString"
ReadRegStr $R2 HKLM Software\${APNAME} "Version" ReadRegStr $R2 HKLM Software\${APNAME} "Version"
StrCmp $R0 "" 0 foundInst StrCmp $R0 "" 0 foundInst
ReadRegStr $R0 HKLM Software\${APNAME_OLD}_${APVER_OLD} "Install_Dir" ReadRegStr $R0 HKLM Software\${APNAME_OLD}_${APVER_OLD} "Install_Dir"
StrCmp $R0 "" +2 0 StrCmp $R0 "" +2 0
ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME_OLD}_${APVER_OLD}" "UninstallString" ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME_OLD}_${APVER_OLD}" "UninstallString"
StrCpy $R2 ${APVER_OLD} StrCpy $R2 ${APVER_OLD}
StrCmp $R0 "" 0 foundInst StrCmp $R0 "" 0 foundInst
IfFileExists $INSTDIR\glest_game.exe 0 +2 IfFileExists $INSTDIR\glest_game.exe 0 +2
StrCpy $R0 "$INSTDIR" StrCpy $R0 "$INSTDIR"
StrCpy $R2 "?" StrCpy $R2 "?"
IfFileExists $INSTDIR\glest_game.exe foundInst IfFileExists $INSTDIR\glest_game.exe foundInst
IfFileExists $EXEDIR\glest_game.exe 0 +2 IfFileExists $EXEDIR\glest_game.exe 0 +2
StrCpy $R0 "$EXEDIR" StrCpy $R0 "$EXEDIR"
StrCpy $R2 "?" StrCpy $R2 "?"
IfFileExists $EXEDIR\glest_game.exe foundInst doneInit IfFileExists $EXEDIR\glest_game.exe foundInst doneInit
IfFileExists $INSTDIR\megaglest.exe 0 +2 IfFileExists $INSTDIR\megaglest.exe 0 +2
StrCpy $R0 "$INSTDIR" StrCpy $R0 "$INSTDIR"
StrCpy $R2 "?" StrCpy $R2 "?"
IfFileExists $INSTDIR\megaglest.exe foundInst IfFileExists $INSTDIR\megaglest.exe foundInst
IfFileExists $EXEDIR\megaglest.exe 0 +2 IfFileExists $EXEDIR\megaglest.exe 0 +2
StrCpy $R0 "$EXEDIR" StrCpy $R0 "$EXEDIR"
StrCpy $R2 "?" StrCpy $R2 "?"
IfFileExists $EXEDIR\megaglest_exe foundInst doneInit IfFileExists $EXEDIR\megaglest_exe foundInst doneInit
foundInst: foundInst:
#MessageBox MB_OK|MB_ICONEXCLAMATION "Looking for mods in [$R0\\mydata\\]" #MessageBox MB_OK|MB_ICONEXCLAMATION "Looking for mods in [$R0\\mydata\\]"
MessageBox MB_YESNO|MB_ICONEXCLAMATION \ MessageBox MB_YESNO|MB_ICONEXCLAMATION \
"${APNAME} v$R2 is already installed in [$R0]. $\n$\nClick `Yes` to remove the \ "${APNAME} v$R2 is already installed in [$R0]. $\n$\nClick `Yes` to remove the \
previous installation or `No` to over-write (not recommended) or install to a different location." \ previous installation or `No` to over-write (not recommended) or install to a different location." \
IDYES uninstInit IDYES uninstInit
# change install folder to a version specific name to avoid over-writing # change install folder to a version specific name to avoid over-writing
# old one # old one
StrCpy $INSTDIR "$R0" StrCpy $INSTDIR "$R0"
ClearErrors ClearErrors
goto doneInit goto doneInit
;Run the uninstaller ;Run the uninstaller
uninstInit: uninstInit:
ClearErrors ClearErrors
IfFileExists "$R0\mydata\" 0 +2 IfFileExists "$R0\mydata\" 0 +2
CreateDirectory "$APPDATA\megaglest\" CreateDirectory "$APPDATA\megaglest\"
Rename "$R0\mydata\*.*" "$APPDATA\megaglest\" Rename "$R0\mydata\*.*" "$APPDATA\megaglest\"
ClearErrors ClearErrors
IfFileExists "$R0\glestuser.ini" 0 +2 IfFileExists "$R0\glestuser.ini" 0 +2
CreateDirectory "$APPDATA\megaglest\" CreateDirectory "$APPDATA\megaglest\"
Rename "$R0\glestuser.ini" "$APPDATA\megaglest\glestuser.ini" Rename "$R0\glestuser.ini" "$APPDATA\megaglest\glestuser.ini"
ClearErrors ClearErrors
ExecWait '$R1 _?=$R0' ;Do not copy the uninstaller to a temp file ExecWait '$R1 _?=$R0' ;Do not copy the uninstaller to a temp file
Exec $R0\uninst.exe ; instead of the ExecWait line Exec $R0\uninst.exe ; instead of the ExecWait line
doneInit: doneInit:
IfFileExists "$R0\mydata\" 0 +2 IfFileExists "$R0\mydata\" 0 +2
CreateDirectory "$APPDATA\megaglest\" CreateDirectory "$APPDATA\megaglest\"
Rename "$R0\mydata\*.*" "$APPDATA\megaglest\" Rename "$R0\mydata\*.*" "$APPDATA\megaglest\"
ClearErrors ClearErrors
IfFileExists "$R0\glestuser.ini" 0 +2 IfFileExists "$R0\glestuser.ini" 0 +2
CreateDirectory "$APPDATA\megaglest\" CreateDirectory "$APPDATA\megaglest\"
Rename "$R0\glestuser.ini" "$APPDATA\megaglest\glestuser.ini" Rename "$R0\glestuser.ini" "$APPDATA\megaglest\glestuser.ini"
ClearErrors ClearErrors
FunctionEnd FunctionEnd
Function .onGUIEnd Function .onGUIEnd
EBanner::stop EBanner::stop
FunctionEnd FunctionEnd
Function .onInstSuccess Function .onInstSuccess
MessageBox MB_YESNO "Would you like to view our getting started page on megaglest.org?" IDNO noLaunchWebsite MessageBox MB_YESNO "Would you like to view our getting started page on megaglest.org?" IDNO noLaunchWebsite
ExecShell open 'http://megaglest.org/get-started.html' ExecShell open 'http://megaglest.org/get-started.html'
noLaunchWebsite: noLaunchWebsite:
MessageBox MB_YESNO "Would you like to view the README file? This is heavily recommended." IDNO noViewReadme MessageBox MB_YESNO "Would you like to view the README file? This is heavily recommended." IDNO noViewReadme
ExecShell "open" "$INSTDIR\docs\README.txt" ExecShell "open" "$INSTDIR\docs\README.txt"
noViewReadme: noViewReadme:
MessageBox MB_YESNO "${APNAME} v${APVER} installed successfully, \ MessageBox MB_YESNO "${APNAME} v${APVER} installed successfully, \
click Yes to launch the game now$\nor 'No' to exit." IDNO noLaunch click Yes to launch the game now$\nor 'No' to exit." IDNO noLaunch
SetOutPath $INSTDIR SetOutPath $INSTDIR
Exec 'megaglest.exe' Exec 'megaglest.exe'
noLaunch: noLaunch:
Delete "$PLUGINSDIR'\megaglestinstallscreen.jpg" Delete "$PLUGINSDIR'\megaglestinstallscreen.jpg"
FunctionEnd FunctionEnd
; The stuff to install ; The stuff to install
Section "${APNAME} (required)" Section "${APNAME} (required)"
SectionIn RO SectionIn RO
#MUI_PAGE_INSTFILES #MUI_PAGE_INSTFILES
; Set output path to the installation directory. ; Set output path to the installation directory.
SetOutPath $INSTDIR SetOutPath $INSTDIR
; Put file there ; Put file there
File "..\megaglest.exe" File "..\megaglest.exe"
File "..\megaglest_editor.exe" File "..\megaglest_editor.exe"
File "..\megaglest_g3dviewer.exe" File "..\megaglest_g3dviewer.exe"
File "..\7z.exe" File "..\7z.exe"
File "..\7z.dll" File "..\7z.dll"
File "..\..\shared\megaglest.ico" File "..\..\shared\megaglest.ico"
File "..\glest.ini" File "..\glest.ini"
File "..\..\shared\glestkeys.ini" File "..\..\shared\glestkeys.ini"
File "..\..\shared\servers.ini" File "..\..\shared\servers.ini"
File "..\openal32.dll" File "..\openal32.dll"
File "..\NetworkThrottleFix.reg" File "..\NetworkThrottleFix.reg"
File "..\libvlccore.dll" File "..\libvlccore.dll"
File "..\libvlc.dll" File "..\libvlc.dll"
File /r /x .svn /x mydata "..\plugins" File /r /x .svn /x mydata "..\plugins"
File /r /x .svn /x mydata "..\lua" File /r /x .svn /x mydata "..\lua"
SetOutPath "$INSTDIR\blender\" SetOutPath "$INSTDIR\blender\"
File "..\\xml2g.exe" File "..\\xml2g.exe"
File "..\g2xml.exe" File "..\g2xml.exe"
File /r /x .svn /x mydata "..\..\..\source\tools\glexemel\*.*" File /r /x .svn /x mydata "..\..\..\source\tools\glexemel\*.*"
SetOutPath $INSTDIR SetOutPath $INSTDIR
File /r /x .svn /x mydata "..\..\..\data\glest_game\data" File /r /x .svn /x mydata "..\..\..\data\glest_game\data"
File /r /x .svn /x mydata "..\..\..\data\glest_game\docs" File /r /x .svn /x mydata "..\..\..\data\glest_game\docs"
File /r /x .svn /x mydata "..\..\..\data\glest_game\maps" File /r /x .svn /x mydata "..\..\..\data\glest_game\maps"
File /r /x .svn /x mydata "..\..\..\data\glest_game\scenarios" File /r /x .svn /x mydata "..\..\..\data\glest_game\scenarios"
File /r /x .svn /x mydata "..\..\..\data\glest_game\techs" File /r /x .svn /x mydata "..\..\..\data\glest_game\techs"
File /r /x .svn /x mydata "..\..\..\data\glest_game\tilesets" File /r /x .svn /x mydata "..\..\..\data\glest_game\tilesets"
File /r /x .svn /x mydata "..\..\..\data\glest_game\tutorials" File /r /x .svn /x mydata "..\..\..\data\glest_game\tutorials"
SetOutPath "$INSTDIR\docs\" SetOutPath "$INSTDIR\docs\"
File /r /x .svn /x mydata "..\..\..\docs\*.*" File /r /x .svn /x mydata "..\..\..\docs\*.*"
SetOutPath "$INSTDIR\data\core\misc_textures\flags" SetOutPath "$INSTDIR\data\core\misc_textures\flags"
File /r /x .svn /x mydata "..\..\..\source\masterserver\flags\*.*" File /r /x .svn /x mydata "..\..\..\source\masterserver\flags\*.*"
SetOutPath $INSTDIR SetOutPath $INSTDIR
; Write the installation path into the registry ; Write the installation path into the registry
WriteRegStr HKLM Software\${APNAME} "Install_Dir" "$INSTDIR" WriteRegStr HKLM Software\${APNAME} "Install_Dir" "$INSTDIR"
WriteRegStr HKLM Software\${APNAME} "Version" "${APVER}" WriteRegStr HKLM Software\${APNAME} "Version" "${APVER}"
; Write the uninstall keys for Windows ; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME}" "DisplayName" "${APNAME} v${APVER}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME}" "DisplayName" "${APNAME} v${APVER}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME}" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME}" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME}" "NoModify" 1 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME}" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME}" "NoRepair" 1 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME}" "NoRepair" 1
WriteUninstaller "uninstall.exe" WriteUninstaller "uninstall.exe"
CreateDirectory $INSTDIR\data CreateDirectory $INSTDIR\data
CreateDirectory $INSTDIR\docs CreateDirectory $INSTDIR\docs
CreateDirectory $INSTDIR\maps CreateDirectory $INSTDIR\maps
CreateDirectory $INSTDIR\scenarios CreateDirectory $INSTDIR\scenarios
CreateDirectory $INSTDIR\techs CreateDirectory $INSTDIR\techs
CreateDirectory $INSTDIR\tilesets CreateDirectory $INSTDIR\tilesets
CreateDirectory $INSTDIR\tutorials CreateDirectory $INSTDIR\tutorials
CreateDirectory $INSTDIR\blender CreateDirectory $INSTDIR\blender
AccessControl::GrantOnFile "$INSTDIR" "(BU)" "FullAccess" AccessControl::GrantOnFile "$INSTDIR" "(BU)" "FullAccess"
SectionEnd SectionEnd
; Optional section (can be disabled by the user) ; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts" Section "Start Menu Shortcuts"
CreateDirectory "$SMPROGRAMS\${APNAME}" CreateDirectory "$SMPROGRAMS\${APNAME}"
CreateDirectory "$APPDATA\megaglest" CreateDirectory "$APPDATA\megaglest"
CreateShortCut "$SMPROGRAMS\${APNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 CreateShortCut "$SMPROGRAMS\${APNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME}.lnk" "$INSTDIR\megaglest.exe" "" "$INSTDIR\megaglest.exe" 0 "" "" "${APNAME}" CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME}.lnk" "$INSTDIR\megaglest.exe" "" "$INSTDIR\megaglest.exe" 0 "" "" "${APNAME}"
CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} Map Editor.lnk" "$INSTDIR\megaglest_editor.exe" "" "$INSTDIR\megaglest_editor.exe" 0 "" "" "${APNAME} MegaGlest Map Editor" CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} Map Editor.lnk" "$INSTDIR\megaglest_editor.exe" "" "$INSTDIR\megaglest_editor.exe" 0 "" "" "${APNAME} MegaGlest Map Editor"
CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} G3D Viewer.lnk" "$INSTDIR\megaglest_g3dviewer.exe" "" "$INSTDIR\megaglest_g3dviewer.exe" 0 "" "" "${APNAME} MegaGlest G3D Viewer" CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} G3D Viewer.lnk" "$INSTDIR\megaglest_g3dviewer.exe" "" "$INSTDIR\megaglest_g3dviewer.exe" 0 "" "" "${APNAME} MegaGlest G3D Viewer"
CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} Main.lnk" "$INSTDIR" "" "" 0 "" "" "This folder is the ${APNAME} installation folder" CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} Main.lnk" "$INSTDIR" "" "" 0 "" "" "This folder is the ${APNAME} installation folder"
CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} User Data.lnk" "$APPDATA\megaglest" "" "" 0 "" "" "This folder contains downloaded data (such as mods) and your personal ${APNAME} configuration" CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} User Data.lnk" "$APPDATA\megaglest" "" "" 0 "" "" "This folder contains downloaded data (such as mods) and your personal ${APNAME} configuration"
SectionEnd SectionEnd
;-------------------------------- ;--------------------------------
RequestExecutionLevel admin RequestExecutionLevel admin
section "Tweaks" section "Tweaks"
AccessControl::GrantOnRegKey \ AccessControl::GrantOnRegKey \
HKLM "Software" "(BU)" "FullAccess" HKLM "Software" "(BU)" "FullAccess"
WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" "NetworkThrottlingIndex" 0xffffffff WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" "NetworkThrottlingIndex" 0xffffffff
sectionEnd sectionEnd
RequestExecutionLevel none RequestExecutionLevel none
; Uninstaller ; Uninstaller
Section "Uninstall" Section "Uninstall"
Call un.myGUIInit Call un.myGUIInit
; Remove registry keys ; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME}" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME}"
DeleteRegKey HKLM SOFTWARE\${APNAME} DeleteRegKey HKLM SOFTWARE\${APNAME}
; Remove files and uninstaller ; Remove files and uninstaller
Delete "$INSTDIR\uninstall.exe" Delete "$INSTDIR\uninstall.exe"
Delete "$INSTDIR\megaglest.exe" Delete "$INSTDIR\megaglest.exe"
Delete "$INSTDIR\megaglest_editor.exe" Delete "$INSTDIR\megaglest_editor.exe"
Delete "$INSTDIR\megaglest_g3dviewer.exe" Delete "$INSTDIR\megaglest_g3dviewer.exe"
Delete "$INSTDIR\megaglest.ico" Delete "$INSTDIR\megaglest.ico"
Delete "$INSTDIR\glest.ini" Delete "$INSTDIR\glest.ini"
Delete "$INSTDIR\glestkeys.ini" Delete "$INSTDIR\glestkeys.ini"
Delete "$INSTDIR\servers.ini" Delete "$INSTDIR\servers.ini"
Delete "$INSTDIR\openal32.dll" Delete "$INSTDIR\openal32.dll"
Delete "$INSTDIR\*.log" Delete "$INSTDIR\*.log"
Delete "$INSTDIR\data\*.*" Delete "$INSTDIR\data\*.*"
Delete "$INSTDIR\docs\*.*" Delete "$INSTDIR\docs\*.*"
Delete "$INSTDIR\maps\*.*" Delete "$INSTDIR\maps\*.*"
Delete "$INSTDIR\scenarios\*.*" Delete "$INSTDIR\scenarios\*.*"
Delete "$INSTDIR\screens\*.*" Delete "$INSTDIR\screens\*.*"
Delete "$INSTDIR\techs\*.*" Delete "$INSTDIR\techs\*.*"
Delete "$INSTDIR\tilesets\*.*" Delete "$INSTDIR\tilesets\*.*"
Delete "$INSTDIR\tutorials\*.*" Delete "$INSTDIR\tutorials\*.*"
RMDir /r "$INSTDIR\data" RMDir /r "$INSTDIR\data"
RMDir /r "$INSTDIR\docs" RMDir /r "$INSTDIR\docs"
RMDir /r "$INSTDIR\maps" RMDir /r "$INSTDIR\maps"
RMDir /r "$INSTDIR\scenarios" RMDir /r "$INSTDIR\scenarios"
RMDir /r "$INSTDIR\screens" RMDir /r "$INSTDIR\screens"
RMDir /r "$INSTDIR\techs" RMDir /r "$INSTDIR\techs"
RMDir /r "$INSTDIR\tilesets" RMDir /r "$INSTDIR\tilesets"
RMDir /r "$INSTDIR\tutorials" RMDir /r "$INSTDIR\tutorials"
; Remove shortcuts, if any ; Remove shortcuts, if any
Delete "$SMPROGRAMS\${APNAME}\*.*" Delete "$SMPROGRAMS\${APNAME}\*.*"
; Remove directories used ; Remove directories used
RMDir "$SMPROGRAMS\${APNAME}" RMDir "$SMPROGRAMS\${APNAME}"
RMDir /r "$INSTDIR" RMDir /r "$INSTDIR"
Delete "$PLUGINSDIR'\megaglestinstallscreen.jpg" Delete "$PLUGINSDIR'\megaglestinstallscreen.jpg"
SectionEnd SectionEnd

View File

@ -1,259 +1,259 @@
;-------------------------------- ;--------------------------------
; General Attributes ; General Attributes
!define APNAME MegaGlest !define APNAME MegaGlest
!define APVER 3.9.1 !define APVER 3.9.1
!define APNAME_OLD Mega-Glest !define APNAME_OLD Mega-Glest
!define APVER_OLD 3.9.0 !define APVER_OLD 3.9.0
!define APVER_UPDATE 3.9.1 !define APVER_UPDATE 3.9.1
Name "${APNAME} ${APVER_UPDATE}" Name "${APNAME} ${APVER_UPDATE}"
SetCompressor /FINAL /SOLID lzma SetCompressor /FINAL /SOLID lzma
SetCompressorDictSize 64 SetCompressorDictSize 64
OutFile "${APNAME}-Updater-${APVER_UPDATE}_i386_win32.exe" OutFile "${APNAME}-Updater-${APVER_UPDATE}_i386_win32.exe"
Icon "..\megaglest.ico" Icon "..\megaglest.ico"
UninstallIcon "..\megaglest.ico" UninstallIcon "..\megaglest.ico"
!define MUI_ICON "..\megaglest.ico" !define MUI_ICON "..\megaglest.ico"
!define MUI_UNICON "..\megaglest.ico" !define MUI_UNICON "..\megaglest.ico"
InstallDir "$PROGRAMFILES\${APNAME}_${APVER}" InstallDir "$PROGRAMFILES\${APNAME}_${APVER}"
ShowInstDetails show ShowInstDetails show
BGGradient 0xDF9437 0xffffff BGGradient 0xDF9437 0xffffff
; Request application privileges for Windows Vista ; Request application privileges for Windows Vista
;RequestExecutionLevel none ;RequestExecutionLevel none
RequestExecutionLevel none RequestExecutionLevel none
PageEx license PageEx license
LicenseText "MegaGlest Game License" LicenseText "MegaGlest Game License"
LicenseData "..\..\..\docs\gnu_gpl_3.0.txt" LicenseData "..\..\..\docs\gnu_gpl_3.0.txt"
PageExEnd PageExEnd
PageEx license PageEx license
LicenseText "MegaGlest Data License" LicenseText "MegaGlest Data License"
LicenseData "..\..\..\data\glest_game\docs\cc-by-sa-3.0-unported.txt" LicenseData "..\..\..\data\glest_game\docs\cc-by-sa-3.0-unported.txt"
PageExEnd PageExEnd
;-------------------------------- ;--------------------------------
; Images not included! ; Images not included!
; Use your own animated GIFs please ; Use your own animated GIFs please
;-------------------------------- ;--------------------------------
;-------------------------------- ;--------------------------------
;Interface Settings ;Interface Settings
!include "MUI.nsh" !include "MUI.nsh"
!define MUI_CUSTOMFUNCTION_GUIINIT MUIGUIInit !define MUI_CUSTOMFUNCTION_GUIINIT MUIGUIInit
!insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_WELCOME
#!insertmacro MUI_PAGE_DIRECTORY #!insertmacro MUI_PAGE_DIRECTORY
#!insertmacro MUI_PAGE_INSTFILES #!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English" !insertmacro MUI_LANGUAGE "English"
; Registry key to check for directory (so if you install again, it will ; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically) ; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\${APNAME}_${APVER}" "Install_Dir" InstallDirRegKey HKLM "Software\${APNAME}_${APVER}" "Install_Dir"
; Pages ; Pages
Page directory Page directory
Page instfiles Page instfiles
UninstPage uninstConfirm UninstPage uninstConfirm
UninstPage instfiles UninstPage instfiles
Function MUIGUIInit Function MUIGUIInit
SetOutPath '$PLUGINSDIR' SetOutPath '$PLUGINSDIR'
File megaglestinstallscreen.jpg File megaglestinstallscreen.jpg
FindWindow $0 '_Nb' FindWindow $0 '_Nb'
EBanner::show /NOUNLOAD /FIT=BOTH /HWND=$0 "$PLUGINSDIR\megaglestinstallscreen.jpg" EBanner::show /NOUNLOAD /FIT=BOTH /HWND=$0 "$PLUGINSDIR\megaglestinstallscreen.jpg"
# FindWindow $0 "#32770" "" $HWNDPARENT # FindWindow $0 "#32770" "" $HWNDPARENT
# GetDlgItem $0 $0 1006 # GetDlgItem $0 $0 1006
# SetCtlColors $0 0xDF9437 0xDF9437 # SetCtlColors $0 0xDF9437 0xDF9437
StrCpy $R2 ${APVER} StrCpy $R2 ${APVER}
ReadRegStr $R0 HKLM Software\${APNAME} "Install_Dir" ReadRegStr $R0 HKLM Software\${APNAME} "Install_Dir"
StrCmp $R0 "" +2 0 StrCmp $R0 "" +2 0
ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME}" "UninstallString" ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME}" "UninstallString"
ReadRegStr $R2 HKLM Software\${APNAME} "Version" ReadRegStr $R2 HKLM Software\${APNAME} "Version"
StrCmp $R0 "" 0 foundInst StrCmp $R0 "" 0 foundInst
ReadRegStr $R0 HKLM Software\${APNAME_OLD}_${APVER_OLD} "Install_Dir" ReadRegStr $R0 HKLM Software\${APNAME_OLD}_${APVER_OLD} "Install_Dir"
StrCmp $R0 "" +2 0 StrCmp $R0 "" +2 0
ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME_OLD}_${APVER_OLD}" "UninstallString" ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME_OLD}_${APVER_OLD}" "UninstallString"
StrCpy $R2 ${APVER_OLD} StrCpy $R2 ${APVER_OLD}
StrCmp $R0 "" 0 foundInst StrCmp $R0 "" 0 foundInst
IfFileExists $INSTDIR\glest_game.exe 0 +2 IfFileExists $INSTDIR\glest_game.exe 0 +2
StrCpy $R0 "$INSTDIR" StrCpy $R0 "$INSTDIR"
StrCpy $R2 "?" StrCpy $R2 "?"
IfFileExists $INSTDIR\glest_game.exe foundInst IfFileExists $INSTDIR\glest_game.exe foundInst
IfFileExists $EXEDIR\glest_game.exe 0 +2 IfFileExists $EXEDIR\glest_game.exe 0 +2
StrCpy $R0 "$EXEDIR" StrCpy $R0 "$EXEDIR"
StrCpy $R2 "?" StrCpy $R2 "?"
IfFileExists $EXEDIR\glest_game.exe foundInst doneInit IfFileExists $EXEDIR\glest_game.exe foundInst doneInit
IfFileExists $INSTDIR\megaglest.exe 0 +2 IfFileExists $INSTDIR\megaglest.exe 0 +2
StrCpy $R0 "$INSTDIR" StrCpy $R0 "$INSTDIR"
StrCpy $R2 "?" StrCpy $R2 "?"
IfFileExists $INSTDIR\megaglest.exe foundInst IfFileExists $INSTDIR\megaglest.exe foundInst
IfFileExists $EXEDIR\megaglest.exe 0 +2 IfFileExists $EXEDIR\megaglest.exe 0 +2
StrCpy $R0 "$EXEDIR" StrCpy $R0 "$EXEDIR"
StrCpy $R2 "?" StrCpy $R2 "?"
IfFileExists $EXEDIR\megaglest.exe foundInst doneInit IfFileExists $EXEDIR\megaglest.exe foundInst doneInit
foundInst: foundInst:
StrCpy $INSTDIR "$R0" StrCpy $INSTDIR "$R0"
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
"${APNAME} v${APVER} installation found in [$R0]. $\n$\nClick `OK` to update \ "${APNAME} v${APVER} installation found in [$R0]. $\n$\nClick `OK` to update \
the previous installation or `Cancel` to exit." \ the previous installation or `Cancel` to exit." \
IDOK uninstInit IDOK uninstInit
# change install folder to a version specific name to aovid over-writing # change install folder to a version specific name to aovid over-writing
# old one # old one
;StrCpy $INSTDIR "$PROGRAMFILES\${APNAME}_${APVER}" ;StrCpy $INSTDIR "$PROGRAMFILES\${APNAME}_${APVER}"
Quit Quit
goto doneInit goto doneInit
notFoundInst: notFoundInst:
MessageBox MB_OK|MB_ICONSTOP \ MessageBox MB_OK|MB_ICONSTOP \
"${APNAME} v${APVER} installation NOT found. $\n$\nCannot upgrade \ "${APNAME} v${APVER} installation NOT found. $\n$\nCannot upgrade \
this installation since the main installer was not previously used." \ this installation since the main installer was not previously used." \
IDOK IDOK
Quit Quit
goto doneInit goto doneInit
;Run the uninstaller ;Run the uninstaller
uninstInit: uninstInit:
ClearErrors ClearErrors
;ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file ;ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
;Exec $INSTDIR\uninst.exe ; instead of the ExecWait line ;Exec $INSTDIR\uninst.exe ; instead of the ExecWait line
doneInit: doneInit:
FunctionEnd FunctionEnd
Function .onGUIEnd Function .onGUIEnd
EBanner::stop EBanner::stop
FunctionEnd FunctionEnd
Function .onInstSuccess Function .onInstSuccess
MessageBox MB_YESNO "${APNAME} v${APVER} installed successfully, \ MessageBox MB_YESNO "${APNAME} v${APVER} installed successfully, \
click Yes to launch the game$\nor 'No' to exit." IDNO noLaunch click Yes to launch the game$\nor 'No' to exit." IDNO noLaunch
SetOutPath $INSTDIR SetOutPath $INSTDIR
Exec 'glest_game.exe' Exec 'glest_game.exe'
noLaunch: noLaunch:
FunctionEnd FunctionEnd
; The stuff to install ; The stuff to install
Section "${APNAME} (required)" Section "${APNAME} (required)"
SectionIn RO SectionIn RO
#MUI_PAGE_INSTFILES #MUI_PAGE_INSTFILES
; Set output path to the installation directory. ; Set output path to the installation directory.
SetOutPath $INSTDIR SetOutPath $INSTDIR
; remove old Norsemen training_field upgrade ; remove old Norsemen training_field upgrade
#RMDir /r "$INSTDIR\techs\megapack\factions\norsemen\upgrades\training_field" #RMDir /r "$INSTDIR\techs\megapack\factions\norsemen\upgrades\training_field"
; Put file there ; Put file there
File "..\..\..\data\glest_game\megaglest.exe" File "..\..\..\data\glest_game\megaglest.exe"
File "..\..\..\data\glest_game\megaglest_editor.exe" File "..\..\..\data\glest_game\megaglest_editor.exe"
File "..\..\..\data\glest_game\megaglest_g3dviewer.exe" File "..\..\..\data\glest_game\megaglest_g3dviewer.exe"
File "..\..\..\data\glest_game\7z.exe" File "..\..\..\data\glest_game\7z.exe"
File "..\..\..\data\glest_game\7z.dll" File "..\..\..\data\glest_game\7z.dll"
File "..\..\..\data\glest_game\glest.ini" File "..\..\..\data\glest_game\glest.ini"
File "..\..\..\data\glest_game\glestkeys.ini" File "..\..\..\data\glest_game\glestkeys.ini"
File "..\..\..\data\glest_game\servers.ini" File "..\..\..\data\glest_game\servers.ini"
File /r /x .svn /x mydata "..\..\..\data\glest_game\*.lng" File /r /x .svn /x mydata "..\..\..\data\glest_game\*.lng"
#File /r /x .svn /x mydata "..\..\..\data\glest_game\tutorials" #File /r /x .svn /x mydata "..\..\..\data\glest_game\tutorials"
#File /r /x .svn /x mydata "..\..\..\data\glest_game\*.xml" #File /r /x .svn /x mydata "..\..\..\data\glest_game\*.xml"
AccessControl::GrantOnFile "$INSTDIR" "(BU)" "FullAccess" AccessControl::GrantOnFile "$INSTDIR" "(BU)" "FullAccess"
SectionEnd SectionEnd
; Optional section (can be disabled by the user) ; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts" Section "Start Menu Shortcuts"
; Remove shortcuts, if any ; Remove shortcuts, if any
Delete "$SMPROGRAMS\${APNAME}\*.*" Delete "$SMPROGRAMS\${APNAME}\*.*"
CreateDirectory "$SMPROGRAMS\${APNAME}" CreateDirectory "$SMPROGRAMS\${APNAME}"
CreateDirectory "$APPDATA\megaglest" CreateDirectory "$APPDATA\megaglest"
CreateShortCut "$SMPROGRAMS\${APNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 CreateShortCut "$SMPROGRAMS\${APNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME}.lnk" "$INSTDIR\megaglest.exe" "" "$INSTDIR\megaglest.exe" 0 "" "" "${APNAME}" CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME}.lnk" "$INSTDIR\megaglest.exe" "" "$INSTDIR\megaglest.exe" 0 "" "" "${APNAME}"
CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} Map Editor.lnk" "$INSTDIR\megaglest_editor.exe" "" "$INSTDIR\megaglest_editor.exe" 0 "" "" "${APNAME} MegaGlest Map Editor" CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} Map Editor.lnk" "$INSTDIR\megaglest_editor.exe" "" "$INSTDIR\megaglest_editor.exe" 0 "" "" "${APNAME} MegaGlest Map Editor"
CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} G3D Viewer.lnk" "$INSTDIR\megaglest_g3dviewer.exe" "" "$INSTDIR\megaglest_g3dviewer.exe" 0 "" "" "${APNAME} MegaGlest G3D Viewer" CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} G3D Viewer.lnk" "$INSTDIR\megaglest_g3dviewer.exe" "" "$INSTDIR\megaglest_g3dviewer.exe" 0 "" "" "${APNAME} MegaGlest G3D Viewer"
CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} User Data.lnk" "$APPDATA\megaglest" "" "" 0 "" "" "This folder contains downloaded data (such as mods) and your personal ${APNAME} configuration" CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} User Data.lnk" "$APPDATA\megaglest" "" "" 0 "" "" "This folder contains downloaded data (such as mods) and your personal ${APNAME} configuration"
SectionEnd SectionEnd
;-------------------------------- ;--------------------------------
; Uninstaller ; Uninstaller
Section "Uninstall" Section "Uninstall"
; Remove registry keys ; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME}" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APNAME}"
DeleteRegKey HKLM SOFTWARE\${APNAME} DeleteRegKey HKLM SOFTWARE\${APNAME}
; Remove files and uninstaller ; Remove files and uninstaller
Delete "$INSTDIR\uninstall.exe" Delete "$INSTDIR\uninstall.exe"
Delete "$INSTDIR\megaglest.exe" Delete "$INSTDIR\megaglest.exe"
Delete "$INSTDIR\megaglest_editor.exe" Delete "$INSTDIR\megaglest_editor.exe"
Delete "$INSTDIR\megaglest_g3dviewer.exe" Delete "$INSTDIR\megaglest_g3dviewer.exe"
Delete "$INSTDIR\megaglest.ico" Delete "$INSTDIR\megaglest.ico"
Delete "$INSTDIR\glest.ini" Delete "$INSTDIR\glest.ini"
Delete "$INSTDIR\glestkeys.ini" Delete "$INSTDIR\glestkeys.ini"
Delete "$INSTDIR\servers.ini" Delete "$INSTDIR\servers.ini"
Delete "$INSTDIR\openal32.dll" Delete "$INSTDIR\openal32.dll"
Delete "$INSTDIR\xerces-c_3_0.dll" Delete "$INSTDIR\xerces-c_3_0.dll"
Delete "$INSTDIR\*.log" Delete "$INSTDIR\*.log"
Delete "$INSTDIR\data\*.*" Delete "$INSTDIR\data\*.*"
Delete "$INSTDIR\docs\*.*" Delete "$INSTDIR\docs\*.*"
Delete "$INSTDIR\maps\*.*" Delete "$INSTDIR\maps\*.*"
Delete "$INSTDIR\scenarios\*.*" Delete "$INSTDIR\scenarios\*.*"
Delete "$INSTDIR\screens\*.*" Delete "$INSTDIR\screens\*.*"
Delete "$INSTDIR\techs\*.*" Delete "$INSTDIR\techs\*.*"
Delete "$INSTDIR\tilesets\*.*" Delete "$INSTDIR\tilesets\*.*"
Delete "$INSTDIR\tutorials\*.*" Delete "$INSTDIR\tutorials\*.*"
RMDir /r "$INSTDIR\data" RMDir /r "$INSTDIR\data"
RMDir /r "$INSTDIR\docs" RMDir /r "$INSTDIR\docs"
RMDir /r "$INSTDIR\maps" RMDir /r "$INSTDIR\maps"
RMDir /r "$INSTDIR\scenarios" RMDir /r "$INSTDIR\scenarios"
RMDir /r "$INSTDIR\screens" RMDir /r "$INSTDIR\screens"
RMDir /r "$INSTDIR\techs" RMDir /r "$INSTDIR\techs"
RMDir /r "$INSTDIR\tilesets" RMDir /r "$INSTDIR\tilesets"
RMDir /r "$INSTDIR\tutorials" RMDir /r "$INSTDIR\tutorials"
; Remove shortcuts, if any ; Remove shortcuts, if any
Delete "$SMPROGRAMS\${APNAME}\*.*" Delete "$SMPROGRAMS\${APNAME}\*.*"
; Remove directories used ; Remove directories used
RMDir "$SMPROGRAMS\${APNAME}" RMDir "$SMPROGRAMS\${APNAME}"
RMDir /r "$INSTDIR" RMDir /r "$INSTDIR"
SectionEnd SectionEnd

View File

@ -1,10 +1,10 @@
@echo off @echo off
mkdir build mkdir build
cd build cd build
rem set build_verbose="-D CMAKE_VERBOSE_MAKEFILE=ON" rem set build_verbose="-D CMAKE_VERBOSE_MAKEFILE=ON"
set build_verbose= set build_verbose=
cmake -G "MinGW Makefiles" %build_verbose% -D wxWidgets_ROOT_DIR="..\source\win32_deps\wxWidgets-2.8.10" -D wxWidgets_LIB_DIR="..\source\win32_deps\wxWidgets-2.8.10\lib" -D wxWidgets_CONFIGURATION="mswu" -DCMAKE_INSTALL_PREFIX= -DWANT_STATIC_LIBS=ON .. cmake -G "MinGW Makefiles" %build_verbose% -D wxWidgets_ROOT_DIR="..\source\win32_deps\wxWidgets-2.8.10" -D wxWidgets_LIB_DIR="..\source\win32_deps\wxWidgets-2.8.10\lib" -D wxWidgets_CONFIGURATION="mswu" -DCMAKE_INSTALL_PREFIX= -DWANT_STATIC_LIBS=ON ..
mingw32-make mingw32-make
cd ..\ cd ..\

View File

@ -1,88 +1,88 @@
@echo off @echo off
rem rem
rem Upload Coverity s rem Upload Coverity s
rem Requires: rem Requires:
rem - curl.exe, built with SSL support: http://curl.haxx.se/download.html rem - curl.exe, built with SSL support: http://curl.haxx.se/download.html
rem - wget.exe (should get installed automatically during a build) rem - wget.exe (should get installed automatically during a build)
rem - 7z.exe (should get installed automatically during a build) rem - 7z.exe (should get installed automatically during a build)
rem - Coverity Scan Build Tool installed and its install path configured in .coverity-scan rem - Coverity Scan Build Tool installed and its install path configured in .coverity-scan
rem rem
rem Change into this directory rem Change into this directory
cd /d "%~dp0" cd /d "%~dp0"
rem Project name (case sensitive) rem Project name (case sensitive)
set PROJECT=MegaGlest set PROJECT=MegaGlest
rem read in config settings rem read in config settings
if not exist ".coverity-scan" ( if not exist ".coverity-scan" (
echo ----------------------------------------- echo -----------------------------------------
echo **Missing Config** To use this script please create a config file named [%CD%\.coverity-scan] echo **Missing Config** To use this script please create a config file named [%CD%\.coverity-scan]
echo Containing: TOKEN=x , EMAIL=x , COVERITY_ANALYSIS_ROOT=x , NUMCORES=x echo Containing: TOKEN=x , EMAIL=x , COVERITY_ANALYSIS_ROOT=x , NUMCORES=x
goto END goto END
) )
setlocal disabledelayedexpansion setlocal disabledelayedexpansion
FOR /F "tokens=1* delims==" %%i IN (.coverity-scan) DO set "prop_%%i=%%j" FOR /F "tokens=1* delims==" %%i IN (.coverity-scan) DO set "prop_%%i=%%j"
rem Coverity Scan project token as listed on the Coverity Scan project page rem Coverity Scan project token as listed on the Coverity Scan project page
set TOKEN=%prop_TOKEN% set TOKEN=%prop_TOKEN%
rem E-Mail address of registered Coverity Scan user with project access rem E-Mail address of registered Coverity Scan user with project access
set EMAIL=%prop_EMAIL% set EMAIL=%prop_EMAIL%
set COVERITY_ANALYSIS_ROOT=%prop_COVERITY_ANALYSIS_ROOT% set COVERITY_ANALYSIS_ROOT=%prop_COVERITY_ANALYSIS_ROOT%
echo TOKEN [%TOKEN%] EMAIL [%EMAIL%] COVERITY_ANALYSIS_ROOT [%COVERITY_ANALYSIS_ROOT%] echo TOKEN [%TOKEN%] EMAIL [%EMAIL%] COVERITY_ANALYSIS_ROOT [%COVERITY_ANALYSIS_ROOT%]
rem pause rem pause
rem Description of this build (can be any string) rem Description of this build (can be any string)
set DESCRIPTION=Windows-32_%COMPUTERNAME% set DESCRIPTION=Windows-32_%COMPUTERNAME%
rem Where to store the data gathered by the Coverity Scan Build Tool rem Where to store the data gathered by the Coverity Scan Build Tool
set BUILDTOOL=cov-int set BUILDTOOL=cov-int
rem ------------------------------------------------------------------------------ rem ------------------------------------------------------------------------------
set GITVERSION_SHA1=. set GITVERSION_SHA1=.
set GITVERSION_REV=. set GITVERSION_REV=.
set GET_GIT_SHA1="git log -1 --format=%%h" set GET_GIT_SHA1="git log -1 --format=%%h"
for /f "delims=" %%a in ('%GET_GIT_SHA1%') do @set GITVERSION_SHA1=%%a for /f "delims=" %%a in ('%GET_GIT_SHA1%') do @set GITVERSION_SHA1=%%a
for /f "delims=" %%a in ('git rev-list HEAD --count') do @set GITVERSION_REV=%%a for /f "delims=" %%a in ('git rev-list HEAD --count') do @set GITVERSION_REV=%%a
set VERSION=%GITVERSION_REV%.%GITVERSION_SHA1% set VERSION=%GITVERSION_REV%.%GITVERSION_SHA1%
set FILENAME=%PROJECT%_%DESCRIPTION%_%VERSION% set FILENAME=%PROJECT%_%DESCRIPTION%_%VERSION%
rem Untested! Requires modification. rem Untested! Requires modification.
rem wget.exe --no-check-certificate https://scan.coverity.com/download/win-32 --post-data "token=%TOKEN%&project=%PROJECT%" -O %TEMP%\coverity_tool.zip rem wget.exe --no-check-certificate https://scan.coverity.com/download/win-32 --post-data "token=%TOKEN%&project=%PROJECT%" -O %TEMP%\coverity_tool.zip
rem 7z.exe x %TEMP%\coverity_tool.zip rem 7z.exe x %TEMP%\coverity_tool.zip
rem set PATH=%PATH%;C:\build\megaglest-source\mk\windoze\cov-analysis-win32-6.6.1\bin\ rem set PATH=%PATH%;C:\build\megaglest-source\mk\windoze\cov-analysis-win32-6.6.1\bin\
if "%MG_COV_PATH_SET%." == "." set PATH=%PATH%;%COVERITY_ANALYSIS_ROOT%\bin\ if "%MG_COV_PATH_SET%." == "." set PATH=%PATH%;%COVERITY_ANALYSIS_ROOT%\bin\
set MG_COV_PATH_SET=TRUE set MG_COV_PATH_SET=TRUE
cov-build --dir %BUILDTOOL% build-mg-2010.bat nopause rebuild cov-build --dir %BUILDTOOL% build-mg-2010.bat nopause rebuild
if ERRORLEVEL 1 GOTO ERROR if ERRORLEVEL 1 GOTO ERROR
7z.exe a %FILENAME%.tar %BUILDTOOL%\ 7z.exe a %FILENAME%.tar %BUILDTOOL%\
7z.exe a %FILENAME%.tar.gz %FILENAME%.tar 7z.exe a %FILENAME%.tar.gz %FILENAME%.tar
del /Q /F %FILENAME%.tar del /Q /F %FILENAME%.tar
dir %FILENAME%.tar.gz dir %FILENAME%.tar.gz
echo **About to run: curl.exe --progress-bar --insecure --form "project=%PROJECT%" --form "token=%TOKEN%" --form "email=%EMAIL%" --form "version=%VERSION%" --form "description=%DESCRIPTION%" --form "file=@%FILENAME%.tar.gz" https://scan5.coverity.com/cgi-bin/upload.py echo **About to run: curl.exe --progress-bar --insecure --form "project=%PROJECT%" --form "token=%TOKEN%" --form "email=%EMAIL%" --form "version=%VERSION%" --form "description=%DESCRIPTION%" --form "file=@%FILENAME%.tar.gz" https://scan5.coverity.com/cgi-bin/upload.py
rem pause rem pause
rem echo Running curl rem echo Running curl
curl.exe --progress-bar --insecure --form "project=%PROJECT%" --form "token=%TOKEN%" --form "email=%EMAIL%" --form "version=%VERSION%" --form "description=%DESCRIPTION%" --form "file=@%FILENAME%.tar.gz" https://scan5.coverity.com/cgi-bin/upload.py curl.exe --progress-bar --insecure --form "project=%PROJECT%" --form "token=%TOKEN%" --form "email=%EMAIL%" --form "version=%VERSION%" --form "description=%DESCRIPTION%" --form "file=@%FILENAME%.tar.gz" https://scan5.coverity.com/cgi-bin/upload.py
if ERRORLEVEL 1 GOTO ERROR if ERRORLEVEL 1 GOTO ERROR
GOTO CLEANUP GOTO CLEANUP
:CLEANUP :CLEANUP
del /Q /F %FILENAME%.tar.gz del /Q /F %FILENAME%.tar.gz
rd /Q /S %BUILDTOOL%\ rd /Q /S %BUILDTOOL%\
GOTO END GOTO END
:ERROR :ERROR
echo An error occurred. echo An error occurred.
:END :END

View File

@ -1,143 +1,143 @@
' Set your settings ' Set your settings
strFileURL = "http://www.soft-haus.com/glest/tools/7z.exe" strFileURL = "http://www.soft-haus.com/glest/tools/7z.exe"
strHDLocation = ".\7z.exe" strHDLocation = ".\7z.exe"
WScript.Echo "----------------------------------------" WScript.Echo "----------------------------------------"
WScript.Echo "About to download 7z.exe from:" WScript.Echo "About to download 7z.exe from:"
WScript.Echo strFileURL & ", please wait..." WScript.Echo strFileURL & ", please wait..."
' Fetch the file ' Fetch the file
Set objXMLHTTP =CreateObject("WinHttp.WinHttpRequest.5.1") Set objXMLHTTP =CreateObject("WinHttp.WinHttpRequest.5.1")
If objXMLHTTP Is Nothing Then Set objXMLHTTP = CreateObject("WinHttp.WinHttpRequest") If objXMLHTTP Is Nothing Then Set objXMLHTTP = CreateObject("WinHttp.WinHttpRequest")
If objXMLHTTP Is Nothing Then Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP") If objXMLHTTP Is Nothing Then Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
If objXMLHTTP Is Nothing Then Set objXMLHTTP = CreateObject("Microsoft.XMLHTTP") If objXMLHTTP Is Nothing Then Set objXMLHTTP = CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.open "GET", strFileURL, false objXMLHTTP.open "GET", strFileURL, false
objXMLHTTP.send() objXMLHTTP.send()
If objXMLHTTP.Status = 200 Then If objXMLHTTP.Status = 200 Then
Set objADOStream = CreateObject("ADODB.Stream") Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open objADOStream.Open
objADOStream.Type = 1 'adTypeBinary objADOStream.Type = 1 'adTypeBinary
objADOStream.Write objXMLHTTP.ResponseBody objADOStream.Write objXMLHTTP.ResponseBody
objADOStream.Position = 0 'Set the stream position to the start objADOStream.Position = 0 'Set the stream position to the start
Set objFSO = Createobject("Scripting.FileSystemObject") Set objFSO = Createobject("Scripting.FileSystemObject")
If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation
Set objFSO = Nothing Set objFSO = Nothing
objADOStream.SaveToFile strHDLocation objADOStream.SaveToFile strHDLocation
objADOStream.Close objADOStream.Close
Set objADOStream = Nothing Set objADOStream = Nothing
WScript.Echo "7z.exe has been downloaded successfully to: " WScript.Echo "7z.exe has been downloaded successfully to: "
WScript.Echo strHDLocation WScript.Echo strHDLocation
WScript.Echo "----------------------------------------" WScript.Echo "----------------------------------------"
End if End if
Set objXMLHTTP = Nothing Set objXMLHTTP = Nothing
' Set your settings ' Set your settings
strFileURL = "http://www.soft-haus.com/glest/tools/7z.dll" strFileURL = "http://www.soft-haus.com/glest/tools/7z.dll"
strHDLocation = ".\7z.dll" strHDLocation = ".\7z.dll"
WScript.Echo "----------------------------------------" WScript.Echo "----------------------------------------"
WScript.Echo "About to download 7z.dll from:" WScript.Echo "About to download 7z.dll from:"
WScript.Echo strFileURL & ", please wait..." WScript.Echo strFileURL & ", please wait..."
' Fetch the file ' Fetch the file
Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP") Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
objXMLHTTP.open "GET", strFileURL, false objXMLHTTP.open "GET", strFileURL, false
objXMLHTTP.send() objXMLHTTP.send()
If objXMLHTTP.Status = 200 Then If objXMLHTTP.Status = 200 Then
Set objADOStream = CreateObject("ADODB.Stream") Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open objADOStream.Open
objADOStream.Type = 1 'adTypeBinary objADOStream.Type = 1 'adTypeBinary
objADOStream.Write objXMLHTTP.ResponseBody objADOStream.Write objXMLHTTP.ResponseBody
objADOStream.Position = 0 'Set the stream position to the start objADOStream.Position = 0 'Set the stream position to the start
Set objFSO = Createobject("Scripting.FileSystemObject") Set objFSO = Createobject("Scripting.FileSystemObject")
If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation
Set objFSO = Nothing Set objFSO = Nothing
objADOStream.SaveToFile strHDLocation objADOStream.SaveToFile strHDLocation
objADOStream.Close objADOStream.Close
Set objADOStream = Nothing Set objADOStream = Nothing
WScript.Echo "7z.dll has been downloaded successfully to: " WScript.Echo "7z.dll has been downloaded successfully to: "
WScript.Echo strHDLocation WScript.Echo strHDLocation
WScript.Echo "----------------------------------------" WScript.Echo "----------------------------------------"
End if End if
Set objXMLHTTP = Nothing Set objXMLHTTP = Nothing
' Set your settings ' Set your settings
strFileURL = "http://www.soft-haus.com/glest/tools/wget.exe" strFileURL = "http://www.soft-haus.com/glest/tools/wget.exe"
strHDLocation = ".\wget.exe" strHDLocation = ".\wget.exe"
WScript.Echo "----------------------------------------" WScript.Echo "----------------------------------------"
WScript.Echo "About to download wget.exe from:" WScript.Echo "About to download wget.exe from:"
WScript.Echo strFileURL & ", please wait..." WScript.Echo strFileURL & ", please wait..."
' Fetch the file ' Fetch the file
Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP") Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
objXMLHTTP.open "GET", strFileURL, false objXMLHTTP.open "GET", strFileURL, false
objXMLHTTP.send() objXMLHTTP.send()
If objXMLHTTP.Status = 200 Then If objXMLHTTP.Status = 200 Then
Set objADOStream = CreateObject("ADODB.Stream") Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open objADOStream.Open
objADOStream.Type = 1 'adTypeBinary objADOStream.Type = 1 'adTypeBinary
objADOStream.Write objXMLHTTP.ResponseBody objADOStream.Write objXMLHTTP.ResponseBody
objADOStream.Position = 0 'Set the stream position to the start objADOStream.Position = 0 'Set the stream position to the start
Set objFSO = Createobject("Scripting.FileSystemObject") Set objFSO = Createobject("Scripting.FileSystemObject")
If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation
Set objFSO = Nothing Set objFSO = Nothing
objADOStream.SaveToFile strHDLocation objADOStream.SaveToFile strHDLocation
objADOStream.Close objADOStream.Close
Set objADOStream = Nothing Set objADOStream = Nothing
WScript.Echo "wget.exe has been downloaded successfully to: " WScript.Echo "wget.exe has been downloaded successfully to: "
WScript.Echo strHDLocation WScript.Echo strHDLocation
WScript.Echo "----------------------------------------" WScript.Echo "----------------------------------------"
End if End if
Set objXMLHTTP = Nothing Set objXMLHTTP = Nothing
' Set your settings ' Set your settings
strFileURL = "http://www.soft-haus.com/glest/tools/tar.exe" strFileURL = "http://www.soft-haus.com/glest/tools/tar.exe"
strHDLocation = ".\tar.exe" strHDLocation = ".\tar.exe"
WScript.Echo "----------------------------------------" WScript.Echo "----------------------------------------"
WScript.Echo "About to download tar.exe from:" WScript.Echo "About to download tar.exe from:"
WScript.Echo strFileURL & ", please wait..." WScript.Echo strFileURL & ", please wait..."
' Fetch the file ' Fetch the file
Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP") Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
objXMLHTTP.open "GET", strFileURL, false objXMLHTTP.open "GET", strFileURL, false
objXMLHTTP.send() objXMLHTTP.send()
If objXMLHTTP.Status = 200 Then If objXMLHTTP.Status = 200 Then
Set objADOStream = CreateObject("ADODB.Stream") Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open objADOStream.Open
objADOStream.Type = 1 'adTypeBinary objADOStream.Type = 1 'adTypeBinary
objADOStream.Write objXMLHTTP.ResponseBody objADOStream.Write objXMLHTTP.ResponseBody
objADOStream.Position = 0 'Set the stream position to the start objADOStream.Position = 0 'Set the stream position to the start
Set objFSO = Createobject("Scripting.FileSystemObject") Set objFSO = Createobject("Scripting.FileSystemObject")
If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation
Set objFSO = Nothing Set objFSO = Nothing
objADOStream.SaveToFile strHDLocation objADOStream.SaveToFile strHDLocation
objADOStream.Close objADOStream.Close
Set objADOStream = Nothing Set objADOStream = Nothing
WScript.Echo "tar.exe has been downloaded successfully to: " WScript.Echo "tar.exe has been downloaded successfully to: "
WScript.Echo strHDLocation WScript.Echo strHDLocation
WScript.Echo "----------------------------------------" WScript.Echo "----------------------------------------"
End if End if
Set objXMLHTTP = Nothing Set objXMLHTTP = Nothing

View File

@ -1,72 +1,72 @@
@echo off @echo off
rem change to the directory of this batch file rem change to the directory of this batch file
ECHO -------------------------------- ECHO --------------------------------
ECHO Changing to build folder [%~dp0] p1 [%1] p2 [%2] ECHO Changing to build folder [%~dp0] p1 [%1] p2 [%2]
rem pause rem pause
cd /d "%~dp0" cd /d "%~dp0"
ECHO Checking for windows binaries... ECHO Checking for windows binaries...
ECHO Calling .\megaglest.exe --version ECHO Calling .\megaglest.exe --version
set mg_version= set mg_version=
set mg_WIN32_ARCH=win32-i386 set mg_WIN32_ARCH=win32-i386
set mg_WIN64_ARCH=win64-x86_64 set mg_WIN64_ARCH=win64-x86_64
set mg_arch=%mg_WIN32_ARCH% set mg_arch=%mg_WIN32_ARCH%
for /f "tokens=* delims= " %%i in ('.\megaglest.exe --version') do call :mgver %%i for /f "tokens=* delims= " %%i in ('.\megaglest.exe --version') do call :mgver %%i
echo after #1 for loop echo after #1 for loop
goto got_ver goto got_ver
:mgver :mgver
rem echo mgver [%1%] mg_version is [%mg_version%] rem echo mgver [%1%] mg_version is [%mg_version%]
if "%mg_version%." == "." goto set_mg_ver if "%mg_version%." == "." goto set_mg_ver
rem echo in mgver ARCH [%mg_arch%] 1[%1] 2[%2] 3[%3] 4[%4] 5[%5] 6[%6] rem echo in mgver ARCH [%mg_arch%] 1[%1] 2[%2] 3[%3] 4[%4] 5[%5] 6[%6]
if "%1." == "[64bit]." set mg_arch=%mg_WIN64_ARCH% if "%1." == "[64bit]." set mg_arch=%mg_WIN64_ARCH%
if "%2." == "[64bit]." set mg_arch=%mg_WIN64_ARCH% if "%2." == "[64bit]." set mg_arch=%mg_WIN64_ARCH%
if "%3." == "[64bit]." set mg_arch=%mg_WIN64_ARCH% if "%3." == "[64bit]." set mg_arch=%mg_WIN64_ARCH%
if "%4." == "[64bit]." set mg_arch=%mg_WIN64_ARCH% if "%4." == "[64bit]." set mg_arch=%mg_WIN64_ARCH%
if "%5." == "[64bit]." set mg_arch=%mg_WIN64_ARCH% if "%5." == "[64bit]." set mg_arch=%mg_WIN64_ARCH%
if "%6." == "[64bit]." set mg_arch=%mg_WIN64_ARCH% if "%6." == "[64bit]." set mg_arch=%mg_WIN64_ARCH%
if "%7." == "[64bit]." set mg_arch=%mg_WIN64_ARCH% if "%7." == "[64bit]." set mg_arch=%mg_WIN64_ARCH%
if "%8." == "[64bit]." set mg_arch=%mg_WIN64_ARCH% if "%8." == "[64bit]." set mg_arch=%mg_WIN64_ARCH%
if "%9." == "[64bit]." set mg_arch=%mg_WIN64_ARCH% if "%9." == "[64bit]." set mg_arch=%mg_WIN64_ARCH%
rem echo after #2 mg_arch [%mg_arch%] rem echo after #2 mg_arch [%mg_arch%]
goto :eof goto :eof
:set_mg_ver :set_mg_ver
set mg_version=%2% set mg_version=%2%
rem echo set_mg_ver 1[%mg_version%] rem echo set_mg_ver 1[%mg_version%]
set mg_version=%mg_version:~1% set mg_version=%mg_version:~1%
rem echo set_mg_ver 2[%mg_version%] rem echo set_mg_ver 2[%mg_version%]
:exit_mg_ver :exit_mg_ver
rem exit /B 0 rem exit /B 0
goto :eof goto :eof
:got_ver :got_ver
rem echo got_ver [%mg_version%] rem echo got_ver [%mg_version%]
rem pause rem pause
set RELEASENAME=megaglest-binary-%mg_arch% set RELEASENAME=megaglest-binary-%mg_arch%
set PACKAGE=%RELEASENAME%-%mg_version%.7z set PACKAGE=%RELEASENAME%-%mg_version%.7z
cd /d release-data\ cd /d release-data\
echo creating [%PACKAGE%] ... echo creating [%PACKAGE%] ...
if exist "%PACKAGE%" del "%PACKAGE%" if exist "%PACKAGE%" del "%PACKAGE%"
set custom_sevenZ_params= set custom_sevenZ_params=
if not "%SEVENZ_MG_COMPRESS_PARAMS%." == "." set custom_sevenZ_params=%SEVENZ_MG_COMPRESS_PARAMS% if not "%SEVENZ_MG_COMPRESS_PARAMS%." == "." set custom_sevenZ_params=%SEVENZ_MG_COMPRESS_PARAMS%
echo custom_sevenZ_params [%custom_sevenZ_params%] ... echo custom_sevenZ_params [%custom_sevenZ_params%] ...
if "%mg_arch%" == "%mg_WIN32_ARCH%" 7z a -mmt -mx=9 %custom_sevenZ_params% -ms=on -mhc=on "%PACKAGE%" megaglest.exe megaglest_g3dviewer.exe megaglest_editor.exe libvlc.dll libvlccore.dll lua plugins 7z.exe 7z.dll xml2g.exe openal32.dll g2xml.exe glest.ini ..\shared\glestkeys.ini ..\shared\servers.ini if "%mg_arch%" == "%mg_WIN32_ARCH%" 7z a -mmt -mx=9 %custom_sevenZ_params% -ms=on -mhc=on "%PACKAGE%" megaglest.exe megaglest_g3dviewer.exe megaglest_editor.exe libvlc.dll libvlccore.dll lua plugins 7z.exe 7z.dll xml2g.exe openal32.dll g2xml.exe glest.ini ..\shared\glestkeys.ini ..\shared\servers.ini
if "%mg_arch%" == "%mg_WIN64_ARCH%" 7z a -mmt -mx=9 %custom_sevenZ_params% -ms=on -mhc=on "%PACKAGE%" megaglestx64.exe megaglest_g3dviewerx64.exe megaglest_editorx64.exe 7z.exe 7z.dll xml2gx64.exe openal64.dll g2xmlx64.exe glest.ini ..\shared\glestkeys.ini ..\shared\servers.ini if "%mg_arch%" == "%mg_WIN64_ARCH%" 7z a -mmt -mx=9 %custom_sevenZ_params% -ms=on -mhc=on "%PACKAGE%" megaglestx64.exe megaglest_g3dviewerx64.exe megaglest_editorx64.exe 7z.exe 7z.dll xml2gx64.exe openal64.dll g2xmlx64.exe glest.ini ..\shared\glestkeys.ini ..\shared\servers.ini
dir "%PACKAGE%" dir "%PACKAGE%"
cd /d "%~dp0" cd /d "%~dp0"
rem pause execution so we can see the output before the batch file exits rem pause execution so we can see the output before the batch file exits
if not "%1" == "nopause" pause if not "%1" == "nopause" pause

View File

@ -1,132 +1,132 @@
@echo off @echo off
rem change to the directory of this batch file rem change to the directory of this batch file
ECHO -------------------------------- ECHO --------------------------------
ECHO Changing to build folder [%~dp0] p1 [%1] p2 [%2] ECHO Changing to build folder [%~dp0] p1 [%1] p2 [%2]
rem pause rem pause
cd /d "%~dp0" cd /d "%~dp0"
set mg_version= set mg_version=
for /f "tokens=2 delims= " %%i in ('.\megaglest.exe --version') do call :mgver %%i for /f "tokens=2 delims= " %%i in ('.\megaglest.exe --version') do call :mgver %%i
goto got_ver goto got_ver
:mgver :mgver
rem echo *[%1%]* rem echo *[%1%]*
if "%mg_version%." == "." goto set_mg_ver if "%mg_version%." == "." goto set_mg_ver
goto exit_mg_ver goto exit_mg_ver
:set_mg_ver :set_mg_ver
set mg_version=%1% set mg_version=%1%
rem echo *1[%mg_version%] rem echo *1[%mg_version%]
set mg_version=%mg_version:~1% set mg_version=%mg_version:~1%
rem echo *2[%mg_version%] rem echo *2[%mg_version%]
:exit_mg_ver :exit_mg_ver
exit /B 0 exit /B 0
:got_ver :got_ver
echo [%mg_version%] echo [%mg_version%]
set RELEASENAME=megaglest-standalone-data set RELEASENAME=megaglest-standalone-data
set PACKAGE=%RELEASENAME%-%mg_version%.7z set PACKAGE=%RELEASENAME%-%mg_version%.7z
set RELEASEDIR=release-data\%RELEASENAME%-%mg_version% set RELEASEDIR=release-data\%RELEASENAME%-%mg_version%
set PROJDIR=..\..\ set PROJDIR=..\..\
set REPODIR=%~dp0\..\..\ set REPODIR=%~dp0\..\..\
set PATH=%path%;%~dp0.\ set PATH=%path%;%~dp0.\
rem to debug creating the archive only rem to debug creating the archive only
rem goto make_archive rem goto make_archive
echo Creating data package in [%RELEASEDIR%] echo Creating data package in [%RELEASEDIR%]
if exist %RELEASEDIR% echo Cleaning previous release folder [%RELEASEDIR%] if exist %RELEASEDIR% echo Cleaning previous release folder [%RELEASEDIR%]
if exist %RELEASEDIR% rd /s /q %RELEASEDIR% if exist %RELEASEDIR% rd /s /q %RELEASEDIR%
mkdir %RELEASEDIR% mkdir %RELEASEDIR%
rem copy data rem copy data
echo Copying data ... echo Copying data ...
mkdir %RELEASEDIR%\data\ mkdir %RELEASEDIR%\data\
cd /d %RELEASEDIR%\data\ cd /d %RELEASEDIR%\data\
echo GIT ARCHIVE data ... echo GIT ARCHIVE data ...
git archive --remote %REPODIR%\data\glest_game\ HEAD:data | tar -x git archive --remote %REPODIR%\data\glest_game\ HEAD:data | tar -x
cd /d "%~dp0" cd /d "%~dp0"
rem pause rem pause
mkdir %RELEASEDIR%\docs\ mkdir %RELEASEDIR%\docs\
cd /d %RELEASEDIR%\docs\ cd /d %RELEASEDIR%\docs\
echo GIT ARCHIVE docs ... echo GIT ARCHIVE docs ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:docs | tar -x git archive --remote %REPODIR%/data/glest_game/ HEAD:docs | tar -x
cd /d "%~dp0" cd /d "%~dp0"
cd /d %RELEASEDIR%\docs\ cd /d %RELEASEDIR%\docs\
echo GIT ARCHIVE CHANGELOG.txt ... echo GIT ARCHIVE CHANGELOG.txt ...
git archive --remote %REPODIR% HEAD:docs/ CHANGELOG.txt | tar -x git archive --remote %REPODIR% HEAD:docs/ CHANGELOG.txt | tar -x
cd /d "%~dp0" cd /d "%~dp0"
rem pause rem pause
cd /d %RELEASEDIR%\docs\ cd /d %RELEASEDIR%\docs\
echo GIT ARCHIVE README.txt ... echo GIT ARCHIVE README.txt ...
git archive --remote %REPODIR% HEAD:docs/ README.txt | tar -x git archive --remote %REPODIR% HEAD:docs/ README.txt | tar -x
cd /d "%~dp0" cd /d "%~dp0"
rem pause rem pause
mkdir %RELEASEDIR%\maps\ mkdir %RELEASEDIR%\maps\
cd /d %RELEASEDIR%\maps\ cd /d %RELEASEDIR%\maps\
echo GIT ARCHIVE maps ... echo GIT ARCHIVE maps ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:maps | tar -x git archive --remote %REPODIR%/data/glest_game/ HEAD:maps | tar -x
cd /d "%~dp0" cd /d "%~dp0"
mkdir %RELEASEDIR%\scenarios\ mkdir %RELEASEDIR%\scenarios\
cd /d %RELEASEDIR%\scenarios\ cd /d %RELEASEDIR%\scenarios\
echo GIT ARCHIVE scenarios ... echo GIT ARCHIVE scenarios ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:scenarios | tar -x git archive --remote %REPODIR%/data/glest_game/ HEAD:scenarios | tar -x
cd /d "%~dp0" cd /d "%~dp0"
mkdir %RELEASEDIR%\techs\ mkdir %RELEASEDIR%\techs\
cd /d %RELEASEDIR%\techs\ cd /d %RELEASEDIR%\techs\
echo GIT ARCHIVE techs ... echo GIT ARCHIVE techs ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:techs | tar -x git archive --remote %REPODIR%/data/glest_game/ HEAD:techs | tar -x
cd /d "%~dp0" cd /d "%~dp0"
mkdir %RELEASEDIR%\tilesets\ mkdir %RELEASEDIR%\tilesets\
cd /d %RELEASEDIR%\tilesets\ cd /d %RELEASEDIR%\tilesets\
echo GIT ARCHIVE tilesets ... echo GIT ARCHIVE tilesets ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:tilesets | tar -x git archive --remote %REPODIR%/data/glest_game/ HEAD:tilesets | tar -x
cd /d "%~dp0" cd /d "%~dp0"
mkdir %RELEASEDIR%\tutorials\ mkdir %RELEASEDIR%\tutorials\
cd /d %RELEASEDIR%\tutorials\ cd /d %RELEASEDIR%\tutorials\
echo GIT ARCHIVE tutorials ... echo GIT ARCHIVE tutorials ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:tutorials | tar -x git archive --remote %REPODIR%/data/glest_game/ HEAD:tutorials | tar -x
cd /d "%~dp0" cd /d "%~dp0"
rem special export for flag images rem special export for flag images
mkdir %RELEASEDIR%\data\core\misc_textures\flags\ mkdir %RELEASEDIR%\data\core\misc_textures\flags\
cd /d %RELEASEDIR%\data\core\misc_textures\flags\ cd /d %RELEASEDIR%\data\core\misc_textures\flags\
echo GIT ARCHIVE flags ... echo GIT ARCHIVE flags ...
git archive --remote %REPODIR% HEAD:source/masterserver/flags | tar -x git archive --remote %REPODIR% HEAD:source/masterserver/flags | tar -x
cd /d "%~dp0" cd /d "%~dp0"
rem START rem START
rem remove embedded data rem remove embedded data
rem rm -rf "%RELEASEDIR%\data\core\fonts" rem rm -rf "%RELEASEDIR%\data\core\fonts"
rem END rem END
:make_archive :make_archive
rem echo Current directory[%CD%] rem echo Current directory[%CD%]
echo creating data archive: %PACKAGE% echo creating data archive: %PACKAGE%
if exist release-data%PACKAGE% del release-data%PACKAGE% if exist release-data%PACKAGE% del release-data%PACKAGE%
cd /d %RELEASEDIR% cd /d %RELEASEDIR%
rem echo Current directory[%CD%] rem echo Current directory[%CD%]
set custom_sevenZ_params= set custom_sevenZ_params=
if not "%SEVENZ_MG_COMPRESS_PARAMS%." == "." set custom_sevenZ_params=%SEVENZ_MG_COMPRESS_PARAMS% if not "%SEVENZ_MG_COMPRESS_PARAMS%." == "." set custom_sevenZ_params=%SEVENZ_MG_COMPRESS_PARAMS%
echo custom_sevenZ_params [%custom_sevenZ_params%] ... echo custom_sevenZ_params [%custom_sevenZ_params%] ...
..\..\7z.exe a -mmt -mx=9 %custom_sevenZ_params% -ms=on -mhc=on ..\%PACKAGE% * ..\..\7z.exe a -mmt -mx=9 %custom_sevenZ_params% -ms=on -mhc=on ..\%PACKAGE% *
dir "..\%PACKAGE%" dir "..\%PACKAGE%"
cd /d "%~dp0" cd /d "%~dp0"
rem pause execution so we can see the output before the batch file exits rem pause execution so we can see the output before the batch file exits
if not "%1" == "nopause" pause if not "%1" == "nopause" pause

2
source/.gitignore vendored
View File

@ -1 +1 @@
windows_deps/ /windows_deps*/

View File

@ -1,20 +1,20 @@
 
Microsoft Visual Studio Solution File, Format Version 10.00 Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008 # Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libircclient", "libircclient\libircclient.vcproj", "{DF5B1705-0F15-4F0B-BD89-27E461F57777}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libircclient", "libircclient\libircclient.vcproj", "{DF5B1705-0F15-4F0B-BD89-27E461F57777}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32 Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32 Release|Win32 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DF5B1705-0F15-4F0B-BD89-27E461F57777}.Debug|Win32.ActiveCfg = Debug|Win32 {DF5B1705-0F15-4F0B-BD89-27E461F57777}.Debug|Win32.ActiveCfg = Debug|Win32
{DF5B1705-0F15-4F0B-BD89-27E461F57777}.Debug|Win32.Build.0 = Debug|Win32 {DF5B1705-0F15-4F0B-BD89-27E461F57777}.Debug|Win32.Build.0 = Debug|Win32
{DF5B1705-0F15-4F0B-BD89-27E461F57777}.Release|Win32.ActiveCfg = Release|Win32 {DF5B1705-0F15-4F0B-BD89-27E461F57777}.Release|Win32.ActiveCfg = Release|Win32
{DF5B1705-0F15-4F0B-BD89-27E461F57777}.Release|Win32.Build.0 = Release|Win32 {DF5B1705-0F15-4F0B-BD89-27E461F57777}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@ -1,174 +1,174 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9.00" Version="9.00"
Name="libircclient" Name="libircclient"
ProjectGUID="{DF5B1705-0F15-4F0B-BD89-27E461F57777}" ProjectGUID="{DF5B1705-0F15-4F0B-BD89-27E461F57777}"
RootNamespace="libircclient" RootNamespace="libircclient"
TargetFrameworkVersion="196613" TargetFrameworkVersion="196613"
> >
<Platforms> <Platforms>
<Platform <Platform
Name="Win32" Name="Win32"
/> />
</Platforms> </Platforms>
<ToolFiles> <ToolFiles>
</ToolFiles> </ToolFiles>
<Configurations> <Configurations>
<Configuration <Configuration
Name="Debug|Win32" Name="Debug|Win32"
OutputDirectory="..\..\build\lib" OutputDirectory="..\..\build\lib"
IntermediateDirectory="$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="C:\Code\megaglest\trunk\source\win32_deps\libircclient\include" AdditionalIncludeDirectories="C:\Code\megaglest\trunk\source\win32_deps\libircclient\include"
PreprocessorDefinitions="WIN32" PreprocessorDefinitions="WIN32"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="0" RuntimeLibrary="0"
WarningLevel="3" WarningLevel="3"
DebugInformationFormat="4" DebugInformationFormat="4"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory="..\..\build\lib" OutputDirectory="..\..\build\lib"
IntermediateDirectory="$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="C:\Code\megaglest\trunk\source\win32_deps\libircclient\include" AdditionalIncludeDirectories="C:\Code\megaglest\trunk\source\win32_deps\libircclient\include"
PreprocessorDefinitions="WIN32" PreprocessorDefinitions="WIN32"
RuntimeLibrary="0" RuntimeLibrary="0"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
WarningLevel="3" WarningLevel="3"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
</Configurations> </Configurations>
<References> <References>
</References> </References>
<Files> <Files>
<Filter <Filter
Name="Source Files" Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
> >
<File <File
RelativePath="..\..\src\libircclient.c" RelativePath="..\..\src\libircclient.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\libircclient.def" RelativePath="..\..\src\libircclient.def"
> >
</File> </File>
</Filter> </Filter>
<Filter <Filter
Name="Header Files" Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd" Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
> >
</Filter> </Filter>
<Filter <Filter
Name="Resource Files" Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
> >
</Filter> </Filter>
</Files> </Files>
<Globals> <Globals>
</Globals> </Globals>
</VisualStudioProject> </VisualStudioProject>

View File

@ -1,145 +0,0 @@
# $Id: Makefile,v 1.55 2009/10/10 19:15:34 nanard Exp $
# MiniUPnP Project
# http://miniupnp.free.fr/
# (c) 2005-2009 Thomas Bernard
# to install use :
# $ PREFIX=/tmp/dummylocation make install
# or
# $ INSTALLPREFIX=/usr/local make install
# or
# make install (will go to /usr/bin, /usr/lib, etc...)
OS = $(shell uname -s)
CC ?= gcc
#AR = gar
#CFLAGS = -fPIC -O -Wall -g -DDEBUG
CFLAGS ?= -fPIC -O -Wall -DNDEBUG -DMINIUPNPC_SET_SOCKET_TIMEOUT
INSTALL = install
SH = /bin/sh
#following libs are needed on Solaris
#LDLIBS=-lsocket -lnsl -lresolv
# APIVERSION is used to build SONAME
APIVERSION = 4
SRCS = igd_desc_parse.c miniupnpc.c minixml.c minisoap.c miniwget.c \
upnpc.c upnpcommands.c upnpreplyparse.c testminixml.c \
minixmlvalid.c testupnpreplyparse.c minissdpc.c \
upnperrors.c testigddescparse.c
LIBOBJS = miniwget.o minixml.o igd_desc_parse.o minisoap.o \
miniupnpc.o upnpreplyparse.o upnpcommands.o minissdpc.o \
upnperrors.o
OBJS = $(patsubst %.c,%.o,$(SRCS))
# HEADERS to install
HEADERS = miniupnpc.h miniwget.h upnpcommands.h igd_desc_parse.h \
upnpreplyparse.h upnperrors.h declspec.h
# library names
LIBRARY = libminiupnpc.a
ifeq ($(OS), Darwin)
SHAREDLIBRARY = libminiupnpc.dylib
SONAME = $(basename $(SHAREDLIBRARY)).$(APIVERSION).dylib
else
SHAREDLIBRARY = libminiupnpc.so
SONAME = $(SHAREDLIBRARY).$(APIVERSION)
endif
EXECUTABLES = upnpc-static upnpc-shared \
testminixml minixmlvalid testupnpreplyparse \
testigddescparse
# install directories
INSTALLPREFIX ?= $(PREFIX)/usr
INSTALLDIRINC = $(INSTALLPREFIX)/include/miniupnpc
INSTALLDIRLIB = $(INSTALLPREFIX)/lib
INSTALLDIRBIN = $(INSTALLPREFIX)/bin
.PHONY: install clean depend all installpythonmodule
all: validateminixml $(LIBRARY) $(EXECUTABLES)
pythonmodule: $(LIBRARY) miniupnpcmodule.c setup.py
python setup.py build
touch $@
installpythonmodule: pythonmodule
python setup.py install
validateminixml: minixmlvalid
@echo "minixml validation test"
./minixmlvalid
touch $@
clean:
$(RM) $(LIBRARY) $(SHAREDLIBRARY) $(EXECUTABLES) $(OBJS) miniupnpcstrings.h
# clean python stuff
$(RM) pythonmodule validateminixml
$(RM) -r build/ dist/
#python setup.py clean
install: $(LIBRARY) $(SHAREDLIBRARY) $(EXECUTABLES)
$(INSTALL) -d $(INSTALLDIRINC)
$(INSTALL) -m 644 $(HEADERS) $(INSTALLDIRINC)
$(INSTALL) -d $(INSTALLDIRLIB)
$(INSTALL) -m 644 $(LIBRARY) $(INSTALLDIRLIB)
$(INSTALL) -m 644 $(SHAREDLIBRARY) $(INSTALLDIRLIB)/$(SONAME)
$(INSTALL) -d $(INSTALLDIRBIN)
$(INSTALL) -m 755 upnpc-shared $(INSTALLDIRBIN)/upnpc
ln -fs $(SONAME) $(INSTALLDIRLIB)/$(SHAREDLIBRARY)
cleaninstall:
$(RM) -r $(INSTALLDIRINC)
$(RM) $(INSTALLDIRLIB)/$(LIBRARY)
$(RM) $(INSTALLDIRLIB)/$(SHAREDLIBRARY)
depend:
makedepend -Y -- $(CFLAGS) -- $(SRCS) 2>/dev/null
$(LIBRARY): $(LIBOBJS)
$(AR) crs $@ $?
$(SHAREDLIBRARY): $(LIBOBJS)
ifeq ($(OS), Darwin)
$(CC) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
else
$(CC) -shared -Wl,-soname,$(SONAME) -o $@ $^
endif
upnpc-static: upnpc.o $(LIBRARY) $(LDLIBS)
$(CC) -o $@ $^
upnpc-shared: upnpc.o $(SHAREDLIBRARY) $(LDLIBS)
$(CC) -o $@ $^
testminixml: minixml.o igd_desc_parse.o testminixml.o
minixmlvalid: minixml.o minixmlvalid.o
testupnpreplyparse: testupnpreplyparse.o minixml.o upnpreplyparse.o
testigddescparse: testigddescparse.o igd_desc_parse.o minixml.o
miniupnpcstrings.h: miniupnpcstrings.h.in updateminiupnpcstrings.sh
$(SH) updateminiupnpcstrings.sh
# DO NOT DELETE THIS LINE -- make depend depends on it.
igd_desc_parse.o: igd_desc_parse.h
miniupnpc.o: miniupnpc.h declspec.h igd_desc_parse.h minissdpc.h miniwget.h
miniupnpc.o: minisoap.h minixml.h upnpcommands.h upnpreplyparse.h
minixml.o: minixml.h
minisoap.o: minisoap.h miniupnpcstrings.h
miniwget.o: miniupnpc.h declspec.h igd_desc_parse.h miniupnpcstrings.h
miniwget.o: miniwget.h
upnpc.o: miniwget.h declspec.h miniupnpc.h igd_desc_parse.h upnpcommands.h
upnpc.o: upnpreplyparse.h upnperrors.h
upnpcommands.o: upnpcommands.h upnpreplyparse.h declspec.h miniupnpc.h
upnpcommands.o: igd_desc_parse.h
upnpreplyparse.o: upnpreplyparse.h minixml.h
testminixml.o: minixml.h igd_desc_parse.h
minixmlvalid.o: minixml.h
testupnpreplyparse.o: upnpreplyparse.h
minissdpc.o: minissdpc.h miniupnpc.h declspec.h igd_desc_parse.h codelength.h
upnperrors.o: upnperrors.h declspec.h upnpcommands.h upnpreplyparse.h
testigddescparse.o: igd_desc_parse.h minixml.h