diff --git a/aegisub/setup.cpp b/aegisub/setup.cpp index ef87e4dae..6d7a16073 100644 --- a/aegisub/setup.cpp +++ b/aegisub/setup.cpp @@ -54,7 +54,32 @@ #pragma comment(lib, "wxpng.lib") #endif -#if wxCHECK_VERSION(2, 8, 0) +#if wxCHECK_VERSION(2, 9, 0) +#ifdef __WXDEBUG__ +#pragma comment(lib, "wxregexud.lib") +#pragma comment(lib, "wxbase29ud.lib") +#pragma comment(lib, "wxbase29ud_net.lib") +#pragma comment(lib, "wxmsw29ud_media.lib") +#pragma comment(lib, "wxmsw29ud_core.lib") +#pragma comment(lib, "wxmsw29ud_adv.lib") +#pragma comment(lib, "wxmsw29ud_gl.lib") +#pragma comment(lib, "wxmsw29ud_stc.lib") +#pragma comment(lib, "wxbase29ud_xml.lib") +#pragma comment(lib, "wxexpatd.lib") +#else +#pragma comment(lib, "wxregexu.lib") +#pragma comment(lib, "wxbase29u.lib") +#pragma comment(lib, "wxbase29u_net.lib") +#pragma comment(lib, "wxmsw29u_media.lib") +#pragma comment(lib, "wxmsw29u_core.lib") +#pragma comment(lib, "wxmsw29u_adv.lib") +#pragma comment(lib, "wxmsw29u_gl.lib") +#pragma comment(lib, "wxmsw29u_stc.lib") +#pragma comment(lib, "wxbase29u_xml.lib") +#pragma comment(lib, "wxexpat.lib") +#endif + +#elif wxCHECK_VERSION(2, 8, 0) #ifdef __WXDEBUG__ #pragma comment(lib, "wxregexud.lib") #pragma comment(lib, "wxbase28ud.lib") diff --git a/aegisub/spellchecker_hunspell.cpp b/aegisub/spellchecker_hunspell.cpp index 171bdf4ae..ac0162965 100644 --- a/aegisub/spellchecker_hunspell.cpp +++ b/aegisub/spellchecker_hunspell.cpp @@ -127,7 +127,8 @@ void HunspellSpellChecker::Reset() { // Can add to dictionary? bool HunspellSpellChecker::CanAddWord(wxString word) { if (!hunspell) return false; - return (word.mb_str(*conv) != NULL); + wxCharBuffer buffer = word.mb_str(*conv); + return (buffer.data() != NULL); } diff --git a/aegisub/subs_grid.cpp b/aegisub/subs_grid.cpp index b2c1ee306..590ec3ffa 100644 --- a/aegisub/subs_grid.cpp +++ b/aegisub/subs_grid.cpp @@ -680,7 +680,7 @@ void SubtitlesGrid::OnAudioClip(wxCommandEvent &event) { end=(end>num_samples)?num_samples:end; - wxString filename = wxFileSelector(_("Save audio clip"),0,0,_T("wav"),0,wxFD_SAVE|wxFD_OVERWRITE_PROMPT,this); + wxString filename = wxFileSelector(_("Save audio clip"),_T(""),_T(""),_T("wav"),_T(""),wxFD_SAVE|wxFD_OVERWRITE_PROMPT,this); if (!filename.empty()) { std::ofstream outfile(filename.mb_str(wxConvLocal),std::ios::binary); diff --git a/aegisub/text_file_reader.cpp b/aegisub/text_file_reader.cpp index 85febc844..7c6d76865 100644 --- a/aegisub/text_file_reader.cpp +++ b/aegisub/text_file_reader.cpp @@ -111,7 +111,11 @@ wxString TextFileReader::GetEncoding(const wxString _filename) { CloseHandle(ifile); #else ifstream ifile; +#ifdef WIN32 + ifile.open(_filename.wc_str()); +#else ifile.open(wxFNCONV(_filename)); +#endif if (!ifile.is_open()) { return _T("unknown"); } @@ -288,8 +292,12 @@ void TextFileReader::Open() { if (file == 0) { throw _T("Failed opening file for reading."); } +#else +#ifdef WIN32 + file.open(filename.wc_str(),std::ios::in | std::ios::binary); #else file.open(wxFNCONV(filename),std::ios::in | std::ios::binary); +#endif if (!file.is_open()) { throw _T("Failed opening file for reading."); } diff --git a/aegisub/text_file_writer.cpp b/aegisub/text_file_writer.cpp index ed9815a39..81a006568 100644 --- a/aegisub/text_file_writer.cpp +++ b/aegisub/text_file_writer.cpp @@ -78,7 +78,11 @@ TextFileWriter::~TextFileWriter() { void TextFileWriter::Open() { // Open file if (open) return; +#ifdef WIN32 + file.open(filename.wc_str(),std::ios::out | std::ios::binary | std::ios::trunc); +#else file.open(wxFNCONV(filename),std::ios::out | std::ios::binary | std::ios::trunc); +#endif if (!file.is_open()) { throw _T("Failed opening file for writing."); }