Conversion of files (windows OS specific) from LF to CRLF. Removed 3 ignored files.

This commit is contained in:
filux 2014-01-25 21:52:02 +01:00
parent b91b5cffa2
commit ea7b088919
13 changed files with 1248 additions and 1392 deletions

1
.gitignore vendored
View File

@ -15,6 +15,7 @@ Session.vim
Icon
## Windows
*.old
# Windows image file caches
Thumbs.db
thumbs.db

Binary file not shown.

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,87 +1,87 @@
@echo off
rem
rem Upload Coverity s
rem Requires:
rem - data\glest_game\curl.exe, built with SSL support: http://curl.haxx.se/download.html
rem - ..\..\data\glest_game\wget.exe (should get installed automatically during a build)
rem - ..\..\data\glest_game\7z.exe (should get installed automatically during a build)
rem - Coverity Scan Build Tool installed and in %PATH%
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-submit" (
echo -----------------------------------------
echo **Missing Config** To use this script please create a config file named [%CD%\.coverity-submit]
echo Containing: TOKEN=x , EMAIL=x , COVERITY_ANALYSIS_ROOT=x , NUMCORES=x
goto END
)
setlocal disabledelayedexpansion
FOR /F "tokens=1* delims==" %%i IN (.coverity-submit) 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 ..\..\data\glest_game\wget.exe --no-check-certificate https://scan.coverity.com/download/win-32 --post-data "token=%TOKEN%&project=%PROJECT%" -O %TEMP%\coverity_tool.zip
rem ..\..\data\glest_game\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
..\..\data\glest_game\7z.exe a %FILENAME%.tar %BUILDTOOL%\
..\..\data\glest_game\7z.exe a %FILENAME%.tar.gz %FILENAME%.tar
del /Q /F %FILENAME%.tar
dir %FILENAME%.tar.gz
Echo **About to run: ..\..\data\glest_game\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
..\..\data\glest_game\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 - data\glest_game\curl.exe, built with SSL support: http://curl.haxx.se/download.html
rem - ..\..\data\glest_game\wget.exe (should get installed automatically during a build)
rem - ..\..\data\glest_game\7z.exe (should get installed automatically during a build)
rem - Coverity Scan Build Tool installed and in %PATH%
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-submit" (
echo -----------------------------------------
echo **Missing Config** To use this script please create a config file named [%CD%\.coverity-submit]
echo Containing: TOKEN=x , EMAIL=x , COVERITY_ANALYSIS_ROOT=x , NUMCORES=x
goto END
)
setlocal disabledelayedexpansion
FOR /F "tokens=1* delims==" %%i IN (.coverity-submit) 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 ..\..\data\glest_game\wget.exe --no-check-certificate https://scan.coverity.com/download/win-32 --post-data "token=%TOKEN%&project=%PROJECT%" -O %TEMP%\coverity_tool.zip
rem ..\..\data\glest_game\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
..\..\data\glest_game\7z.exe a %FILENAME%.tar %BUILDTOOL%\
..\..\data\glest_game\7z.exe a %FILENAME%.tar.gz %FILENAME%.tar
del /Q /F %FILENAME%.tar
dir %FILENAME%.tar.gz
Echo **About to run: ..\..\data\glest_game\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
..\..\data\glest_game\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

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