SOURCES: War3D.desktop (NEW), War3D-homeconfig.patch (NEW), War3D....
sparky
sparky at pld-linux.org
Sun Sep 11 03:14:03 CEST 2005
Author: sparky Date: Sun Sep 11 01:14:03 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- NEW
---- Files affected:
SOURCES:
War3D.desktop (NONE -> 1.1) (NEW), War3D-homeconfig.patch (NONE -> 1.1) (NEW), War3D.sh (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/War3D.desktop
diff -u /dev/null SOURCES/War3D.desktop:1.1
--- /dev/null Sun Sep 11 03:14:03 2005
+++ SOURCES/War3D.desktop Sun Sep 11 03:13:58 2005
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=War3D
+Comment=Multiplayer 3D War Game
+Exec=war3d
+Terminal=false
+Type=Application
+Encoding=UTF-8
+Categories=Game;StrategyGame;
+# vi: encoding=utf-8
================================================================
Index: SOURCES/War3D-homeconfig.patch
diff -u /dev/null SOURCES/War3D-homeconfig.patch:1.1
--- /dev/null Sun Sep 11 03:14:03 2005
+++ SOURCES/War3D-homeconfig.patch Sun Sep 11 03:13:58 2005
@@ -0,0 +1,27 @@
+--- War3DSource/Main.cpp.orig 2005-09-11 01:12:53.000000000 +0200
++++ War3DSource/Main.cpp 2005-09-11 01:33:17.000000000 +0200
+@@ -27,6 +27,8 @@
+ #include <math.h>
+ #include <stdio.h>
+
++#include <pwd.h>
++
+
+ #ifdef _WIN32 // Windows
+
+@@ -106,7 +108,14 @@
+
+ glutInit(&argc, argv);
+
+- configuracion::leerConfig ("War3D.conf");
++ std::string confname;
++ struct passwd *pwent = getpwuid(getuid());
++ if ( pwent && pwent->pw_dir ) {
++ confname = std::string(pwent->pw_dir) + "/.War3D.conf";
++ } else {
++ confname = "War3D.conf";
++ }
++ configuracion::leerConfig (confname);
+
+ SetupGL();
+ SetupRC(); //Inicia la iluminacion y algunas otras cosas
================================================================
Index: SOURCES/War3D.sh
diff -u /dev/null SOURCES/War3D.sh:1.1
--- /dev/null Sun Sep 11 03:14:03 2005
+++ SOURCES/War3D.sh Sun Sep 11 03:13:58 2005
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+CONF="$HOME/.War3D.conf"
+
+cd /usr/share/War3D
+
+[ -r "$CONF" ] || cp -f War3D.conf $CONF
+
+exec war3d.bin
================================================================
More information about the pld-cvs-commit
mailing list