Rework GTK launcher and linux packages slightly
This commit is contained in:
8
Makefile
8
Makefile
@@ -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
|
PHONY = core tools package all mods clean distclean
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -O2 -Wall
|
CFLAGS = -O2 -Wall -m32
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
core: game renderers mod_ra mod_cnc
|
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) $(foreach prog,$(CORE),$($(prog)_TARGET)) $(INSTALL_DIR)
|
||||||
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/cnc
|
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/cnc
|
||||||
@$(INSTALL_PROGRAM) $(mod_cnc_TARGET) $(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 $(foreach f,$(shell ls mods/cnc --hide=*.dll),mods/cnc/$(f)) $(INSTALL_DIR)/mods/cnc
|
||||||
@cp -r mods/cnc/maps $(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)
|
@cp --parents -r thirdparty/Tao $(INSTALL_DIR)
|
||||||
@$(INSTALL_PROGRAM) thirdparty/ICSharpCode.SharpZipLib.dll $(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) -d $(BIN_INSTALL_DIR)
|
||||||
@$(INSTALL_PROGRAM) -m +rx openra $(BIN_INSTALL_DIR)
|
@$(INSTALL_PROGRAM) -T gtklaunch $(BIN_INSTALL_DIR)/openra
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
@-rm -r $(INSTALL_DIR)
|
@-rm -r $(INSTALL_DIR)
|
||||||
|
|||||||
@@ -434,6 +434,14 @@ int main(int argc, char ** argv)
|
|||||||
{
|
{
|
||||||
GtkWidget * hbox1, * hbox2, * vbox;
|
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);
|
server_init(WEBSERVER_PORT);
|
||||||
|
|
||||||
gtk_init(&argc, &argv);
|
gtk_init(&argc, &argv);
|
||||||
@@ -453,7 +461,7 @@ int main(int argc, char ** argv)
|
|||||||
|
|
||||||
util_get_mod_list(mod_list_callback);
|
util_get_mod_list(mod_list_callback);
|
||||||
|
|
||||||
vbox = gtk_vbox_new(FALSE, 0);
|
vbox = gtk_vbox_new(FALSE, 0);
|
||||||
hbox1 = gtk_hbox_new(FALSE, 0);
|
hbox1 = gtk_hbox_new(FALSE, 0);
|
||||||
hbox2 = gtk_hbox_new(FALSE, 0);
|
hbox2 = gtk_hbox_new(FALSE, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -15,12 +15,13 @@ rm -rf root
|
|||||||
|
|
||||||
# Game files
|
# Game files
|
||||||
mkdir -p root/usr/bin/
|
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/
|
mkdir -p root/usr/share/openra/
|
||||||
cp -R $BUILTDIR/* "root/usr/share/openra/" || exit 3
|
cp -R $BUILTDIR/* "root/usr/share/openra/" || exit 3
|
||||||
|
|
||||||
# Remove unneeded files
|
# Remove unneeded files
|
||||||
rm root/usr/share/openra/OpenRA.Launcher.exe
|
rm root/usr/share/openra/OpenRA.Launcher.exe
|
||||||
|
rm root/usr/share/openra/gtklaunch
|
||||||
|
|
||||||
# Desktop Icons
|
# Desktop Icons
|
||||||
mkdir -p root/usr/share/applications/
|
mkdir -p root/usr/share/applications/
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
cd /usr/share/openra
|
|
||||||
./gtklaunch
|
|
||||||
Reference in New Issue
Block a user