Removed the attempt at Windows API code.

This commit is contained in:
Julie Marchant 2019-07-03 13:20:18 -04:00
parent 5594529239
commit 759bed096a
3 changed files with 10 additions and 9 deletions

View File

@ -6,7 +6,7 @@
SUBDIRS = src misc
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

View File

@ -22,9 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <sys/stat.h>
#include <unistd.h>
#ifdef _WIN32
#include <shlobj.h>
#else
#ifndef _WIN32
#include <pwd.h>
#endif
@ -203,11 +201,7 @@ void engine_setupConfigDirectory()
char dir[PATH_MAX];
#ifdef _WIN32
if (SHGetKnownFolderPath(FOLDERID_LocalAppData, KF_FLAG_CREATE, NULL, &userHome) != S_OK)
{
userHome = ".";
engine_warn("Could not get appdata location; using the current working directory instead.");
}
userHome = ".";
#else
if ((userHome = getenv("HOME")) == NULL)
userHome = getpwuid(getuid())->pw_dir;

7
win32build.sh Executable file
View File

@ -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 .