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
*.bat -text
*.vcproj -text
*.nsi -text
*.sln -text
*.vbs -text
*.bat eol=crlf
*.vcproj eol=crlf
*.nsi eol=crlf
*.sln eol=crlf
*.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
*.ttf -text -diff
@ -27,6 +33,8 @@
*.xcf -text -diff
*.blend -text -diff
*.blend1 -text -diff
.gitattributes export-ignore
.git export-ignore
.gitignore export-ignore
.gitattributes export-ignore
.gitmodules export-ignore

35
.gitignore vendored
View File

@ -6,17 +6,16 @@
# Vim
*.un~
Session.vim
MegaGlest.kdev4
/mk/linux/mydata
/mk/linux/release
/mk/linux/linux_symbols
/mk/linux/core
/mk/linux/core.bak
# KDevelop
*.kdev4
# Meld
*.orig
## OSX
Icon
## Windows
*.old
# Windows image file caches
Thumbs.db
thumbs.db
@ -55,26 +54,8 @@ $RECYCLE.BIN/
## Repo
*.blend
*.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
/source/windows_deps_2010
/source/windows_deps_2010_old
/google-breakpad/
# Coverity
/cov-int
/cov-int/.*
# convert_faction_xml2html
/html/

@ -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
- Moved the project from sourceforge.net to github.com and from subversion to git
- 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
- Code quality improvements as reported by cppcheck and coverity (and clang)
- 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.
- animated tileset object support.
- 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
- new maps
- better network game performance / management to handle slower clients.
@ -55,23 +57,30 @@ v3.7.0
- auto word wrapping for message boxes
- headless server can run in local lan mode (does not broadcast to master server)
- 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).
- cell markers allow players to create markers anywhere on the map and associate a note with them. All team players see the markers.
- third person view allows you to follow a selected unit. Select one unit anf press f4 to
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
- admin player can disconnect other network players in game
- 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)
- network multi-player 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
- more game data validation for commandline modders, see --help for more info
- many new lua commands for scenario modders
- 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
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
- customizable unit, resource and upgrade language files
- tilesets support animated models
@ -81,17 +90,21 @@ v3.7.0
- particle colors are now affected by the time of day
- new game hints are displayed while loading a new game
- 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
- experimental big endian and non x86 architecure support (need testers to give feedback)
v3.6.0
- 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)
- 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)
- new commandline option to support standalone modes example: megaglest --load-mod=x (x is the path to the mod)
- customized port # override via commandline (useful for multiple headless servers) example:
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)
- lower CPU / RAM requirements in headless server mode
- 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
- Numerous bug fixes as reported in the bugs forum
- 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 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.
- New attack boost system (currently used by Romans faction) which allows new types of
in game unit effects.
- 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.
- Music fades in and out of game start/stop
- New low food warning indicators tells players when they are running out of food
- 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
- many more...
@ -121,21 +138,25 @@ v3.5.2
- Map editor now supports diagonal flipping
- Windows users now have a shortcut to the mod folder in their MegaGlest programs Menu.
- 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
- 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 support for non ASCII file paths (like Japanese, etc) for international users and Unicode enabled parts of the code
- Better video handling for buggy opengl drivers that don't properly handle non power
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
- Much better pathfinder performance
- 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)
- Game data cleanup (duplicate sound files have been merged in megapack) and non free content replaced.
(autumn and desert tilesets)
- Better Linux distro packaing support (by default megaglest works in standard linux
paths and make install added)
- 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)
- Allow factions in a techtree to share common data using the special tag in xml files $COMMONDATAPATH
which points to the techtrees commondata/ folder.
- Allow factions in a techtree to share common data using the special tag in xml files
$COMMONDATAPATH which points to the techtrees commondata/ folder.
- standardized games and tools startup scripts with names starting with 'startup_'
- updated translations for German, Italian and French
- bugfixes reported in 3.5.0
@ -158,12 +179,14 @@ v3.5.2
- Default screenshot format is now jpg (configurable in options menu)
- Fixed some performance problems with 'stuck' units
- 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
- support for sending 7z tilesets and techtrees over network
- 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
- 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.
- added jpg screenshot support
- optional compressed GPU texture support
@ -175,9 +198,12 @@ v3.5.2
3.4.0
- new attack alarms use visual and audio cues to indicate when and where you or your team are under attack
- 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 attack alarms use visual and audio cues to indicate when and where you or your
team are under attack
- 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)
- improved sound handling for better stability and smoother game play
- 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
- Damage and armor types
- 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
- 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
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
- Performance counters added for world update timing
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
- 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.
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.
The following earlier versions have been released, but no changelog is available:
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.3
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.3
0.0.2
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.
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

Binary file not shown.

28
mk/linux/.gitignore vendored
View File

@ -1,16 +1,20 @@
megaglest
megaglest.6
megaglest_*
lib
lib/
mojosetup/build
mojosetup/build/
mojosetup/cmake-build
mojosetup/cmake-build/
mojosetup/megaglest-installer/MegaGlest*
mojosetup/megaglest-installer/data
mojosetup/megaglest-installer/data/
!*.desktop
core
core.bak
/build/
/release/
/linux_symbols/
/mydata
/lib/
/lib_bkp/
# Coverity
cov-analysis*/
cov-int
cov-int/
/cov-analysis*/
/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 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 (contributed by David Manura and Mike Pall)
@setlocal
@set MYCOMPILE=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE
@set MYLINK=link /nologo
@set MYMT=mt /nologo
cd src
%MYCOMPILE% /DLUA_BUILD_AS_DLL l*.c
del lua.obj luac.obj
%MYLINK% /DLL /out:lua51.dll l*.obj
if exist lua51.dll.manifest^
%MYMT% -manifest lua51.dll.manifest -outputresource:lua51.dll;2
%MYCOMPILE% /DLUA_BUILD_AS_DLL lua.c
%MYLINK% /out:lua.exe lua.obj lua51.lib
if exist lua.exe.manifest^
%MYMT% -manifest lua.exe.manifest -outputresource:lua.exe
%MYCOMPILE% l*.c print.c
del lua.obj linit.obj lbaselib.obj ldblib.obj liolib.obj lmathlib.obj^
loslib.obj ltablib.obj lstrlib.obj loadlib.obj
%MYLINK% /out:luac.exe *.obj
if exist luac.exe.manifest^
%MYMT% -manifest luac.exe.manifest -outputresource:luac.exe
del *.obj *.manifest
cd ..
@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 It creates lua51.dll, lua51.lib, lua.exe, and luac.exe in src.
@rem (contributed by David Manura and Mike Pall)
@setlocal
@set MYCOMPILE=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE
@set MYLINK=link /nologo
@set MYMT=mt /nologo
cd src
%MYCOMPILE% /DLUA_BUILD_AS_DLL l*.c
del lua.obj luac.obj
%MYLINK% /DLL /out:lua51.dll l*.obj
if exist lua51.dll.manifest^
%MYMT% -manifest lua51.dll.manifest -outputresource:lua51.dll;2
%MYCOMPILE% /DLUA_BUILD_AS_DLL lua.c
%MYLINK% /out:lua.exe lua.obj lua51.lib
if exist lua.exe.manifest^
%MYMT% -manifest lua.exe.manifest -outputresource:lua.exe
%MYCOMPILE% l*.c print.c
del lua.obj linit.obj lbaselib.obj ldblib.obj liolib.obj lmathlib.obj^
loslib.obj ltablib.obj lstrlib.obj loadlib.obj
%MYLINK% /out:luac.exe *.obj
if exist luac.exe.manifest^
%MYMT% -manifest luac.exe.manifest -outputresource:luac.exe
del *.obj *.manifest
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
@ -6,10 +18,7 @@ Release/
/glestkeys.ini
/servers.ini
/xml_test_malformed.xml
lua/
# Coverity
cov-analysis*/
cov-int
cov-int/
/cov-analysis*/
/cov-int

View File

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

View File

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

View File

@ -1,10 +1,10 @@
@echo off
mkdir build
cd build
rem set build_verbose="-D CMAKE_VERBOSE_MAKEFILE=ON"
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 ..
mingw32-make
cd ..\
@echo off
mkdir build
cd build
rem set build_verbose="-D CMAKE_VERBOSE_MAKEFILE=ON"
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 ..
mingw32-make
cd ..\

View File

@ -1,88 +1,88 @@
@echo off
rem
rem Upload Coverity s
rem Requires:
rem - curl.exe, built with SSL support: http://curl.haxx.se/download.html
rem - wget.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
rem Change into this directory
cd /d "%~dp0"
rem Project name (case sensitive)
set PROJECT=MegaGlest
rem read in config settings
if not exist ".coverity-scan" (
echo -----------------------------------------
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
goto END
)
setlocal disabledelayedexpansion
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
set TOKEN=%prop_TOKEN%
rem E-Mail address of registered Coverity Scan user with project access
set EMAIL=%prop_EMAIL%
set COVERITY_ANALYSIS_ROOT=%prop_COVERITY_ANALYSIS_ROOT%
echo TOKEN [%TOKEN%] EMAIL [%EMAIL%] COVERITY_ANALYSIS_ROOT [%COVERITY_ANALYSIS_ROOT%]
rem pause
rem Description of this build (can be any string)
set DESCRIPTION=Windows-32_%COMPUTERNAME%
rem Where to store the data gathered by the Coverity Scan Build Tool
set BUILDTOOL=cov-int
rem ------------------------------------------------------------------------------
set GITVERSION_SHA1=.
set GITVERSION_REV=.
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 ('git rev-list HEAD --count') do @set GITVERSION_REV=%%a
set VERSION=%GITVERSION_REV%.%GITVERSION_SHA1%
set FILENAME=%PROJECT%_%DESCRIPTION%_%VERSION%
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 7z.exe x %TEMP%\coverity_tool.zip
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\
set MG_COV_PATH_SET=TRUE
cov-build --dir %BUILDTOOL% build-mg-2010.bat nopause rebuild
if ERRORLEVEL 1 GOTO ERROR
7z.exe a %FILENAME%.tar %BUILDTOOL%\
7z.exe a %FILENAME%.tar.gz %FILENAME%.tar
del /Q /F %FILENAME%.tar
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
rem pause
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
if ERRORLEVEL 1 GOTO ERROR
GOTO CLEANUP
:CLEANUP
del /Q /F %FILENAME%.tar.gz
rd /Q /S %BUILDTOOL%\
GOTO END
:ERROR
echo An error occurred.
:END
@echo off
rem
rem Upload Coverity s
rem Requires:
rem - curl.exe, built with SSL support: http://curl.haxx.se/download.html
rem - wget.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
rem Change into this directory
cd /d "%~dp0"
rem Project name (case sensitive)
set PROJECT=MegaGlest
rem read in config settings
if not exist ".coverity-scan" (
echo -----------------------------------------
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
goto END
)
setlocal disabledelayedexpansion
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
set TOKEN=%prop_TOKEN%
rem E-Mail address of registered Coverity Scan user with project access
set EMAIL=%prop_EMAIL%
set COVERITY_ANALYSIS_ROOT=%prop_COVERITY_ANALYSIS_ROOT%
echo TOKEN [%TOKEN%] EMAIL [%EMAIL%] COVERITY_ANALYSIS_ROOT [%COVERITY_ANALYSIS_ROOT%]
rem pause
rem Description of this build (can be any string)
set DESCRIPTION=Windows-32_%COMPUTERNAME%
rem Where to store the data gathered by the Coverity Scan Build Tool
set BUILDTOOL=cov-int
rem ------------------------------------------------------------------------------
set GITVERSION_SHA1=.
set GITVERSION_REV=.
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 ('git rev-list HEAD --count') do @set GITVERSION_REV=%%a
set VERSION=%GITVERSION_REV%.%GITVERSION_SHA1%
set FILENAME=%PROJECT%_%DESCRIPTION%_%VERSION%
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 7z.exe x %TEMP%\coverity_tool.zip
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\
set MG_COV_PATH_SET=TRUE
cov-build --dir %BUILDTOOL% build-mg-2010.bat nopause rebuild
if ERRORLEVEL 1 GOTO ERROR
7z.exe a %FILENAME%.tar %BUILDTOOL%\
7z.exe a %FILENAME%.tar.gz %FILENAME%.tar
del /Q /F %FILENAME%.tar
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
rem pause
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
if ERRORLEVEL 1 GOTO ERROR
GOTO CLEANUP
:CLEANUP
del /Q /F %FILENAME%.tar.gz
rd /Q /S %BUILDTOOL%\
GOTO END
:ERROR
echo An error occurred.
:END

View File

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

View File

@ -1,72 +1,72 @@
@echo off
rem change to the directory of this batch file
ECHO --------------------------------
ECHO Changing to build folder [%~dp0] p1 [%1] p2 [%2]
rem pause
cd /d "%~dp0"
ECHO Checking for windows binaries...
ECHO Calling .\megaglest.exe --version
set mg_version=
set mg_WIN32_ARCH=win32-i386
set mg_WIN64_ARCH=win64-x86_64
set mg_arch=%mg_WIN32_ARCH%
for /f "tokens=* delims= " %%i in ('.\megaglest.exe --version') do call :mgver %%i
echo after #1 for loop
goto got_ver
:mgver
rem echo mgver [%1%] mg_version is [%mg_version%]
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]
if "%1." == "[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 "%4." == "[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 "%7." == "[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%
rem echo after #2 mg_arch [%mg_arch%]
goto :eof
:set_mg_ver
set mg_version=%2%
rem echo set_mg_ver 1[%mg_version%]
set mg_version=%mg_version:~1%
rem echo set_mg_ver 2[%mg_version%]
:exit_mg_ver
rem exit /B 0
goto :eof
:got_ver
rem echo got_ver [%mg_version%]
rem pause
set RELEASENAME=megaglest-binary-%mg_arch%
set PACKAGE=%RELEASENAME%-%mg_version%.7z
cd /d release-data\
echo creating [%PACKAGE%] ...
if exist "%PACKAGE%" del "%PACKAGE%"
set custom_sevenZ_params=
if not "%SEVENZ_MG_COMPRESS_PARAMS%." == "." set custom_sevenZ_params=%SEVENZ_MG_COMPRESS_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_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%"
cd /d "%~dp0"
rem pause execution so we can see the output before the batch file exits
if not "%1" == "nopause" pause
@echo off
rem change to the directory of this batch file
ECHO --------------------------------
ECHO Changing to build folder [%~dp0] p1 [%1] p2 [%2]
rem pause
cd /d "%~dp0"
ECHO Checking for windows binaries...
ECHO Calling .\megaglest.exe --version
set mg_version=
set mg_WIN32_ARCH=win32-i386
set mg_WIN64_ARCH=win64-x86_64
set mg_arch=%mg_WIN32_ARCH%
for /f "tokens=* delims= " %%i in ('.\megaglest.exe --version') do call :mgver %%i
echo after #1 for loop
goto got_ver
:mgver
rem echo mgver [%1%] mg_version is [%mg_version%]
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]
if "%1." == "[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 "%4." == "[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 "%7." == "[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%
rem echo after #2 mg_arch [%mg_arch%]
goto :eof
:set_mg_ver
set mg_version=%2%
rem echo set_mg_ver 1[%mg_version%]
set mg_version=%mg_version:~1%
rem echo set_mg_ver 2[%mg_version%]
:exit_mg_ver
rem exit /B 0
goto :eof
:got_ver
rem echo got_ver [%mg_version%]
rem pause
set RELEASENAME=megaglest-binary-%mg_arch%
set PACKAGE=%RELEASENAME%-%mg_version%.7z
cd /d release-data\
echo creating [%PACKAGE%] ...
if exist "%PACKAGE%" del "%PACKAGE%"
set custom_sevenZ_params=
if not "%SEVENZ_MG_COMPRESS_PARAMS%." == "." set custom_sevenZ_params=%SEVENZ_MG_COMPRESS_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_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%"
cd /d "%~dp0"
rem pause execution so we can see the output before the batch file exits
if not "%1" == "nopause" pause

View File

@ -1,132 +1,132 @@
@echo off
rem change to the directory of this batch file
ECHO --------------------------------
ECHO Changing to build folder [%~dp0] p1 [%1] p2 [%2]
rem pause
cd /d "%~dp0"
set mg_version=
for /f "tokens=2 delims= " %%i in ('.\megaglest.exe --version') do call :mgver %%i
goto got_ver
:mgver
rem echo *[%1%]*
if "%mg_version%." == "." goto set_mg_ver
goto exit_mg_ver
:set_mg_ver
set mg_version=%1%
rem echo *1[%mg_version%]
set mg_version=%mg_version:~1%
rem echo *2[%mg_version%]
:exit_mg_ver
exit /B 0
:got_ver
echo [%mg_version%]
set RELEASENAME=megaglest-standalone-data
set PACKAGE=%RELEASENAME%-%mg_version%.7z
set RELEASEDIR=release-data\%RELEASENAME%-%mg_version%
set PROJDIR=..\..\
set REPODIR=%~dp0\..\..\
set PATH=%path%;%~dp0.\
rem to debug creating the archive only
rem goto make_archive
echo Creating data package in [%RELEASEDIR%]
if exist %RELEASEDIR% echo Cleaning previous release folder [%RELEASEDIR%]
if exist %RELEASEDIR% rd /s /q %RELEASEDIR%
mkdir %RELEASEDIR%
rem copy data
echo Copying data ...
mkdir %RELEASEDIR%\data\
cd /d %RELEASEDIR%\data\
echo GIT ARCHIVE data ...
git archive --remote %REPODIR%\data\glest_game\ HEAD:data | tar -x
cd /d "%~dp0"
rem pause
mkdir %RELEASEDIR%\docs\
cd /d %RELEASEDIR%\docs\
echo GIT ARCHIVE docs ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:docs | tar -x
cd /d "%~dp0"
cd /d %RELEASEDIR%\docs\
echo GIT ARCHIVE CHANGELOG.txt ...
git archive --remote %REPODIR% HEAD:docs/ CHANGELOG.txt | tar -x
cd /d "%~dp0"
rem pause
cd /d %RELEASEDIR%\docs\
echo GIT ARCHIVE README.txt ...
git archive --remote %REPODIR% HEAD:docs/ README.txt | tar -x
cd /d "%~dp0"
rem pause
mkdir %RELEASEDIR%\maps\
cd /d %RELEASEDIR%\maps\
echo GIT ARCHIVE maps ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:maps | tar -x
cd /d "%~dp0"
mkdir %RELEASEDIR%\scenarios\
cd /d %RELEASEDIR%\scenarios\
echo GIT ARCHIVE scenarios ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:scenarios | tar -x
cd /d "%~dp0"
mkdir %RELEASEDIR%\techs\
cd /d %RELEASEDIR%\techs\
echo GIT ARCHIVE techs ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:techs | tar -x
cd /d "%~dp0"
mkdir %RELEASEDIR%\tilesets\
cd /d %RELEASEDIR%\tilesets\
echo GIT ARCHIVE tilesets ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:tilesets | tar -x
cd /d "%~dp0"
mkdir %RELEASEDIR%\tutorials\
cd /d %RELEASEDIR%\tutorials\
echo GIT ARCHIVE tutorials ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:tutorials | tar -x
cd /d "%~dp0"
rem special export for flag images
mkdir %RELEASEDIR%\data\core\misc_textures\flags\
cd /d %RELEASEDIR%\data\core\misc_textures\flags\
echo GIT ARCHIVE flags ...
git archive --remote %REPODIR% HEAD:source/masterserver/flags | tar -x
cd /d "%~dp0"
rem START
rem remove embedded data
rem rm -rf "%RELEASEDIR%\data\core\fonts"
rem END
:make_archive
rem echo Current directory[%CD%]
echo creating data archive: %PACKAGE%
if exist release-data%PACKAGE% del release-data%PACKAGE%
cd /d %RELEASEDIR%
rem echo Current directory[%CD%]
set custom_sevenZ_params=
if not "%SEVENZ_MG_COMPRESS_PARAMS%." == "." set custom_sevenZ_params=%SEVENZ_MG_COMPRESS_PARAMS%
echo custom_sevenZ_params [%custom_sevenZ_params%] ...
..\..\7z.exe a -mmt -mx=9 %custom_sevenZ_params% -ms=on -mhc=on ..\%PACKAGE% *
dir "..\%PACKAGE%"
cd /d "%~dp0"
rem pause execution so we can see the output before the batch file exits
if not "%1" == "nopause" pause
@echo off
rem change to the directory of this batch file
ECHO --------------------------------
ECHO Changing to build folder [%~dp0] p1 [%1] p2 [%2]
rem pause
cd /d "%~dp0"
set mg_version=
for /f "tokens=2 delims= " %%i in ('.\megaglest.exe --version') do call :mgver %%i
goto got_ver
:mgver
rem echo *[%1%]*
if "%mg_version%." == "." goto set_mg_ver
goto exit_mg_ver
:set_mg_ver
set mg_version=%1%
rem echo *1[%mg_version%]
set mg_version=%mg_version:~1%
rem echo *2[%mg_version%]
:exit_mg_ver
exit /B 0
:got_ver
echo [%mg_version%]
set RELEASENAME=megaglest-standalone-data
set PACKAGE=%RELEASENAME%-%mg_version%.7z
set RELEASEDIR=release-data\%RELEASENAME%-%mg_version%
set PROJDIR=..\..\
set REPODIR=%~dp0\..\..\
set PATH=%path%;%~dp0.\
rem to debug creating the archive only
rem goto make_archive
echo Creating data package in [%RELEASEDIR%]
if exist %RELEASEDIR% echo Cleaning previous release folder [%RELEASEDIR%]
if exist %RELEASEDIR% rd /s /q %RELEASEDIR%
mkdir %RELEASEDIR%
rem copy data
echo Copying data ...
mkdir %RELEASEDIR%\data\
cd /d %RELEASEDIR%\data\
echo GIT ARCHIVE data ...
git archive --remote %REPODIR%\data\glest_game\ HEAD:data | tar -x
cd /d "%~dp0"
rem pause
mkdir %RELEASEDIR%\docs\
cd /d %RELEASEDIR%\docs\
echo GIT ARCHIVE docs ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:docs | tar -x
cd /d "%~dp0"
cd /d %RELEASEDIR%\docs\
echo GIT ARCHIVE CHANGELOG.txt ...
git archive --remote %REPODIR% HEAD:docs/ CHANGELOG.txt | tar -x
cd /d "%~dp0"
rem pause
cd /d %RELEASEDIR%\docs\
echo GIT ARCHIVE README.txt ...
git archive --remote %REPODIR% HEAD:docs/ README.txt | tar -x
cd /d "%~dp0"
rem pause
mkdir %RELEASEDIR%\maps\
cd /d %RELEASEDIR%\maps\
echo GIT ARCHIVE maps ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:maps | tar -x
cd /d "%~dp0"
mkdir %RELEASEDIR%\scenarios\
cd /d %RELEASEDIR%\scenarios\
echo GIT ARCHIVE scenarios ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:scenarios | tar -x
cd /d "%~dp0"
mkdir %RELEASEDIR%\techs\
cd /d %RELEASEDIR%\techs\
echo GIT ARCHIVE techs ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:techs | tar -x
cd /d "%~dp0"
mkdir %RELEASEDIR%\tilesets\
cd /d %RELEASEDIR%\tilesets\
echo GIT ARCHIVE tilesets ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:tilesets | tar -x
cd /d "%~dp0"
mkdir %RELEASEDIR%\tutorials\
cd /d %RELEASEDIR%\tutorials\
echo GIT ARCHIVE tutorials ...
git archive --remote %REPODIR%/data/glest_game/ HEAD:tutorials | tar -x
cd /d "%~dp0"
rem special export for flag images
mkdir %RELEASEDIR%\data\core\misc_textures\flags\
cd /d %RELEASEDIR%\data\core\misc_textures\flags\
echo GIT ARCHIVE flags ...
git archive --remote %REPODIR% HEAD:source/masterserver/flags | tar -x
cd /d "%~dp0"
rem START
rem remove embedded data
rem rm -rf "%RELEASEDIR%\data\core\fonts"
rem END
:make_archive
rem echo Current directory[%CD%]
echo creating data archive: %PACKAGE%
if exist release-data%PACKAGE% del release-data%PACKAGE%
cd /d %RELEASEDIR%
rem echo Current directory[%CD%]
set custom_sevenZ_params=
if not "%SEVENZ_MG_COMPRESS_PARAMS%." == "." set custom_sevenZ_params=%SEVENZ_MG_COMPRESS_PARAMS%
echo custom_sevenZ_params [%custom_sevenZ_params%] ...
..\..\7z.exe a -mmt -mx=9 %custom_sevenZ_params% -ms=on -mhc=on ..\%PACKAGE% *
dir "..\%PACKAGE%"
cd /d "%~dp0"
rem pause execution so we can see the output before the batch file exits
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
# Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libircclient", "libircclient\libircclient.vcproj", "{DF5B1705-0F15-4F0B-BD89-27E461F57777}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{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}.Release|Win32.ActiveCfg = Release|Win32
{DF5B1705-0F15-4F0B-BD89-27E461F57777}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

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

View File

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