diff --git a/INSTALL.Ubuntu b/INSTALL.Ubuntu new file mode 100644 index 0000000000..81329c8479 --- /dev/null +++ b/INSTALL.Ubuntu @@ -0,0 +1,52 @@ +Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, + Paul Chote, Alli Witheford. + +This file is part of OpenRA. + +OpenRA is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +OpenRA is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with OpenRA. If not, see . + +To compile OpenRA, open the OpenRA.sln solution in the main folder, +or build it from the command-line with MSBuild. + +To run OpenRA, several files from the original game’s install need +to be copied to the root of the project directory. The required files are: + + redalert.mix + conquer.mix + temperat.mix + interior.mix + snow.mix + sounds.mix + allies.mix + russian.mix + general.mix + + hires1.mix + expand2.mix + +Red Alert has been released by EA Games as freeware so it shouldn’t +be too hard to find a legal copy of the CD images. Unfortunately the +installer is 16-bit and so won’t run on 64-bit operating systems. This +can be worked around by using the Red Alert Setup Manager + (http://ra.afraid.org/html/downloads/utilities-3.html). +Make sure you apply the no-CD protection fix so all the files needed +are installed to the hard drive. + +Dependencies - Make sure you have these installed, or you'll +have very strange errors. + +* mono-gmcs +* libglfw2 +* nvidia-cg-toolkit +* libmono-* diff --git a/Makefile b/Makefile index f9ce78a00b..c556aa4efc 100644 --- a/Makefile +++ b/Makefile @@ -13,48 +13,52 @@ fileformats_LIBS := $(COMMON_LIBS) gl_SRCS := $(shell find OpenRa.Gl/ -iname '*.cs') gl_TARGET := OpenRa.Gl.dll -gl_KIND := library +gl_KIND := library +gl_DEPS := $(fileformats_TARGET) \ + thirdparty/Tao/Tao.Glfw.dll gl_LIBS := $(COMMON_LIBS) System.Windows.Forms.dll \ thirdparty/Tao/Tao.Cg.dll thirdparty/Tao/Tao.OpenGl.dll \ - thirdparty/Tao/Tao.Platform.Windows.dll + $(gl_DEPS) + game_SRCS := $(shell find OpenRa.Game/ -iname '*.cs') game_TARGET := OpenRa.Game.exe -game_KIND := winexe -game_LIBS := $(COMMON_LIBS) System.Windows.Forms.dll $(fileformats_TARGET) $(gl_TARGET) \ +game_KIND := winexe +game_DEPS := $(fileformats_TARGET) +game_LIBS := $(COMMON_LIBS) System.Windows.Forms.dll $(game_DEPS) \ thirdparty/Tao/Tao.OpenAl.dll -game_DEPS := $(fileformats_TARGET) $(gl_TARGET) + game_FLAGS := -win32icon:OpenRa.Game/OpenRa.ico ra_SRCS := $(shell find OpenRa.Mods.RA/ -iname '*.cs') ra_TARGET := mods/ra/OpenRa.Mods.RA.dll ra_KIND := library -ra_LIBS := $(COMMON_LIBS) $(fileformats_TARGET) $(game_TARGET) ra_DEPS := $(fileformats_TARGET) $(game_TARGET) +ra_LIBS := $(COMMON_LIBS) $(ra_DEPS) cnc_SRCS := $(shell find OpenRa.Mods.Cnc/ -iname '*.cs') cnc_TARGET := mods/cnc/OpenRa.Mods.Cnc.dll cnc_KIND := library -cnc_LIBS := $(COMMON_LIBS) $(fileformats_TARGET) $(game_TARGET) cnc_DEPS := $(fileformats_TARGET) $(game_TARGET) +cnc_LIBS := $(COMMON_LIBS) $(cnc_DEPS) aftermath_SRCS := $(shell find OpenRa.Mods.Aftermath/ -iname '*.cs') aftermath_TARGET := mods/cnc/OpenRa.Mods.Aftermath.dll aftermath_KIND := library -aftermath_LIBS := $(COMMON_LIBS) $(fileformats_TARGET) $(game_TARGET) aftermath_DEPS := $(fileformats_TARGET) $(game_TARGET) +aftermath_LIBS := $(COMMON_LIBS) $(aftermath_DEPS) server_SRCS := $(shell find OpenRA.Server/ -iname '*.cs') server_TARGET := OpenRA.Server.exe server_KIND := winexe -server_LIBS := $(COMMON_LIBS) $(fileformats_TARGET) server_DEPS := $(fileformats_TARGET) +server_LIBS := $(COMMON_LIBS) $(server_DEPS) seqed_SRCS := $(shell find SequenceEditor/ -iname '*.cs') seqed_TARGET := SequenceEditor.exe seqed_KIND := winexe -seqed_LIBS := $(COMMON_LIBS) System.Windows.Forms.dll $(fileformats_TARGET) seqed_DEPS := $(fileformats_TARGET) +seqed_LIBS := $(COMMON_LIBS) System.Windows.Forms.dll $(seqed_DEPS) # -platform:x86 @@ -80,7 +84,7 @@ mods: $(ra_TARGET) $(cnc_TARGET) $(aftermath_TARGET) server: $(server_TARGET) seqed: $(seqed_TARGET) - all: clean server default mods seqed +all: clean server default mods seqed .DEFAULT: all diff --git a/OpenRa.FileFormats/Graphics/IGraphicsDevice.cs b/OpenRa.FileFormats/Graphics/IGraphicsDevice.cs index b4c3dc2360..c469ffdfea 100755 --- a/OpenRa.FileFormats/Graphics/IGraphicsDevice.cs +++ b/OpenRa.FileFormats/Graphics/IGraphicsDevice.cs @@ -22,7 +22,7 @@ namespace OpenRa.FileFormats.Graphics public interface IGraphicsDevice { - IVertexBuffer CreateVertexBuffer( int length ) where T : struct; + IVertexBuffer CreateVertexBuffer( int length ); IIndexBuffer CreateIndexBuffer( int length ); ITexture CreateTexture( Bitmap bitmap ); diff --git a/OpenRa.Game/Graphics/Vertex.cs b/OpenRa.FileFormats/Graphics/Vertex.cs similarity index 92% rename from OpenRa.Game/Graphics/Vertex.cs rename to OpenRa.FileFormats/Graphics/Vertex.cs index e0229a8025..76843c604e 100644 --- a/OpenRa.Game/Graphics/Vertex.cs +++ b/OpenRa.FileFormats/Graphics/Vertex.cs @@ -20,10 +20,10 @@ using System.Runtime.InteropServices; -namespace OpenRa.Graphics +namespace OpenRa.FileFormats.Graphics { [StructLayout(LayoutKind.Sequential)] - struct Vertex + public struct Vertex { public float x, y, z, u, v; public float p, c; diff --git a/OpenRa.FileFormats/Support/Stopwatch.cs b/OpenRa.FileFormats/Support/Stopwatch.cs index ede0a6fbce..a8a5ae84f5 100755 --- a/OpenRa.FileFormats/Support/Stopwatch.cs +++ b/OpenRa.FileFormats/Support/Stopwatch.cs @@ -24,10 +24,10 @@ namespace OpenRa.Support { public class Stopwatch { - [DllImport("kernel32.dll")] - static extern bool QueryPerformanceCounter(out long value); - [DllImport("kernel32.dll")] - static extern bool QueryPerformanceFrequency(out long frequency); + //[DllImport("kernel32.dll")] + static bool QueryPerformanceCounter(out long value) { value = 1; return true; } + //[DllImport("kernel32.dll")] + static bool QueryPerformanceFrequency(out long frequency) { frequency = 1; return true; } long freq, start; diff --git a/OpenRa.Game/Graphics/Util.cs b/OpenRa.Game/Graphics/Util.cs index 12842ebefd..e8ee19c127 100644 --- a/OpenRa.Game/Graphics/Util.cs +++ b/OpenRa.Game/Graphics/Util.cs @@ -23,6 +23,7 @@ using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; using System.IO; +using OpenRa.FileFormats.Graphics; namespace OpenRa.Graphics { diff --git a/OpenRa.Game/MainWindow.cs b/OpenRa.Game/MainWindow.cs index 50481a1a34..05900bf949 100755 --- a/OpenRa.Game/MainWindow.cs +++ b/OpenRa.Game/MainWindow.cs @@ -57,7 +57,6 @@ namespace OpenRa // StartPosition = FormStartPosition.Manual; // Location = Point.Empty; // Visible = true; ->>>>>>> origin/glfw:OpenRa.Game/MainWindow.cs // while (!File.Exists("redalert.mix")) // { diff --git a/OpenRa.Gl/GraphicsDevice.cs b/OpenRa.Gl/GraphicsDevice.cs index b86ef53552..cd74b27cce 100644 --- a/OpenRa.Gl/GraphicsDevice.cs +++ b/OpenRa.Gl/GraphicsDevice.cs @@ -26,9 +26,9 @@ using System.Runtime.InteropServices; using System.Windows.Forms; using Tao.Cg; using Tao.OpenGl; -using Tao.Platform.Windows; using OpenRa.FileFormats.Graphics; using Tao.Glfw; +using OpenRa; [assembly: Renderer( typeof( OpenRa.GlRenderer.GraphicsDevice ))] @@ -189,10 +189,9 @@ namespace OpenRa.GlRenderer #region IGraphicsDevice Members - public IVertexBuffer CreateVertexBuffer( int size ) - where T : struct + public IVertexBuffer CreateVertexBuffer( int size ) { - return new VertexBuffer( this, size ); + return new VertexBuffer( this, size ); } public IIndexBuffer CreateIndexBuffer( int size ) diff --git a/thirdparty/Tao/Tao.Glfw.dll b/thirdparty/Tao/Tao.Glfw.dll old mode 100644 new mode 100755