From 8e80543e2e7ec006584c527931f90a5495f8974b Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Fri, 11 Jan 2019 16:20:57 -0500 Subject: [PATCH] reorganize folders/build system --- .gitignore | 5 +++-- CMakeLists.txt | 11 +++++++---- deploy.ps1 | 6 +++--- release/Extensions.txt | 1 + 4 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 release/Extensions.txt diff --git a/.gitignore b/.gitignore index 3802bc3..deb7f7c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ -Build/ -Builds/ +/Textractor* +/build/ +/builds/ *.vs/ *.vscode/ *.user diff --git a/CMakeLists.txt b/CMakeLists.txt index b452079..3e521a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.5) -set(MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +set(MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cmake) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${MODULE_DIR}) project(Textractor) @@ -15,10 +15,10 @@ add_compile_options( include_directories(include) -if(${CMAKE_SIZEOF_VOID_P} STREQUAL "8") - set(CMAKE_FINAL_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/Builds/${CMAKE_BUILD_TYPE}_x64) +if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) + set(CMAKE_FINAL_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/builds/${CMAKE_BUILD_TYPE}_x64) else() - set(CMAKE_FINAL_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/Builds/${CMAKE_BUILD_TYPE}_x86) + set(CMAKE_FINAL_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/builds/${CMAKE_BUILD_TYPE}_x86) endif() set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_FINAL_OUTPUT_DIRECTORY}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_FINAL_OUTPUT_DIRECTORY}) @@ -26,6 +26,9 @@ 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}) + add_subdirectory(GUI) add_subdirectory(vnrhook) add_subdirectory(extensions) diff --git a/deploy.ps1 b/deploy.ps1 index 36344f8..46d6a38 100644 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -1,4 +1,4 @@ -Set-Location "$($PSScriptRoot)/Builds"; +Set-Location $PSScriptRoot; foreach ($arch in @("86", "64")) { $folder = "Textractor$($arch)"; @@ -14,12 +14,12 @@ foreach ($arch in @("86", "64")) { "Google Translate.dll", "Regex Filter.dll", "Remove Repetition.dll", - "Extensions.txt", "platforms", "styles" - ) | ForEach-Object { "RelWithDebInfo_x$($arch)/$($_)" }; + ) | ForEach-Object { "builds/RelWithDebInfo_x$($arch)/$($_)" }; mkdir -Force -Verbose $folder; Remove-Item -Force -Recurse -Verbose "$($folder)/*"; Copy-Item -Force -Recurse -Verbose -Destination $folder -Path $targets; + Copy-Item -Force -Recurse -Verbose -Destination $folder -Path "release/*"; Compress-Archive -Force -Verbose -DestinationPath $folder -Path $folder; } diff --git a/release/Extensions.txt b/release/Extensions.txt new file mode 100644 index 0000000..2d1b054 --- /dev/null +++ b/release/Extensions.txt @@ -0,0 +1 @@ +Remove Repetition>Copy to Clipboard>Google Translate>Extra Newlines>