Removed the attempt at Windows API code.
This commit is contained in:
parent
5594529239
commit
759bed096a
|
@ -6,7 +6,7 @@
|
||||||
SUBDIRS = src misc
|
SUBDIRS = src misc
|
||||||
|
|
||||||
dist_doc_DATA = README.txt COPYING LICENSES
|
dist_doc_DATA = README.txt COPYING LICENSES
|
||||||
dist_data_DATA = data gfx music sound locale misc
|
dist_data_DATA = win32build.sh data gfx music sound locale misc
|
||||||
|
|
||||||
if !RUN_IN_PLACE
|
if !RUN_IN_PLACE
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifndef _WIN32
|
||||||
#include <shlobj.h>
|
|
||||||
#else
|
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -203,11 +201,7 @@ void engine_setupConfigDirectory()
|
||||||
char dir[PATH_MAX];
|
char dir[PATH_MAX];
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (SHGetKnownFolderPath(FOLDERID_LocalAppData, KF_FLAG_CREATE, NULL, &userHome) != S_OK)
|
|
||||||
{
|
|
||||||
userHome = ".";
|
userHome = ".";
|
||||||
engine_warn("Could not get appdata location; using the current working directory instead.");
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
if ((userHome = getenv("HOME")) == NULL)
|
if ((userHome = getenv("HOME")) == NULL)
|
||||||
userHome = getpwuid(getuid())->pw_dir;
|
userHome = getpwuid(getuid())->pw_dir;
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Note: Before running, be sure to add the MXE usr/bin location to PATH
|
||||||
|
|
||||||
|
export SF_RUN_IN_PLACE=1
|
||||||
|
./configure --host=i686-w64-mingw32.static
|
||||||
|
make
|
||||||
|
mv src/starfighter.exe .
|
Loading…
Reference in New Issue