Skip to content

Commit

Permalink
Code changes to use Mingw-w64 compiler and WxWidgets 3.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Thales1330 committed Nov 1, 2019
1 parent 38722eb commit 65c5187
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
10 changes: 5 additions & 5 deletions Project/FileHanding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ FileHanding::FileHanding() {}
void FileHanding::SaveProject(wxFileName path)
{
// Erase the file (if exists or not) and write the initial data
std::ofstream writeProjectsFile(path.GetFullPath());
std::ofstream writeProjectsFile(path.GetFullPath().mb_str());
writeProjectsFile.close();

rapidxml::xml_document<> doc;
rapidxml::file<> xmlFile(path.GetFullPath().mb_str());
rapidxml::file<> xmlFile(path.GetFullPath());
doc.parse<0>(xmlFile.data());

rapidxml::xml_node<>* decl = doc.allocate_node(rapidxml::node_declaration);
Expand Down Expand Up @@ -257,7 +257,7 @@ void FileHanding::SaveProject(wxFileName path)
}
//}

std::ofstream writeXML(path.GetFullPath());
std::ofstream writeXML(path.GetFullPath().mb_str());
writeXML << doc;
writeXML.close();
}
Expand Down Expand Up @@ -579,7 +579,7 @@ bool FileHanding::OpenProject(wxFileName path)
void FileHanding::SaveControl(wxFileName path)
{
// Same process present in SaveProject():
std::ofstream writeProjectsFile(path.GetFullPath());
std::ofstream writeProjectsFile(path.GetFullPath().mb_str());
writeProjectsFile.close();

rapidxml::xml_document<> doc;
Expand All @@ -601,7 +601,7 @@ void FileHanding::SaveControl(wxFileName path)

auto elementsNode = XMLParser::AppendNode(doc, rootNode, "ControlElements");
SaveControlElements(doc, elementsNode);
std::ofstream writeXML(path.GetFullPath());
std::ofstream writeXML(path.GetFullPath().mb_str());
writeXML << doc;
writeXML.close();
}
Expand Down
6 changes: 3 additions & 3 deletions Project/Project.project
Original file line number Diff line number Diff line change
Expand Up @@ -519,13 +519,13 @@
<SearchPaths/>
</Completion>
</Configuration>
<Configuration Name="Release_Windows_x64" CompilerType="MinGW ( TDM-GCC-64 )" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-O2;-Wall;$(shell wx-config --cflags);-std=gnu++11" C_Options="-O2;-Wall" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<Configuration Name="Release_Windows_x64" CompilerType="MinGW 64bit ( MSYS2 64bit )" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-O2;-std=c++17;-Wall;$(shell wx-config --cflags)" C_Options="-O2;-Wall" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
<Preprocessor Value="NDEBUG"/>
<Preprocessor Value="UNICODE"/>
</Compiler>
<Linker Options="$(shell wx-config --libs std,adv,ribbon,aui,propgrid,richtext,stc,gl);-mwindows" Required="yes"/>
<Linker Options="$(shell wx-config --libs std,adv,ribbon,aui,propgrid,richtext,stc,gl);-mwindows;-static" Required="yes"/>
<ResourceCompiler Options="$(shell wx-config --rcflags)" Required="no"/>
<General OutputFile="$(IntermediateDirectory)/pspufu" IntermediateDirectory="./Release_Windows_x64" Command="./pspufu" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="no" IsGUIProgram="yes" IsEnabled="yes"/>
<BuildSystem Name="Default"/>
Expand Down
13 changes: 3 additions & 10 deletions Project/compile_flags.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
-IC:\TDM-GCC-64\lib\gcc\x86_64-w64-mingw32\5.1.0\include\c++
-IC:\TDM-GCC-64\lib\gcc\x86_64-w64-mingw32\5.1.0\include\c++\x86_64-w64-mingw32
-IC:\TDM-GCC-64\lib\gcc\x86_64-w64-mingw32\5.1.0\include\c++\backward
-IC:\TDM-GCC-64\lib\gcc\x86_64-w64-mingw32\5.1.0\include
-IC:\TDM-GCC-64\include
-IC:\TDM-GCC-64\lib\gcc\x86_64-w64-mingw32\5.1.0\include-fixed
-IC:\TDM-GCC-64\x86_64-w64-mingw32\include
-IC:\Users\NDSE-69\Documents\GitHub\PSP\Project
-IC:\wxWidgets-3.1.2\lib\gcc_dll\mswu
-IC:\wxWidgets-3.1.2\include
-IC:\Users\thale\Documents\GitHub\PSP\Project
-IC:\wxWidgets-3.1.3\lib\gcc_dll\mswu
-IC:\wxWidgets-3.1.3\include
-D_UNICODE
-DHAVE_W32API_H
-DWXUSINGDLL
Expand Down

0 comments on commit 65c5187

Please sign in to comment.