Skip to content

Commit 3ebf8a6

Browse files
committed
Fix building with mingw32
1 parent 45082a4 commit 3ebf8a6

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

configure.ac

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ AC_DEFINE(APP_NAME, "SDATxtract", Name of application)
1414
AC_DEFINE_UNQUOTED(APP_VERSION_MAJOR, 0, Major version of application)
1515
AC_DEFINE_UNQUOTED(APP_VERSION_MINOR, 2, Minor version of application)
1616
AC_DEFINE_UNQUOTED(APP_VERSION_MICRO, 0, Micro version of application)
17-
AC_DEFINE(APP_VERSION_FULL, "APP_VERSION_MAJOR.APP_VERSION_MINOR.APP_VERSION_MICRO", Full version of application)
17+
AC_DEFINE_UNQUOTED(APP_VERSION_FULL_RAW, APP_VERSION_MAJOR.APP_VERSION_MINOR.APP_VERSION_MICRO, Full version of application)
18+
AC_DEFINE_UNQUOTED(APP_VERSION_FULL, STRINGIFY(APP_VERSION_FULL_RAW), Full version of application string)
1819

1920
AC_CANONICAL_BUILD
2021
AC_CANONICAL_HOST

src/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ int main(int argc, char* argv[])
113113
warning("No SDATs found in file: %s\n", argv[optind]);
114114
} else {
115115
if (isNds) {
116-
std::string outdir = fs::path(argv[optind]).stem();
116+
std::string outdir = fs::path(argv[optind]).stem().string();
117117
fs::create_directory(outdir);
118118
fs::current_path(outdir);
119119
}

src/sdatxtract.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ SdatX::~SdatX()
103103

104104
bool SdatX::Write()
105105
{
106-
std::string outfile = "sdat_file_"+std::string(fs::path(m_Filepath).stem())+".sdat";
106+
std::string outfile = "sdat_file_"+std::string(fs::path(m_Filepath).stem().string())+".sdat";
107107
printf("Outputting to file %s\n", outfile.c_str());
108108

109109
std::ofstream ofs(outfile, std::ofstream::binary);
@@ -127,7 +127,7 @@ bool SdatX::Extract()
127127

128128
int numSSEQ = 0, numSTRM = 0, numSWAR = 0, numSBNK = 0;
129129

130-
std::string outdir = fs::path(m_Filepath).stem();
130+
std::string outdir = fs::path(m_Filepath).stem().string();
131131
printf("Outputting to directory %s\n", outdir.c_str());
132132
fs::create_directory(outdir);
133133
fs::current_path(outdir);

0 commit comments

Comments
 (0)