Rework GTK launcher and linux packages slightly

This commit is contained in:
Matthew Bowra-Dean
2011-01-04 17:35:50 +13:00
parent 68a38c85f9
commit d26ee1094a
4 changed files with 13 additions and 11 deletions

View File

@@ -5,7 +5,7 @@ COMMON_LIBS = System.dll System.Core.dll System.Drawing.dll System.Xml.dll third
PHONY = core tools package all mods clean distclean
CC = gcc
CFLAGS = -O2 -Wall
CFLAGS = -O2 -Wall -m32
.SUFFIXES:
core: game renderers mod_ra mod_cnc
@@ -222,7 +222,6 @@ install: all gtklaunch
@$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) $(INSTALL_DIR)
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/cnc
@$(INSTALL_PROGRAM) $(mod_cnc_TARGET) $(INSTALL_DIR)/mods/cnc
@$(INSTALL_PROGRAM) gtklaunch $(INSTALL_DIR)
@-cp $(foreach f,$(shell ls mods/cnc --hide=*.dll),mods/cnc/$(f)) $(INSTALL_DIR)/mods/cnc
@cp -r mods/cnc/maps $(INSTALL_DIR)/mods/cnc
@@ -249,11 +248,8 @@ install: all gtklaunch
@cp --parents -r thirdparty/Tao $(INSTALL_DIR)
@$(INSTALL_PROGRAM) thirdparty/ICSharpCode.SharpZipLib.dll $(INSTALL_DIR)
@echo "#!/bin/sh" > openra
@echo "cd "$(datadir)"/openra" >> openra
@echo "./gtklaunch" >> openra
@$(INSTALL_PROGRAM) -d $(BIN_INSTALL_DIR)
@$(INSTALL_PROGRAM) -m +rx openra $(BIN_INSTALL_DIR)
@$(INSTALL_PROGRAM) -T gtklaunch $(BIN_INSTALL_DIR)/openra
uninstall:
@-rm -r $(INSTALL_DIR)

View File

@@ -434,6 +434,14 @@ int main(int argc, char ** argv)
{
GtkWidget * hbox1, * hbox2, * vbox;
int res = chdir("../share/openra");
if (0 != res)
{
g_error("Couldn't change to OpenRA working directory");
return 1;
}
server_init(WEBSERVER_PORT);
gtk_init(&argc, &argv);

View File

@@ -15,12 +15,13 @@ rm -rf root
# Game files
mkdir -p root/usr/bin/
cp openra-bin root/usr/bin/openra
cp -T $BUILTDIR/gtklaunch root/usr/bin/openra
mkdir -p root/usr/share/openra/
cp -R $BUILTDIR/* "root/usr/share/openra/" || exit 3
# Remove unneeded files
rm root/usr/share/openra/OpenRA.Launcher.exe
rm root/usr/share/openra/gtklaunch
# Desktop Icons
mkdir -p root/usr/share/applications/

View File

@@ -1,3 +0,0 @@
#!/bin/sh
cd /usr/share/openra
./gtklaunch