Allow building of Winforms launcher with Mono
This commit is contained in:
committed by
Paul Chote
parent
b61b7b5431
commit
0064543989
27
Makefile
27
Makefile
@@ -1,7 +1,7 @@
|
|||||||
CSC = gmcs
|
CSC = gmcs
|
||||||
CSFLAGS = -nologo -warn:4 -debug:+ -debug:full -optimize- -codepage:utf8 -unsafe
|
CSFLAGS = -nologo -warn:4 -debug:+ -debug:full -optimize- -codepage:utf8 -unsafe
|
||||||
DEFINE = DEBUG;TRACE
|
DEFINE = DEBUG;TRACE
|
||||||
PROGRAMS = fileformats rcg rgl rnull game ra cnc seqed editor ralint filex tsbuild utility
|
PROGRAMS = fileformats rcg rgl rnull game ra cnc seqed editor ralint filex tsbuild utility winlaunch
|
||||||
prefix = /usr/local
|
prefix = /usr/local
|
||||||
datarootdir = $(prefix)/share
|
datarootdir = $(prefix)/share
|
||||||
datadir = $(datarootdir)
|
datadir = $(datarootdir)
|
||||||
@@ -100,19 +100,28 @@ utility_KIND = exe
|
|||||||
utility_DEPS = $(fileformats_TARGET) thirdparty/ICSharpCode.SharpZipLib.dll
|
utility_DEPS = $(fileformats_TARGET) thirdparty/ICSharpCode.SharpZipLib.dll
|
||||||
utility_LIBS = $(COMMON_LIBS) $(utility_DEPS)
|
utility_LIBS = $(COMMON_LIBS) $(utility_DEPS)
|
||||||
|
|
||||||
|
winlaunch_SRCS = $(shell find OpenRA.Launcher/ -iname '*.cs')
|
||||||
|
winlaunch_TARGET = OpenRA.Launcher.exe
|
||||||
|
winlaunch_KIND = winexe
|
||||||
|
winlaunch_DEPS =
|
||||||
|
winlaunch_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll
|
||||||
|
winlaunch_EXTRA = -resource:OpenRA.Launcher.MainForm.resources \
|
||||||
|
-resource:OpenRA.Launcher.InstallPackagesDialog.resources \
|
||||||
|
-resource:OpenRA.Launcher.ConfigureModsDialog.resources
|
||||||
|
|
||||||
# -platform:x86
|
# -platform:x86
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.PHONY: clean all game tool default mods mod_ra mod_cnc install uninstall editor_res editor tsbuild ralint seqed filex utility
|
.PHONY: clean all game tool default mods mod_ra mod_cnc install uninstall editor_res editor tsbuild ralint seqed filex utility winlaunch
|
||||||
|
|
||||||
game: $(fileformats_TARGET) $(rcg_TARGET) $(rgl_TARGET) $(rnull_TARGET) $(game_TARGET) $(ra_TARGET) $(cnc_TARGET) $(utility_TARGET)
|
game: $(fileformats_TARGET) $(gl_TARGET) $(game_TARGET) $(ra_TARGET) $(cnc_TARGET) $(utility_TARGET) $(winlaunch_TARGET)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@-rm *.exe *.dll *.mdb mods/**/*.dll mods/**/*.mdb *.resources
|
@-rm *.exe *.dll *.mdb mods/**/*.dll mods/**/*.mdb *.resources
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
|
|
||||||
CORE = fileformats rcg game editor utility
|
CORE = fileformats rcg rgl rnull game editor utility winlaunch
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
@-echo "Installing OpenRA to $(INSTALL_DIR)"
|
@-echo "Installing OpenRA to $(INSTALL_DIR)"
|
||||||
@@ -186,6 +195,16 @@ filex: $(filex_TARGET)
|
|||||||
tsbuild: OpenRA.TilesetBuilder.Form1.resources $(tsbuild_TARGET)
|
tsbuild: OpenRA.TilesetBuilder.Form1.resources $(tsbuild_TARGET)
|
||||||
OpenRA.TilesetBuilder.Form1.resources:
|
OpenRA.TilesetBuilder.Form1.resources:
|
||||||
resgen2 OpenRA.TilesetBuilder/Form1.resx OpenRA.TilesetBuilder.Form1.resources 1> /dev/null
|
resgen2 OpenRA.TilesetBuilder/Form1.resx OpenRA.TilesetBuilder.Form1.resources 1> /dev/null
|
||||||
|
|
||||||
|
winlaunch: OpenRA.Launcher.MainForm.resources OpenRA.Launcher.InstallPackagesDialog.resources \
|
||||||
|
OpenRA.Launcher.ConfigureModsDialog.resources $(winlaunch_TARGET)
|
||||||
|
OpenRA.Launcher.MainForm.resources:
|
||||||
|
resgen2 OpenRA.Launcher/MainForm.resx OpenRA.Launcher.MainForm.resources 1> /dev/null
|
||||||
|
OpenRA.Launcher.InstallPackagesDialog.resources:
|
||||||
|
resgen2 OpenRA.Launcher/InstallPackagesDialog.resx OpenRA.Launcher.InstallPackagesDialog.resources 1> /dev/null
|
||||||
|
OpenRA.Launcher.ConfigureModsDialog.resources:
|
||||||
|
resgen2 OpenRA.Launcher/ConfigureModsDialog.resx OpenRA.Launcher.ConfigureModsDialog.resources 1> /dev/null
|
||||||
|
|
||||||
tools: editor ralint seqed filex tsbuild
|
tools: editor ralint seqed filex tsbuild
|
||||||
all: game tools
|
all: game tools
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,9 @@ namespace OpenRA.Launcher
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Util.IsError(ref responseString)) return null;
|
if (Util.IsError(ref responseString)) return null;
|
||||||
string[] lines = responseString.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
|
string[] lines = responseString.Split(new string[] { "\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
for (int i = 0; i < lines.Length; i++)
|
||||||
|
lines[i] = lines[i].Trim('\r');
|
||||||
|
|
||||||
string title = "", version = "", author = "", description = "", requires = "";
|
string title = "", version = "", author = "", description = "", requires = "";
|
||||||
bool standalone = false;
|
bool standalone = false;
|
||||||
@@ -96,9 +98,12 @@ namespace OpenRA.Launcher
|
|||||||
|
|
||||||
string[] mods;
|
string[] mods;
|
||||||
if (!Util.IsError(ref responseString))
|
if (!Util.IsError(ref responseString))
|
||||||
mods = responseString.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
|
mods = responseString.Split(new string[] { "\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
else
|
else
|
||||||
throw new Exception(string.Format("Could not list mods: {0}", responseString));
|
throw new Exception(string.Format("Could not list mods: {0}", responseString));
|
||||||
|
|
||||||
|
for (int i = 0; i < mods.Length; i++)
|
||||||
|
mods[i] = mods[i].Trim('\r');
|
||||||
|
|
||||||
allMods = mods.ToDictionary(x => x, x => GetMetadata(x));
|
allMods = mods.ToDictionary(x => x, x => GetMetadata(x));
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user