Skip to content

Commit

Permalink
Fix building with mingw32
Browse files Browse the repository at this point in the history
  • Loading branch information
oreo639 committed Sep 9, 2020
1 parent 45082a4 commit 3ebf8a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ AC_DEFINE(APP_NAME, "SDATxtract", Name of application)
AC_DEFINE_UNQUOTED(APP_VERSION_MAJOR, 0, Major version of application)
AC_DEFINE_UNQUOTED(APP_VERSION_MINOR, 2, Minor version of application)
AC_DEFINE_UNQUOTED(APP_VERSION_MICRO, 0, Micro version of application)
AC_DEFINE(APP_VERSION_FULL, "APP_VERSION_MAJOR.APP_VERSION_MINOR.APP_VERSION_MICRO", Full version of application)
AC_DEFINE_UNQUOTED(APP_VERSION_FULL_RAW, APP_VERSION_MAJOR.APP_VERSION_MINOR.APP_VERSION_MICRO, Full version of application)
AC_DEFINE_UNQUOTED(APP_VERSION_FULL, STRINGIFY(APP_VERSION_FULL_RAW), Full version of application string)

AC_CANONICAL_BUILD
AC_CANONICAL_HOST
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ int main(int argc, char* argv[])
warning("No SDATs found in file: %s\n", argv[optind]);
} else {
if (isNds) {
std::string outdir = fs::path(argv[optind]).stem();
std::string outdir = fs::path(argv[optind]).stem().string();
fs::create_directory(outdir);
fs::current_path(outdir);
}
Expand Down
4 changes: 2 additions & 2 deletions src/sdatxtract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ SdatX::~SdatX()

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

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

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

std::string outdir = fs::path(m_Filepath).stem();
std::string outdir = fs::path(m_Filepath).stem().string();
printf("Outputting to directory %s\n", outdir.c_str());
fs::create_directory(outdir);
fs::current_path(outdir);
Expand Down

0 comments on commit 3ebf8a6

Please sign in to comment.