From b3ae2825223dcdf37d48a99a7c4d438678c7d5bb Mon Sep 17 00:00:00 2001 From: Gauvain 'GovanifY' Roussel-Tarbouriech Date: Sat, 3 Oct 2020 16:50:00 +0200 Subject: [PATCH] DEV9: including back initial original references --- CMakeLists.txt | 1 + build.sh | 1 - pcsx2/CMakeLists.txt | 47 +++++++++++++++++++++ pcsx2/DEV9/Linux/Config.cpp | 4 +- pcsx2/DEV9/Linux/Linux.cpp | 2 +- pcsx2/DEV9/Linux/{dev9ghzdrk.ui => dev9.ui} | 0 6 files changed, 51 insertions(+), 4 deletions(-) rename pcsx2/DEV9/Linux/{dev9ghzdrk.ui => dev9.ui} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bc43a8e3c..84ec78c643 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,7 @@ include(BuildParameters) # SearchForStuff be done before SelectPcsx2Plugins include(SearchForStuff) include(SelectPcsx2Plugins) +include(macros/GlibCompileResourcesSupport) # Must be done after SearchForStuff get_git_version_info() diff --git a/build.sh b/build.sh index 91712dfe4c..7ddbff1fa6 100755 --- a/build.sh +++ b/build.sh @@ -211,7 +211,6 @@ for ARG in "$@"; do --lto ) flags="$flags -DUSE_LTO=TRUE" ;; --pgo-optimize ) flags="$flags -DUSE_PGO_OPTIMIZE=TRUE" ;; --pgo-generate ) flags="$flags -DUSE_PGO_GENERATE=TRUE" ;; - --no-dev9ghzdrk ) flags="$flags -DDISABLE_DEV9GHZDRK=TRUE" ;; --no-portaudio ) flags="$flags -DPORTAUDIO_API=FALSE" ;; --no-simd ) flags="$flags -DDISABLE_ADVANCE_SIMD=TRUE" ;; --no-trans ) flags="$flags -DNO_TRANSLATION=TRUE" ;; diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index 7df58ba2a9..758089136f 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -281,6 +281,49 @@ set(pcsx2SPU2Headers SPU2/wx/wxConfig.h ) +# DEV9 UI sources +compile_gresources( pcsx2DEV9UISources + pcsx2DEV9UIXML + TYPE EMBED_C + RESOURCES "DEV9/Linux/dev9.ui" + PREFIX "/net/pcsx2/dev9" + COMPRESS_ALL + STRIPBLANKS_ALL +) + +# DEV9 UI headers +compile_gresources( pcsx2DEV9UIHeaders + pcsx2DEV9UIXML + TYPE EMBED_H + RESOURCES "DEV9/Linux/dev9.ui" + PREFIX "/net/pcsx2/dev9" + COMPRESS_ALL + STRIPBLANKS_ALL +) + +# DEV9 sources +set(pcsx2DEV9Sources + DEV9/smap.cpp + DEV9/DEV9.cpp + DEV9/flash.cpp + DEV9/pcap_io.cpp + DEV9/Linux/Config.cpp + DEV9/Linux/Linux.cpp + DEV9/Linux/net.cpp + ${pcsx2DEV9UISources} + ) + +# DEV9 headers +set(pcsx2DEV9Headers + DEV9/DEV9.h + DEV9/ata.h + DEV9/net.h + DEV9/pcap_io.h + DEV9/smap.h + ${pcsx2DEV9UIHeaders} + ) + + # DebugTools sources set(pcsx2DebugToolsSources DebugTools/DebugInterface.cpp @@ -713,6 +756,8 @@ set(Common ${pcsx2CDVDHeaders} ${pcsx2SPU2Sources} ${pcsx2SPU2Headers} + ${pcsx2DEV9Sources} + ${pcsx2DEV9Headers} ${pcsx2DebugToolsSources} ${pcsx2GuiSources} ${pcsx2GuiResources} @@ -783,6 +828,8 @@ set(pcsx2FinalLibs ${ALSA_LIBRARIES} ${SOUNDTOUCH_LIBRARIES} ${SDL2_LIBRARIES} + ${PCAP_LIBRARY} + ${LIBXML2_LIBRARIES} ${Platform_Libs} ) diff --git a/pcsx2/DEV9/Linux/Config.cpp b/pcsx2/DEV9/Linux/Config.cpp index 5afabffdeb..9d41467f3b 100644 --- a/pcsx2/DEV9/Linux/Config.cpp +++ b/pcsx2/DEV9/Linux/Config.cpp @@ -62,7 +62,7 @@ void SaveConf() { */ - const std::string file(s_strIniPath + "dev9ghzdrk.cfg"); + const std::string file(s_strIniPath + "DEV9.cfg"); xmlSaveFormatFileEnc(file.c_str(), doc, "UTF-8", 1); // free(configFile); @@ -79,7 +79,7 @@ void SaveConf() { void LoadConf() { - const std::string file(s_strIniPath + "dev9ghzdrk.cfg"); + const std::string file(s_strIniPath + "DEV9.cfg"); if( -1 == access( file.c_str(), F_OK ) ) return; diff --git a/pcsx2/DEV9/Linux/Linux.cpp b/pcsx2/DEV9/Linux/Linux.cpp index c8bfe5c9ba..fc0d55bce8 100644 --- a/pcsx2/DEV9/Linux/Linux.cpp +++ b/pcsx2/DEV9/Linux/Linux.cpp @@ -124,7 +124,7 @@ DEV9configure() { gtk_init (NULL, NULL); GError *error = NULL; builder = gtk_builder_new(); - if (!builder_add_from_resource(builder, "/net/pcsx2/dev9ghzdrk/Linux/dev9ghzdrk.ui", &error)) { + if (!builder_add_from_resource(builder, "/net/pcsx2/dev9/DEV9/Linux/dev9.ui", &error)) { g_warning("Could not build config ui: %s", error->message); g_error_free(error); g_object_unref(G_OBJECT(builder)); diff --git a/pcsx2/DEV9/Linux/dev9ghzdrk.ui b/pcsx2/DEV9/Linux/dev9.ui similarity index 100% rename from pcsx2/DEV9/Linux/dev9ghzdrk.ui rename to pcsx2/DEV9/Linux/dev9.ui