From 7e4cc13bcff0a0ed17a27b3584e03a899ba28622 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Fri, 25 Jan 2019 22:49:50 -0500 Subject: [PATCH] Add extra window as default extension, and reorganize build --- CMakeLists.txt | 4 ++-- GUI/extenwindow.cpp | 2 ++ deploy.ps1 | 4 +++- include/defs.h | 4 ++++ {release => lib}/LoaderDll.dll | Bin {release => lib}/LocaleEmulator.dll | Bin release/SavedExtensions.txt | 1 - 7 files changed, 11 insertions(+), 4 deletions(-) rename {release => lib}/LoaderDll.dll (100%) rename {release => lib}/LocaleEmulator.dll (100%) delete mode 100644 release/SavedExtensions.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e521a0..57d95c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,8 +26,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_FINAL_OUTPUT_DIRECTORY}) set(CMAKE_CONFIGURATION_TYPES Debug Release) -file(GLOB MISC_FILES "release/*.dll") -file(COPY ${MISC_FILES} DESTINATION ${CMAKE_FINAL_OUTPUT_DIRECTORY}) +file(GLOB LIBS lib/*) +file(COPY ${LIBS} DESTINATION ${CMAKE_FINAL_OUTPUT_DIRECTORY}) add_subdirectory(GUI) add_subdirectory(vnrhook) diff --git a/GUI/extenwindow.cpp b/GUI/extenwindow.cpp index 7960aeb..84b4f11 100644 --- a/GUI/extenwindow.cpp +++ b/GUI/extenwindow.cpp @@ -78,11 +78,13 @@ ExtenWindow::ExtenWindow(QWidget* parent) : ui(new Ui::ExtenWindow) { ui->setupUi(this); + ui->vboxLayout->addWidget(new QLabel(EXTEN_WINDOW_INSTRUCTIONS, this)); setWindowTitle(EXTENSIONS); ui->extenList->installEventFilter(this); + if (!QFile::exists(EXTEN_SAVE_FILE)) QTextFile(EXTEN_SAVE_FILE, QIODevice::WriteOnly).write(DEFAULT_EXTENSIONS); for (auto extenName : QString(QTextFile(EXTEN_SAVE_FILE, QIODevice::ReadOnly).readAll()).split(">")) Load(extenName); Sync(); } diff --git a/deploy.ps1 b/deploy.ps1 index ff115c6..e52fff3 100644 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -4,10 +4,12 @@ foreach ($arch in @("86", "64")) { $folder = "Textractor$($arch)"; $targets = @( "Textractor.exe", + "vnrhook.dll", "Qt5Core.dll", "Qt5Gui.dll", "Qt5Widgets.dll", - "vnrhook.dll", + "LoaderDll.dll", + "LocaleEmulator.dll", "Bing Translate.dll", "Copy to Clipboard.dll", "Extra Newlines.dll", diff --git a/include/defs.h b/include/defs.h index 00680a6..17e02fe 100644 --- a/include/defs.h +++ b/include/defs.h @@ -27,6 +27,10 @@ constexpr auto GAME_SAVE_FILE = u8"SavedGames.txt"; constexpr auto EXTEN_SAVE_FILE = u8"SavedExtensions.txt"; constexpr auto REPLACE_SAVE_FILE = u8"SavedReplacements.txt"; +// Misc + +constexpr auto DEFAULT_EXTENSIONS = u8"Remove Repetition>Copy to Clipboard>Google Translate>Extra Window>Extra Newlines"; + // Functions template diff --git a/release/LoaderDll.dll b/lib/LoaderDll.dll similarity index 100% rename from release/LoaderDll.dll rename to lib/LoaderDll.dll diff --git a/release/LocaleEmulator.dll b/lib/LocaleEmulator.dll similarity index 100% rename from release/LocaleEmulator.dll rename to lib/LocaleEmulator.dll diff --git a/release/SavedExtensions.txt b/release/SavedExtensions.txt deleted file mode 100644 index 2d1b054..0000000 --- a/release/SavedExtensions.txt +++ /dev/null @@ -1 +0,0 @@ -Remove Repetition>Copy to Clipboard>Google Translate>Extra Newlines>