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

View File

@@ -6,7 +6,7 @@ language: c
# Make sure build dependencies are installed.
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.
script:

70
INSTALL
View File

@@ -5,60 +5,60 @@ as published by the Free Software Foundation. For more information,
see COPYING.
To run OpenRA, several files are needed from the original game disks.
These files are now downloaded and installed by the game,
so so no explicit action is required.
A minimal asset pack can also be downloaded and installed by the game.
Dependencies - Make sure you have these installed, or you'll
have very strange errors.
WINDOWS:
Windows
-------
* .NET Framework >= 3.5-SP1
(http://www.microsoft.com/downloads/details.aspx?FamilyID=AB99342F-5D1A-413D-8319-81DA479AB0D7&displaylang=en)
* Tao Framework >= 2.1.0
This is now bundled with OpenRA, copy the files in thirdparty/Tao to the game root directory.
* 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)
* Cg Toolkit >= 2.2 (optional, for Cg renderer)
(https://developer.nvidia.com/cg-toolkit-download)
To compile OpenRA, open the OpenRA.sln solution in the main folder,
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
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
* cli-common-dev (>= 2.10)
* freetype
* libmono-corlib1.0-cil
* libmono-winforms2.0-cil
* libopenal1
* libsdl1.2-dev
* nvidia-cg-toolkit (for Cg renderer)
* openal
* sdl
* nvidia-cg-toolkit (optional, for Cg renderer)
The following dlls can also be installed into your system GAC. This is not
recommended because we ship a custom Tao.FreeType that can conflict with
other applications that use Tao:
To compile OpenRA, run `make all' from the command line.
To grab the bundled CLI DLLs type `make dependencies'
Run with either `launch-game.sh' or `mono --debug OpenRA.Game.exe'.
gacutil -i Tao.Cg.dll
gacutil -i Tao.OpenGl.dll
gacutil -i Tao.OpenAl.dll
gacutil -i Tao.Sdl.dll
gacutil -i Tao.FreeType.dll
gacutil -i ICSharpCode.SharpZipLib.dll
Type 'sudo make install-all' for system wide installation. You
can then run from the `openra` shortcut.
To compile OpenRA, run `make' from the command line.
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:
Slackware
---------
The following packages from slackbuilds.org are required, on 13.37 32bit:
* libgdiplus
* mono
* 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.
;
; OpenRA is free software: you can redistribute it and/or modify
@@ -16,7 +16,6 @@
!include "MUI2.nsh"
!include "ZipDLL.nsh"
!include "FileFunc.nsh"
!include "WordFunc.nsh"
@@ -40,7 +39,7 @@ SetCompressor lzma
Var StartMenuFolder
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
;!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
@@ -49,23 +48,6 @@ Var StartMenuFolder
!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
;***************************
@@ -73,7 +55,7 @@ Section "-Reg" Reg
WriteRegStr HKLM "Software\OpenRA" "InstallDir" $INSTDIR
SectionEnd
Section "Client" Client
Section "Client" CLIENT
SetOutPath "$INSTDIR"
File "${SRCDIR}\OpenRA.Game.exe"
File "${SRCDIR}\OpenRA.Utility.exe"
@@ -96,6 +78,10 @@ Section "Client" Client
File "${SRCDIR}\global mix database.dat"
File "${SRCDIR}\GeoIP.dll"
File "${SRCDIR}\GeoIP.dat"
File OpenAL32.dll
File SDL.dll
File freetype6.dll
File zlib1.dll
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
@@ -110,10 +96,10 @@ Section "Client" Client
File "${SRCDIR}\glsl\*.vert"
SectionEnd
Section "Editor" Editor
Section "Editor" EDITOR
SetOutPath "$INSTDIR"
File "${SRCDIR}\OpenRA.Editor.exe"
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
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\uibits"
SectionEnd
Section "Command & Conquer" CNC
Section "C&C" CNC
RMDir /r "$INSTDIR\mods\cnc"
SetOutPath "$INSTDIR\mods\cnc"
File "${SRCDIR}\mods\cnc\*.*"
@@ -160,54 +146,19 @@ SectionGroup /e "Mods"
SectionEnd
SectionGroupEnd
SectionGroup /e "Settings"
Section "Portable Install" PORTABLE
CreateDirectory $INSTDIR\Support
SectionEnd
SectionGroupEnd
Function .onInit
SectionSetFlags ${PORTABLE} 0
FunctionEnd
;***************************
;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
ClearErrors
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" "InstallLocation" "$INSTDIR"
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" "NoModify" "1"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA" "NoRepair" "1"
@@ -276,14 +227,14 @@ Function ${UN}Clean
Delete $INSTDIR\INSTALL
Delete $INSTDIR\OpenRA.ico
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\GeoIP.dat
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"
Delete $INSTDIR\uninstaller.exe
RMDir $INSTDIR
@@ -304,16 +255,20 @@ SectionEnd
;***************************
;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_CNC ${LANG_ENGLISH} "Base Command and Conquer 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_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 ${CNC} $(DESC_CNC)
!insertmacro MUI_DESCRIPTION_TEXT ${D2K} $(DESC_D2K)
!insertmacro MUI_DESCRIPTION_TEXT ${PORTABLE} $(DESC_PORTABLE)
!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.