Removed the attempt at Windows API code.
This commit is contained in:
parent
5594529239
commit
759bed096a
|
@ -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
|
||||
|
||||
|
|
10
src/engine.c
10
src/engine.c
|
@ -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;
|
||||
|
|
|
@ -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