Merge pull request #3819 from Mailaender/nsis-dependencies

Bundled native Windows dependencies
This commit is contained in:
Paul Chote
2013-09-08 04:51:54 -07:00
8 changed files with 75 additions and 131 deletions

25
.gitignore vendored
View File

@@ -1,4 +1,4 @@
# Visual Studio crap # Visual Studio
Release Release
bin bin
obj obj
@@ -8,14 +8,12 @@ obj
*.user *.user
*.sln.cache *.sln.cache
*.manifest *.manifest
mods/*/*.dll
*.CodeAnalysisLog.xml *.CodeAnalysisLog.xml
*.lastcodeanalysissucceeded *.lastcodeanalysissucceeded
# ReSharper crap
_ReSharper.*/ _ReSharper.*/
#binary stuff # binaries
mods/*/*.dll
/*.dll /*.dll
/*.dll.config /*.dll.config
*.pdb *.pdb
@@ -28,23 +26,14 @@ _ReSharper.*/
\#* \#*
.*.sw? .*.sw?
# dependency DLLs (different for every platform!) # Monodevelop
cg.dll
cgGL.dll
freetype6.dll
zlib1.dll
SDL.dll
/OpenRa.Gl.dll
#monodevelop
*.pidb *.pidb
*.userprefs *.userprefs
# osx crap # Mac OS X
.DS_Store .DS_Store
# osx build crap # XCode
packaging/osx/launcher/build/ packaging/osx/launcher/build/
packaging/osx/launcher/OpenRA.xcodeproj/*.pbxuser packaging/osx/launcher/OpenRA.xcodeproj/*.pbxuser
packaging/osx/launcher/OpenRA.xcodeproj/*.perspectivev3 packaging/osx/launcher/OpenRA.xcodeproj/*.perspectivev3
@@ -58,7 +47,7 @@ OpenRA.Launcher.Mac/OpenRA.xcodeproj/*.perspectivev3
OpenRA.Launcher.Mac/OpenRA.xcodeproj/*.mode1v3 OpenRA.Launcher.Mac/OpenRA.xcodeproj/*.mode1v3
*.resources *.resources
# KDE crap # KDE
*.kate-swp *.kate-swp
*.directory *.directory

View File

@@ -6,7 +6,7 @@ language: c
# Make sure build dependencies are installed. # Make sure build dependencies are installed.
install: install:
- sudo apt-get update && sudo apt-get install mono-gmcs cli-common-dev libgl1-mesa-dev libsdl1.2-dev libopenal-dev - sudo apt-get update && sudo apt-get install mono-gmcs cli-common-dev libsdl1.2debian libgl1-mesa-glx libopenal1 libfreetype6
# Run the build script which will automatically call RALint and ensure that the IDE project files are still valid. # Run the build script which will automatically call RALint and ensure that the IDE project files are still valid.
script: script:

70
INSTALL
View File

@@ -5,60 +5,60 @@ as published by the Free Software Foundation. For more information,
see COPYING. see COPYING.
To run OpenRA, several files are needed from the original game disks. To run OpenRA, several files are needed from the original game disks.
These files are now downloaded and installed by the game, A minimal asset pack can also be downloaded and installed by the game.
so so no explicit action is required.
Dependencies - Make sure you have these installed, or you'll Windows
have very strange errors. -------
WINDOWS:
* .NET Framework >= 3.5-SP1 * .NET Framework >= 3.5-SP1
(http://www.microsoft.com/downloads/details.aspx?FamilyID=AB99342F-5D1A-413D-8319-81DA479AB0D7&displaylang=en) (http://www.microsoft.com/downloads/details.aspx?FamilyID=AB99342F-5D1A-413D-8319-81DA479AB0D7&displaylang=en)
* Tao Framework >= 2.1.0 * Cg Toolkit >= 2.2 (optional, for Cg renderer)
This is now bundled with OpenRA, copy the files in thirdparty/Tao to the game root directory. (https://developer.nvidia.com/cg-toolkit-download)
* OpenAL >= 1.1
(http://connect.creativelabs.com/openal/Downloads/oalinst.zip)
* Cg Toolkit >= 2.2
(http://developer.download.nvidia.com/cg/Cg_2.2/Cg-2.2_October2009_Setup.exe)
To compile OpenRA, open the OpenRA.sln solution in the main folder, To compile OpenRA, open the OpenRA.sln solution in the main folder,
or build it from the command-line with MSBuild. or build it from the command-line with MSBuild.
Execute `copy-dependencies.bat' to place the DLLs we conveniently
bundle for you. They include binaries of:
* http://libsdl.org/download-1.2.php
* http://gnuwin32.sourceforge.net/packages/freetype.htm
* http://gnuwin32.sourceforge.net/packages/zlib.htm
* http://kcat.strangesoft.net/openal.html
Run the game with `OpenRA.Game.exe Game.Mods=ra` for Red Alert Run the game with `OpenRA.Game.exe Game.Mods=ra` for Red Alert
or `OpenRA.Game.exe Game.Mods=cnc` for Command & Conquer or `OpenRA.Game.exe Game.Mods=cnc` for Command & Conquer
Debian/Ubuntu
-------------
UBUNTU (substitute comparable packages for other Linux distros):
* mono-runtime (>= 2.10)
* mono-gmcs * mono-gmcs
* cli-common-dev (>= 2.10)
* freetype * freetype
* libmono-corlib1.0-cil * openal
* libmono-winforms2.0-cil * sdl
* libopenal1 * nvidia-cg-toolkit (optional, for Cg renderer)
* libsdl1.2-dev
* nvidia-cg-toolkit (for Cg renderer)
The following dlls can also be installed into your system GAC. This is not To compile OpenRA, run `make all' from the command line.
recommended because we ship a custom Tao.FreeType that can conflict with To grab the bundled CLI DLLs type `make dependencies'
other applications that use Tao: Run with either `launch-game.sh' or `mono --debug OpenRA.Game.exe'.
gacutil -i Tao.Cg.dll Type 'sudo make install-all' for system wide installation. You
gacutil -i Tao.OpenGl.dll can then run from the `openra` shortcut.
gacutil -i Tao.OpenAl.dll
gacutil -i Tao.Sdl.dll
gacutil -i Tao.FreeType.dll
gacutil -i ICSharpCode.SharpZipLib.dll
To compile OpenRA, run `make' from the command line. Slackware
To install run 'make install'. ---------
Run the game with `mono OpenRA.Game.exe Game.Mods=ra` for Red Alert
or `mono OpenRA.Game.exe Game.Mods=cnc` for Command & Conquer
SLACKWARE:
The following packages from slackbuilds.org are required, on 13.37 32bit: The following packages from slackbuilds.org are required, on 13.37 32bit:
* libgdiplus * libgdiplus
* mono * mono
* openAL * openAL
* nvidia-cg-toolkit (for Cg renderer) * nvidia-cg-toolkit (optional, for Cg renderer)
openSUSE
--------
* mono-devel
* openal
* freetype2
* SDL
* cg (optional, for Cg renderer)

BIN
packaging/windows/OpenAL32.dll Executable file

Binary file not shown.

View File

@@ -1,4 +1,4 @@
; Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford. ; Copyright 2007-2013 OpenRA developers (see AUTHORS)
; This file is part of OpenRA. ; This file is part of OpenRA.
; ;
; OpenRA is free software: you can redistribute it and/or modify ; OpenRA is free software: you can redistribute it and/or modify
@@ -16,7 +16,6 @@
!include "MUI2.nsh" !include "MUI2.nsh"
!include "ZipDLL.nsh"
!include "FileFunc.nsh" !include "FileFunc.nsh"
!include "WordFunc.nsh" !include "WordFunc.nsh"
@@ -40,7 +39,7 @@ SetCompressor lzma
Var StartMenuFolder Var StartMenuFolder
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
;!insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_CONFIRM
@@ -49,23 +48,6 @@ Var StartMenuFolder
!insertmacro MUI_LANGUAGE "English" !insertmacro MUI_LANGUAGE "English"
Var DownloadCount
!macro DownloadDependency name saveas
IntOp $DownloadCount 0 + 1
download:
NSISdl::download "http://open-ra.org/get-dependency.php?file=${name}" ${saveas}
Pop $R0
StrCmp $R0 "success" success
IntCmp $DownloadCount 3 failure retry
failure:
MessageBox MB_OK "Download of ${saveas} did not succeed. Aborting installation. $\n$\n$R0"
Abort
retry:
IntOp $DownloadCount $DownloadCount + 1
Goto download
success:
!macroend
;*************************** ;***************************
;Section Definitions ;Section Definitions
;*************************** ;***************************
@@ -73,7 +55,7 @@ Section "-Reg" Reg
WriteRegStr HKLM "Software\OpenRA" "InstallDir" $INSTDIR WriteRegStr HKLM "Software\OpenRA" "InstallDir" $INSTDIR
SectionEnd SectionEnd
Section "Client" Client Section "Client" CLIENT
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
File "${SRCDIR}\OpenRA.Game.exe" File "${SRCDIR}\OpenRA.Game.exe"
File "${SRCDIR}\OpenRA.Utility.exe" File "${SRCDIR}\OpenRA.Utility.exe"
@@ -96,6 +78,10 @@ Section "Client" Client
File "${SRCDIR}\global mix database.dat" File "${SRCDIR}\global mix database.dat"
File "${SRCDIR}\GeoIP.dll" File "${SRCDIR}\GeoIP.dll"
File "${SRCDIR}\GeoIP.dat" File "${SRCDIR}\GeoIP.dat"
File OpenAL32.dll
File SDL.dll
File freetype6.dll
File zlib1.dll
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$StartMenuFolder" CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
@@ -110,10 +96,10 @@ Section "Client" Client
File "${SRCDIR}\glsl\*.vert" File "${SRCDIR}\glsl\*.vert"
SectionEnd SectionEnd
Section "Editor" Editor Section "Editor" EDITOR
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
File "${SRCDIR}\OpenRA.Editor.exe" File "${SRCDIR}\OpenRA.Editor.exe"
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$StartMenuFolder" CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\OpenRA Editor.lnk" $OUTDIR\OpenRA.Editor.exe "" \ CreateShortCut "$SMPROGRAMS\$StartMenuFolder\OpenRA Editor.lnk" $OUTDIR\OpenRA.Editor.exe "" \
@@ -134,7 +120,7 @@ SectionGroup /e "Mods"
File /r "${SRCDIR}\mods\ra\tilesets" File /r "${SRCDIR}\mods\ra\tilesets"
File /r "${SRCDIR}\mods\ra\uibits" File /r "${SRCDIR}\mods\ra\uibits"
SectionEnd SectionEnd
Section "Command & Conquer" CNC Section "C&C" CNC
RMDir /r "$INSTDIR\mods\cnc" RMDir /r "$INSTDIR\mods\cnc"
SetOutPath "$INSTDIR\mods\cnc" SetOutPath "$INSTDIR\mods\cnc"
File "${SRCDIR}\mods\cnc\*.*" File "${SRCDIR}\mods\cnc\*.*"
@@ -160,54 +146,19 @@ SectionGroup /e "Mods"
SectionEnd SectionEnd
SectionGroupEnd SectionGroupEnd
SectionGroup /e "Settings"
Section "Portable Install" PORTABLE
CreateDirectory $INSTDIR\Support
SectionEnd
SectionGroupEnd
Function .onInit
SectionSetFlags ${PORTABLE} 0
FunctionEnd
;*************************** ;***************************
;Dependency Sections ;Dependency Sections
;*************************** ;***************************
Section "-OpenAl" OpenAl
AddSize 768
SetOutPath "$TEMP"
ClearErrors
${GetFileVersion} $SYSDIR\OpenAL32.dll $0
IfErrors installal 0
${VersionCompare} $0 "6.14.357.24" $1
IntCmp $1 1 done done installal
installal:
!insertmacro DownloadDependency "openal" "oalinst.zip"
!insertmacro ZIPDLL_EXTRACT oalinst.zip OpenAL oalinst.exe
ExecWait "$TEMP\OpenAL\oalinst.exe"
done:
SectionEnd
Section "-Sdl" SDL
AddSize 317
SetOutPath "$TEMP"
IfFileExists $INSTDIR\SDL.dll done installsdl
installsdl:
!insertmacro DownloadDependency "sdl" "sdl.zip"
!insertmacro ZIPDLL_EXTRACT sdl.zip $INSTDIR SDL.dll
done:
SectionEnd
Section "-Freetype" Freetype
AddSize 583
SetOutPath "$TEMP"
IfFileExists $INSTDIR\zlib1.dll done installfreetype
installfreetype:
!insertmacro DownloadDependency "freetype" "freetype-zlib.zip"
ZipDLL::extractall "freetype-zlib.zip" "$INSTDIR"
done:
SectionEnd
Section "-Cg" Cg
AddSize 1500
SetOutPath "$TEMP"
IfFileExists $INSTDIR\cg.dll done installcg
installcg:
!insertmacro DownloadDependency "cg" "cg-win32.zip"
ZipDLL::extractall "cg-win32.zip" "$INSTDIR"
done:
SectionEnd
Section "-DotNet" DotNet Section "-DotNet" DotNet
ClearErrors ClearErrors
ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5" "Install" ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5" "Install"
@@ -239,7 +190,7 @@ Section "-Uninstaller"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" "UninstallString" "$INSTDIR\uninstaller.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" "UninstallString" "$INSTDIR\uninstaller.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" "InstallLocation" "$INSTDIR" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" "InstallLocation" "$INSTDIR"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" "DisplayIcon" "$INSTDIR\OpenRA.ico" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" "DisplayIcon" "$INSTDIR\OpenRA.ico"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" "Publisher" "IJW Software (New Zealand)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" "Publisher" "OpenRA developers"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" "URLInfoAbout" "http://open-ra.org" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" "URLInfoAbout" "http://open-ra.org"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" "NoModify" "1" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" "NoModify" "1"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" "NoRepair" "1" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" "NoRepair" "1"
@@ -276,14 +227,14 @@ Function ${UN}Clean
Delete $INSTDIR\INSTALL Delete $INSTDIR\INSTALL
Delete $INSTDIR\OpenRA.ico Delete $INSTDIR\OpenRA.ico
Delete $INSTDIR\*.ttf Delete $INSTDIR\*.ttf
Delete $INSTDIR\freetype6.dll
Delete $INSTDIR\SDL.dll
Delete $INSTDIR\cg.dll
Delete $INSTDIR\cgGL.dll
Delete $INSTDIR\zlib1.dll
Delete "$INSTDIR\global mix database.dat" Delete "$INSTDIR\global mix database.dat"
Delete $INSTDIR\GeoIP.dat Delete $INSTDIR\GeoIP.dat
Delete $INSTDIR\GeoIP.dll Delete $INSTDIR\GeoIP.dll
Delete $INSTDIR\OpenAL32.dll
Delete $INSTDIR\SDL.dll
Delete $INSTDIR\freetype6.dll
Delete $INSTDIR\zlib1.dll
RMDir /r $INSTDIR\Support
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA"
Delete $INSTDIR\uninstaller.exe Delete $INSTDIR\uninstaller.exe
RMDir $INSTDIR RMDir $INSTDIR
@@ -304,16 +255,20 @@ SectionEnd
;*************************** ;***************************
;Section Descriptions ;Section Descriptions
;*************************** ;***************************
LangString DESC_Client ${LANG_ENGLISH} "OpenRA client and dependencies" LangString DESC_CLIENT ${LANG_ENGLISH} "OpenRA game and dependencies"
LangString DESC_EDITOR ${LANG_ENGLISH} "OpenRA map editor"
LangString DESC_RA ${LANG_ENGLISH} "Base Red Alert mod" LangString DESC_RA ${LANG_ENGLISH} "Base Red Alert mod"
LangString DESC_CNC ${LANG_ENGLISH} "Base Command and Conquer mod" LangString DESC_CNC ${LANG_ENGLISH} "Base Command and Conquer mod"
LangString DESC_D2K ${LANG_ENGLISH} "Base Dune 2000 mod" LangString DESC_D2K ${LANG_ENGLISH} "Base Dune 2000 mod"
LangString DESC_PORTABLE ${LANG_ENGLISH} "Store support files in the install directory."
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Client} $(DESC_Client) !insertmacro MUI_DESCRIPTION_TEXT ${CLIENT} $(DESC_CLIENT)
!insertmacro MUI_DESCRIPTION_TEXT ${EDITOR} $(DESC_EDITOR)
!insertmacro MUI_DESCRIPTION_TEXT ${RA} $(DESC_RA) !insertmacro MUI_DESCRIPTION_TEXT ${RA} $(DESC_RA)
!insertmacro MUI_DESCRIPTION_TEXT ${CNC} $(DESC_CNC) !insertmacro MUI_DESCRIPTION_TEXT ${CNC} $(DESC_CNC)
!insertmacro MUI_DESCRIPTION_TEXT ${D2K} $(DESC_D2K) !insertmacro MUI_DESCRIPTION_TEXT ${D2K} $(DESC_D2K)
!insertmacro MUI_DESCRIPTION_TEXT ${PORTABLE} $(DESC_PORTABLE)
!insertmacro MUI_FUNCTION_DESCRIPTION_END !insertmacro MUI_FUNCTION_DESCRIPTION_END
;*************************** ;***************************

BIN
packaging/windows/SDL.dll Normal file

Binary file not shown.

Binary file not shown.

BIN
packaging/windows/zlib1.dll Normal file

Binary file not shown.