updated the project to the newest vmprofiler, project uses cmkr (cmake) See merge request vmp2/vmprofiler-qt!3merge-requests/4/merge
commit
9be35b4491
@ -0,0 +1,138 @@
|
|||||||
|
# This file is automatically generated from cmake.toml - DO NOT EDIT
|
||||||
|
# See https://github.com/build-cpp/cmkr for more information
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.15)
|
||||||
|
|
||||||
|
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
|
||||||
|
message(FATAL_ERROR "In-tree builds are not supported. Run CMake from a separate directory: cmake -B build")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Regenerate CMakeLists.txt automatically in the root project
|
||||||
|
set(CMKR_ROOT_PROJECT OFF)
|
||||||
|
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
|
||||||
|
set(CMKR_ROOT_PROJECT ON)
|
||||||
|
|
||||||
|
# Bootstrap cmkr
|
||||||
|
include("cmake/cmkr.cmake" OPTIONAL RESULT_VARIABLE CMKR_INCLUDE_RESULT)
|
||||||
|
if(CMKR_INCLUDE_RESULT)
|
||||||
|
cmkr()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Enable folder support
|
||||||
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Create a configure-time dependency on cmake.toml to improve IDE support
|
||||||
|
if(CMKR_ROOT_PROJECT)
|
||||||
|
configure_file(cmake.toml cmake.toml COPYONLY)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
project("VMProfiler Qt"
|
||||||
|
VERSION
|
||||||
|
1.8
|
||||||
|
DESCRIPTION
|
||||||
|
"VMProtect 2 IL Inspector"
|
||||||
|
)
|
||||||
|
|
||||||
|
include("cmake/Qt5Helpers.cmake")
|
||||||
|
|
||||||
|
# Packages
|
||||||
|
find_package(Qt5 REQUIRED CONFIG
|
||||||
|
COMPONENTS
|
||||||
|
Widgets
|
||||||
|
)
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
set(CMKR_CMAKE_FOLDER ${CMAKE_FOLDER})
|
||||||
|
if(CMAKE_FOLDER)
|
||||||
|
set(CMAKE_FOLDER "${CMAKE_FOLDER}/dependencies")
|
||||||
|
else()
|
||||||
|
set(CMAKE_FOLDER dependencies)
|
||||||
|
endif()
|
||||||
|
add_subdirectory(dependencies)
|
||||||
|
set(CMAKE_FOLDER ${CMKR_CMAKE_FOLDER})
|
||||||
|
|
||||||
|
# Target vmprofiler-qt
|
||||||
|
set(CMKR_TARGET vmprofiler-qt)
|
||||||
|
set(vmprofiler-qt_SOURCES "")
|
||||||
|
|
||||||
|
list(APPEND vmprofiler-qt_SOURCES
|
||||||
|
"src/qvminspector.ui"
|
||||||
|
"src/qvminspector.qrc"
|
||||||
|
"src/qvminspector.cpp"
|
||||||
|
"src/qvirt_instrs.cpp"
|
||||||
|
"src/qvirt_handlers.cpp"
|
||||||
|
"src/main.cpp"
|
||||||
|
"src/qvirt_handlers.h"
|
||||||
|
"src/qvirt_instrs.h"
|
||||||
|
"src/qvminspector.h"
|
||||||
|
"src/icon.rc"
|
||||||
|
"src/darkstyle/DarkStyle.cpp"
|
||||||
|
"src/darkstyle/framelesswindow/framelesswindow.cpp"
|
||||||
|
"src/darkstyle/framelesswindow/windowdragger.cpp"
|
||||||
|
"src/darkstyle/mainwindow.cpp"
|
||||||
|
"src/darkstyle/DarkStyle.h"
|
||||||
|
"src/darkstyle/framelesswindow/framelesswindow.h"
|
||||||
|
"src/darkstyle/framelesswindow/windowdragger.h"
|
||||||
|
"src/darkstyle/mainwindow.h"
|
||||||
|
"src/darkstyle/mainwindow.ui"
|
||||||
|
"src/darkstyle/framelesswindow.qrc"
|
||||||
|
"dependencies/ia32-doc/out/ia32.hpp"
|
||||||
|
)
|
||||||
|
|
||||||
|
list(APPEND vmprofiler-qt_SOURCES
|
||||||
|
cmake.toml
|
||||||
|
)
|
||||||
|
|
||||||
|
set(CMKR_SOURCES ${vmprofiler-qt_SOURCES})
|
||||||
|
add_executable(vmprofiler-qt)
|
||||||
|
|
||||||
|
if(vmprofiler-qt_SOURCES)
|
||||||
|
target_sources(vmprofiler-qt PRIVATE ${vmprofiler-qt_SOURCES})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
get_directory_property(CMKR_VS_STARTUP_PROJECT DIRECTORY ${PROJECT_SOURCE_DIR} DEFINITION VS_STARTUP_PROJECT)
|
||||||
|
if(NOT CMKR_VS_STARTUP_PROJECT)
|
||||||
|
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT vmprofiler-qt)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${vmprofiler-qt_SOURCES})
|
||||||
|
|
||||||
|
target_compile_definitions(vmprofiler-qt PRIVATE
|
||||||
|
NOMINMAX
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_features(vmprofiler-qt PRIVATE
|
||||||
|
cxx_std_20
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(vmprofiler-qt PRIVATE
|
||||||
|
include
|
||||||
|
"dependencies/ia32-doc/out/"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(vmprofiler-qt PRIVATE
|
||||||
|
Qt5::Widgets
|
||||||
|
vmprofiler
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_options(vmprofiler-qt PRIVATE
|
||||||
|
"/SUBSYSTEM:WINDOWS"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Enable Qt moc/rrc/uic support
|
||||||
|
target_qt(${CMKR_TARGET})
|
||||||
|
# Copy Qt DLLs next to the application
|
||||||
|
target_windeployqt(${CMKR_TARGET})
|
||||||
|
|
||||||
|
unset(CMKR_TARGET)
|
||||||
|
unset(CMKR_SOURCES)
|
||||||
|
|
||||||
|
install(
|
||||||
|
TARGETS
|
||||||
|
vmprofiler-qt
|
||||||
|
DESTINATION
|
||||||
|
bin
|
||||||
|
COMPONENT
|
||||||
|
vmprofiler-qt
|
||||||
|
)
|
@ -0,0 +1,56 @@
|
|||||||
|
[cmake]
|
||||||
|
version = "3.15"
|
||||||
|
cmkr-include = "cmake/cmkr.cmake"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "VMProfiler Qt"
|
||||||
|
version = "1.8"
|
||||||
|
description = "VMProtect 2 IL Inspector"
|
||||||
|
include-after = ["cmake/Qt5Helpers.cmake"]
|
||||||
|
|
||||||
|
[find-package]
|
||||||
|
Qt5 = { components = ["Widgets"] }
|
||||||
|
|
||||||
|
[subdir.dependencies]
|
||||||
|
[target.vmprofiler-qt]
|
||||||
|
type = "executable"
|
||||||
|
compile-features = ["cxx_std_20"]
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"src/qvminspector.ui",
|
||||||
|
"src/qvminspector.qrc",
|
||||||
|
"src/qvminspector.cpp",
|
||||||
|
"src/qvirt_instrs.cpp",
|
||||||
|
"src/qvirt_handlers.cpp",
|
||||||
|
"src/main.cpp",
|
||||||
|
"src/*.h",
|
||||||
|
"src/icon.rc",
|
||||||
|
"src/darkstyle/**.cpp",
|
||||||
|
"src/darkstyle/**.h",
|
||||||
|
"src/darkstyle/mainwindow.ui",
|
||||||
|
"src/darkstyle/framelesswindow.qrc",
|
||||||
|
"dependencies/ia32-doc/out/ia32.hpp"
|
||||||
|
]
|
||||||
|
|
||||||
|
include-directories = [
|
||||||
|
"include",
|
||||||
|
"dependencies/ia32-doc/out/"
|
||||||
|
]
|
||||||
|
|
||||||
|
compile-definitions = [
|
||||||
|
"NOMINMAX"
|
||||||
|
]
|
||||||
|
|
||||||
|
link-libraries = ["Qt5::Widgets", "vmprofiler"]
|
||||||
|
link-options = ["/SUBSYSTEM:WINDOWS"]
|
||||||
|
|
||||||
|
cmake-after = """
|
||||||
|
# Enable Qt moc/rrc/uic support
|
||||||
|
target_qt(${CMKR_TARGET})
|
||||||
|
# Copy Qt DLLs next to the application
|
||||||
|
target_windeployqt(${CMKR_TARGET})
|
||||||
|
"""
|
||||||
|
|
||||||
|
[[install]]
|
||||||
|
targets = ["vmprofiler-qt"]
|
||||||
|
destination = "bin"
|
@ -0,0 +1,74 @@
|
|||||||
|
# https://github.com/mrexodia/Qt5CMakeTemplate
|
||||||
|
# License: BSL-1.0
|
||||||
|
|
||||||
|
# Make the project look nicer in IDEs
|
||||||
|
set_property(GLOBAL PROPERTY AUTOGEN_SOURCE_GROUP "Generated Files")
|
||||||
|
set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER "CMakePredefinedTargets")
|
||||||
|
|
||||||
|
# Install Visual Studio runtime
|
||||||
|
include(InstallRequiredSystemLibraries)
|
||||||
|
|
||||||
|
# Helper function to enable moc/rcc/uic
|
||||||
|
function(target_qt target)
|
||||||
|
set_target_properties(${target} PROPERTIES
|
||||||
|
AUTOMOC
|
||||||
|
ON
|
||||||
|
AUTORCC
|
||||||
|
ON
|
||||||
|
AUTOUIC
|
||||||
|
ON
|
||||||
|
)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
# Helper function to deploy Qt DLLs
|
||||||
|
function(target_windeployqt deploy_target)
|
||||||
|
# Based on: https://stackoverflow.com/a/41199492/1806760
|
||||||
|
# TODO: set VCINSTALLDIR environment variable to copy MSVC runtime DLLs
|
||||||
|
if(Qt5_FOUND AND WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt)
|
||||||
|
get_target_property(_qt5_qmake_location Qt5::qmake IMPORTED_LOCATION)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND "${_qt5_qmake_location}" -query QT_INSTALL_PREFIX
|
||||||
|
RESULT_VARIABLE return_code
|
||||||
|
OUTPUT_VARIABLE qt5_install_prefix
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
set(imported_location "${qt5_install_prefix}/bin/windeployqt.exe")
|
||||||
|
|
||||||
|
if(EXISTS ${imported_location})
|
||||||
|
add_executable(Qt5::windeployqt IMPORTED)
|
||||||
|
|
||||||
|
set_target_properties(Qt5::windeployqt PROPERTIES
|
||||||
|
IMPORTED_LOCATION ${imported_location}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(TARGET Qt5::windeployqt AND NOT TARGET ${deploy_target}-windeployqt)
|
||||||
|
# Create a target that rebuilds when cmake is re-run
|
||||||
|
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${deploy_target}-windeployqt.c" "static void foo() { }\n")
|
||||||
|
add_library(${deploy_target}-windeployqt STATIC
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/${deploy_target}-windeployqt.c"
|
||||||
|
)
|
||||||
|
set_target_properties(${deploy_target}-windeployqt PROPERTIES
|
||||||
|
FOLDER "CMakePredefinedTargets"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Execute windeployqt in a tmp directory after build
|
||||||
|
add_custom_command(TARGET ${deploy_target}-windeployqt
|
||||||
|
POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/${deploy_target}-windeployqt"
|
||||||
|
COMMAND Qt5::windeployqt --no-compiler-runtime --dir "${CMAKE_CURRENT_BINARY_DIR}/${deploy_target}-windeployqt" "$<TARGET_FILE:${deploy_target}>"
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_BINARY_DIR}/${deploy_target}-windeployqt" "$<TARGET_FILE_DIR:${deploy_target}>"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Copy deployment directory during installation
|
||||||
|
install(
|
||||||
|
DIRECTORY
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/${deploy_target}-windeployqt/"
|
||||||
|
DESTINATION bin
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
@ -0,0 +1,162 @@
|
|||||||
|
include_guard()
|
||||||
|
|
||||||
|
# Change these defaults to point to your infrastructure if desired
|
||||||
|
set(CMKR_REPO "https://github.com/build-cpp/cmkr" CACHE STRING "cmkr git repository" FORCE)
|
||||||
|
set(CMKR_TAG "archive_a718dfd6" CACHE STRING "cmkr git tag (this needs to be available forever)" FORCE)
|
||||||
|
|
||||||
|
# Set these from the command line to customize for development/debugging purposes
|
||||||
|
set(CMKR_EXECUTABLE "" CACHE FILEPATH "cmkr executable")
|
||||||
|
set(CMKR_SKIP_GENERATION OFF CACHE BOOL "skip automatic cmkr generation")
|
||||||
|
|
||||||
|
# Disable cmkr if generation is disabled
|
||||||
|
if(DEFINED ENV{CI} OR CMKR_SKIP_GENERATION)
|
||||||
|
message(STATUS "[cmkr] Skipping automatic cmkr generation")
|
||||||
|
macro(cmkr)
|
||||||
|
endmacro()
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Disable cmkr if no cmake.toml file is found
|
||||||
|
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake.toml")
|
||||||
|
message(AUTHOR_WARNING "[cmkr] Not found: ${CMAKE_CURRENT_SOURCE_DIR}/cmake.toml")
|
||||||
|
macro(cmkr)
|
||||||
|
endmacro()
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Convert a Windows native path to CMake path
|
||||||
|
if(CMKR_EXECUTABLE MATCHES "\\\\")
|
||||||
|
string(REPLACE "\\" "/" CMKR_EXECUTABLE_CMAKE "${CMKR_EXECUTABLE}")
|
||||||
|
set(CMKR_EXECUTABLE "${CMKR_EXECUTABLE_CMAKE}" CACHE FILEPATH "" FORCE)
|
||||||
|
unset(CMKR_EXECUTABLE_CMAKE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Helper macro to execute a process (COMMAND_ERROR_IS_FATAL ANY is 3.19 and higher)
|
||||||
|
function(cmkr_exec)
|
||||||
|
execute_process(COMMAND ${ARGV} RESULT_VARIABLE CMKR_EXEC_RESULT)
|
||||||
|
if(NOT CMKR_EXEC_RESULT EQUAL 0)
|
||||||
|
message(FATAL_ERROR "cmkr_exec(${ARGV}) failed (exit code ${CMKR_EXEC_RESULT})")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
# Windows-specific hack (CMAKE_EXECUTABLE_PREFIX is not set at the moment)
|
||||||
|
if(WIN32)
|
||||||
|
set(CMKR_EXECUTABLE_NAME "cmkr.exe")
|
||||||
|
else()
|
||||||
|
set(CMKR_EXECUTABLE_NAME "cmkr")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Use cached cmkr if found
|
||||||
|
set(CMKR_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/_cmkr_${CMKR_TAG}")
|
||||||
|
set(CMKR_CACHED_EXECUTABLE "${CMKR_DIRECTORY}/bin/${CMKR_EXECUTABLE_NAME}")
|
||||||
|
|
||||||
|
if(NOT CMKR_CACHED_EXECUTABLE STREQUAL CMKR_EXECUTABLE AND CMKR_EXECUTABLE MATCHES "^${CMAKE_CURRENT_BINARY_DIR}/_cmkr")
|
||||||
|
message(AUTHOR_WARNING "[cmkr] Upgrading '${CMKR_EXECUTABLE}' to '${CMKR_CACHED_EXECUTABLE}'")
|
||||||
|
unset(CMKR_EXECUTABLE CACHE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMKR_EXECUTABLE AND EXISTS "${CMKR_EXECUTABLE}")
|
||||||
|
message(VERBOSE "[cmkr] Found cmkr: '${CMKR_EXECUTABLE}'")
|
||||||
|
elseif(CMKR_EXECUTABLE AND NOT CMKR_EXECUTABLE STREQUAL CMKR_CACHED_EXECUTABLE)
|
||||||
|
message(FATAL_ERROR "[cmkr] '${CMKR_EXECUTABLE}' not found")
|
||||||
|
else()
|
||||||
|
set(CMKR_EXECUTABLE "${CMKR_CACHED_EXECUTABLE}" CACHE FILEPATH "Full path to cmkr executable" FORCE)
|
||||||
|
message(VERBOSE "[cmkr] Bootstrapping '${CMKR_EXECUTABLE}'")
|
||||||
|
|
||||||
|
message(STATUS "[cmkr] Fetching cmkr...")
|
||||||
|
if(EXISTS "${CMKR_DIRECTORY}")
|
||||||
|
cmkr_exec("${CMAKE_COMMAND}" -E rm -rf "${CMKR_DIRECTORY}")
|
||||||
|
endif()
|
||||||
|
find_package(Git QUIET REQUIRED)
|
||||||
|
cmkr_exec("${GIT_EXECUTABLE}"
|
||||||
|
clone
|
||||||
|
--config advice.detachedHead=false
|
||||||
|
--branch ${CMKR_TAG}
|
||||||
|
--depth 1
|
||||||
|
${CMKR_REPO}
|
||||||
|
"${CMKR_DIRECTORY}"
|
||||||
|
)
|
||||||
|
message(STATUS "[cmkr] Building cmkr...")
|
||||||
|
cmkr_exec("${CMAKE_COMMAND}"
|
||||||
|
--no-warn-unused-cli
|
||||||
|
"${CMKR_DIRECTORY}"
|
||||||
|
"-B${CMKR_DIRECTORY}/build"
|
||||||
|
"-DCMAKE_BUILD_TYPE=Release"
|
||||||
|
"-DCMAKE_INSTALL_PREFIX=${CMKR_DIRECTORY}"
|
||||||
|
"-DCMKR_GENERATE_DOCUMENTATION=OFF"
|
||||||
|
)
|
||||||
|
cmkr_exec("${CMAKE_COMMAND}"
|
||||||
|
--build "${CMKR_DIRECTORY}/build"
|
||||||
|
--config Release
|
||||||
|
--parallel
|
||||||
|
)
|
||||||
|
cmkr_exec("${CMAKE_COMMAND}"
|
||||||
|
--install "${CMKR_DIRECTORY}/build"
|
||||||
|
--config Release
|
||||||
|
--prefix "${CMKR_DIRECTORY}"
|
||||||
|
--component cmkr
|
||||||
|
)
|
||||||
|
if(NOT EXISTS ${CMKR_EXECUTABLE})
|
||||||
|
message(FATAL_ERROR "[cmkr] Failed to bootstrap '${CMKR_EXECUTABLE}'")
|
||||||
|
endif()
|
||||||
|
cmkr_exec("${CMKR_EXECUTABLE}" version)
|
||||||
|
message(STATUS "[cmkr] Bootstrapped ${CMKR_EXECUTABLE}")
|
||||||
|
endif()
|
||||||
|
execute_process(COMMAND "${CMKR_EXECUTABLE}" version
|
||||||
|
RESULT_VARIABLE CMKR_EXEC_RESULT
|
||||||
|
)
|
||||||
|
if(NOT CMKR_EXEC_RESULT EQUAL 0)
|
||||||
|
message(FATAL_ERROR "[cmkr] Failed to get version, try clearing the cache and rebuilding")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# This is the macro that contains black magic
|
||||||
|
macro(cmkr)
|
||||||
|
# When this macro is called from the generated file, fake some internal CMake variables
|
||||||
|
get_source_file_property(CMKR_CURRENT_LIST_FILE "${CMAKE_CURRENT_LIST_FILE}" CMKR_CURRENT_LIST_FILE)
|
||||||
|
if(CMKR_CURRENT_LIST_FILE)
|
||||||
|
set(CMAKE_CURRENT_LIST_FILE "${CMKR_CURRENT_LIST_FILE}")
|
||||||
|
get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# File-based include guard (include_guard is not documented to work)
|
||||||
|
get_source_file_property(CMKR_INCLUDE_GUARD "${CMAKE_CURRENT_LIST_FILE}" CMKR_INCLUDE_GUARD)
|
||||||
|
if(NOT CMKR_INCLUDE_GUARD)
|
||||||
|
set_source_files_properties("${CMAKE_CURRENT_LIST_FILE}" PROPERTIES CMKR_INCLUDE_GUARD TRUE)
|
||||||
|
|
||||||
|
file(SHA256 "${CMAKE_CURRENT_LIST_FILE}" CMKR_LIST_FILE_SHA256_PRE)
|
||||||
|
|
||||||
|
# Generate CMakeLists.txt
|
||||||
|
cmkr_exec("${CMKR_EXECUTABLE}" gen
|
||||||
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
)
|
||||||
|
|
||||||
|
file(SHA256 "${CMAKE_CURRENT_LIST_FILE}" CMKR_LIST_FILE_SHA256_POST)
|
||||||
|
|
||||||
|
# Delete the temporary file if it was left for some reason
|
||||||
|
set(CMKR_TEMP_FILE "${CMAKE_CURRENT_SOURCE_DIR}/CMakerLists.txt")
|
||||||
|
if(EXISTS "${CMKR_TEMP_FILE}")
|
||||||
|
file(REMOVE "${CMKR_TEMP_FILE}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT CMKR_LIST_FILE_SHA256_PRE STREQUAL CMKR_LIST_FILE_SHA256_POST)
|
||||||
|
# Copy the now-generated CMakeLists.txt to CMakerLists.txt
|
||||||
|
# This is done because you cannot include() a file you are currently in
|
||||||
|
configure_file(CMakeLists.txt "${CMKR_TEMP_FILE}" COPYONLY)
|
||||||
|
|
||||||
|
# Add the macro required for the hack at the start of the cmkr macro
|
||||||
|
set_source_files_properties("${CMKR_TEMP_FILE}" PROPERTIES
|
||||||
|
CMKR_CURRENT_LIST_FILE "${CMAKE_CURRENT_LIST_FILE}"
|
||||||
|
)
|
||||||
|
|
||||||
|
# 'Execute' the newly-generated CMakeLists.txt
|
||||||
|
include("${CMKR_TEMP_FILE}")
|
||||||
|
|
||||||
|
# Delete the generated file
|
||||||
|
file(REMOVE "${CMKR_TEMP_FILE}")
|
||||||
|
|
||||||
|
# Do not execute the rest of the original CMakeLists.txt
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
# Resume executing the unmodified CMakeLists.txt
|
||||||
|
endif()
|
||||||
|
endmacro()
|
@ -0,0 +1,36 @@
|
|||||||
|
# This file is automatically generated from cmake.toml - DO NOT EDIT
|
||||||
|
# See https://github.com/build-cpp/cmkr for more information
|
||||||
|
|
||||||
|
# Create a configure-time dependency on cmake.toml to improve IDE support
|
||||||
|
if(CMKR_ROOT_PROJECT)
|
||||||
|
configure_file(cmake.toml cmake.toml COPYONLY)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# vmprofiler
|
||||||
|
set(CMKR_CMAKE_FOLDER ${CMAKE_FOLDER})
|
||||||
|
if(CMAKE_FOLDER)
|
||||||
|
set(CMAKE_FOLDER "${CMAKE_FOLDER}/vmprofiler")
|
||||||
|
else()
|
||||||
|
set(CMAKE_FOLDER vmprofiler)
|
||||||
|
endif()
|
||||||
|
add_subdirectory(vmprofiler)
|
||||||
|
set(CMAKE_FOLDER ${CMKR_CMAKE_FOLDER})
|
||||||
|
|
||||||
|
# Target ia32-doc
|
||||||
|
set(CMKR_TARGET ia32-doc)
|
||||||
|
set(ia32-doc_SOURCES "")
|
||||||
|
|
||||||
|
set(CMKR_SOURCES ${ia32-doc_SOURCES})
|
||||||
|
add_library(ia32-doc INTERFACE)
|
||||||
|
|
||||||
|
if(ia32-doc_SOURCES)
|
||||||
|
target_sources(ia32-doc INTERFACE ${ia32-doc_SOURCES})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(ia32-doc INTERFACE
|
||||||
|
"ia32-doc/out/"
|
||||||
|
)
|
||||||
|
|
||||||
|
unset(CMKR_TARGET)
|
||||||
|
unset(CMKR_SOURCES)
|
||||||
|
|
@ -0,0 +1,5 @@
|
|||||||
|
[subdir.vmprofiler]
|
||||||
|
|
||||||
|
[target.ia32-doc]
|
||||||
|
type = "interface"
|
||||||
|
include-directories = ["ia32-doc/out/"]
|
@ -1 +1 @@
|
|||||||
Subproject commit e75104fbb3b07540be51fcef169e9eaffd1cfee2
|
Subproject commit a4b3817336939c9d6e3207e87a4f1c7830613056
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
###############################################################################
|
|
||||||
# #
|
|
||||||
# The MIT License #
|
|
||||||
# #
|
|
||||||
# Copyright (C) 2017 by Juergen Skrotzky (JorgenVikingGod@gmail.com) #
|
|
||||||
# >> https://github.com/Jorgen-VikingGod #
|
|
||||||
# #
|
|
||||||
# Sources: https://github.com/Jorgen-VikingGod/Qt-Frameless-Window-DarkStyle #
|
|
||||||
# #
|
|
||||||
###############################################################################
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <QApplication>
|
|
||||||
#include "DarkStyle.h"
|
|
||||||
#include "framelesswindow.h"
|
|
||||||
#include "mainwindow.h"
|
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
|
||||||
QApplication a(argc, argv);
|
|
||||||
|
|
||||||
// style our application with custom dark style
|
|
||||||
QApplication::setStyle(new DarkStyle);
|
|
||||||
QApplication::setPalette(QApplication::style()->standardPalette());
|
|
||||||
|
|
||||||
// create frameless window (and set windowState or title)
|
|
||||||
FramelessWindow framelessWindow;
|
|
||||||
//framelessWindow.setWindowState(Qt::WindowFullScreen);
|
|
||||||
//framelessWindow.setWindowTitle("test title");
|
|
||||||
framelessWindow.setWindowIcon(a.style()->standardIcon(QStyle::SP_DesktopIcon));
|
|
||||||
|
|
||||||
// create our mainwindow instance
|
|
||||||
MainWindow *mainWindow = new MainWindow;
|
|
||||||
|
|
||||||
// add the mainwindow to our custom frameless window
|
|
||||||
framelessWindow.setContent(mainWindow);
|
|
||||||
framelessWindow.show();
|
|
||||||
|
|
||||||
return a.exec();
|
|
||||||
}
|
|
@ -1,25 +1,25 @@
|
|||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#include <QtWidgets/QApplication>
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
|
#include <QtWidgets/QApplication>
|
||||||
|
|
||||||
#include "qvminspector.h"
|
#include "darkstyle/DarkStyle.h"
|
||||||
#include "qvirt_instrs.h"
|
#include "darkstyle/framelesswindow/framelesswindow.h"
|
||||||
#include "qvirt_handlers.h"
|
#include "qvirt_handlers.h"
|
||||||
#include "framelesswindow.h"
|
#include "qvirt_instrs.h"
|
||||||
#include "DarkStyle.h"
|
#include "qvminspector.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
|
||||||
{
|
{
|
||||||
QApplication app(argc, argv);
|
QApplication app( __argc, __argv );
|
||||||
QApplication::setStyle(new DarkStyle);
|
QApplication::setStyle( new DarkStyle );
|
||||||
FramelessWindow frameless_window;
|
FramelessWindow frameless_window;
|
||||||
const auto window = new qvminspector_t;
|
const auto window = new qvminspector_t;
|
||||||
qvirt_instrs_t virt_instr( window );
|
qvirt_instrs_t virt_instr( window );
|
||||||
qvirt_handlers_t virt_handlers( window );
|
qvirt_handlers_t virt_handlers( window );
|
||||||
|
|
||||||
frameless_window.setContent( window );
|
frameless_window.setContent( window );
|
||||||
frameless_window.setWindowIcon(QIcon("icon.ico"));
|
frameless_window.setWindowIcon( QIcon( "icon.ico" ) );
|
||||||
frameless_window.show();
|
frameless_window.show();
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
@ -1,111 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="Header Files">
|
|
||||||
<UniqueIdentifier>{841656a6-8f18-40f6-88cc-63394509aec2}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Source Files">
|
|
||||||
<UniqueIdentifier>{b94916d4-6db7-4a7c-bfe5-f2ae9acd3b54}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Resource Files">
|
|
||||||
<UniqueIdentifier>{8c45819e-3375-4fa3-81c3-ef06ca9b22f8}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Header Files\darkstyle">
|
|
||||||
<UniqueIdentifier>{12ad7b7f-216d-4e4f-a08a-c42ed0fc9450}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Header Files\darkstyle\framelesswindow">
|
|
||||||
<UniqueIdentifier>{105cb913-ac75-4192-b597-963e012ddf2e}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Source Files\darkstyle">
|
|
||||||
<UniqueIdentifier>{d58a423a-4c09-4775-a839-0ab9e403f57e}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Source Files\darkstyle\framelesswindow">
|
|
||||||
<UniqueIdentifier>{48472175-af91-4abd-bcc9-9801caeb83c9}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="src\main.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="src\qvirt_instrs.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="src\qvminspector.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="src\darkstyle\framelesswindow\framelesswindow.cpp">
|
|
||||||
<Filter>Source Files\darkstyle\framelesswindow</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="src\darkstyle\framelesswindow\windowdragger.cpp">
|
|
||||||
<Filter>Source Files\darkstyle\framelesswindow</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="src\darkstyle\DarkStyle.cpp">
|
|
||||||
<Filter>Source Files\darkstyle</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="src\qvirt_handlers.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<QtMoc Include="src\qvminspector.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</QtMoc>
|
|
||||||
<QtMoc Include="src\darkstyle\DarkStyle.h">
|
|
||||||
<Filter>Header Files\darkstyle</Filter>
|
|
||||||
</QtMoc>
|
|
||||||
<QtMoc Include="src\darkstyle\framelesswindow\framelesswindow.h">
|
|
||||||
<Filter>Header Files\darkstyle\framelesswindow</Filter>
|
|
||||||
</QtMoc>
|
|
||||||
<QtMoc Include="src\darkstyle\framelesswindow\windowdragger.h">
|
|
||||||
<Filter>Header Files\darkstyle\framelesswindow</Filter>
|
|
||||||
</QtMoc>
|
|
||||||
<QtMoc Include="src\qvirt_instrs.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</QtMoc>
|
|
||||||
<QtMoc Include="src\qvirt_handlers.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</QtMoc>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<QtRcc Include="src\darkstyle\darkstyle.qrc">
|
|
||||||
<Filter>Resource Files</Filter>
|
|
||||||
</QtRcc>
|
|
||||||
<QtRcc Include="src\darkstyle\framelesswindow.qrc">
|
|
||||||
<Filter>Resource Files</Filter>
|
|
||||||
</QtRcc>
|
|
||||||
<QtRcc Include="src\qvminspector.qrc">
|
|
||||||
<Filter>Resource Files</Filter>
|
|
||||||
</QtRcc>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<QtUic Include="src\darkstyle\framelesswindow\framelesswindow.ui">
|
|
||||||
<Filter>Resource Files</Filter>
|
|
||||||
</QtUic>
|
|
||||||
<QtUic Include="src\qvminspector.ui">
|
|
||||||
<Filter>Resource Files</Filter>
|
|
||||||
</QtUic>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include=".clang-format">
|
|
||||||
<Filter>Resource Files</Filter>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="dependencies\ia32-doc\out\ia32.hpp">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="x64\Release\uic\ui_framelesswindow.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Image Include="src\icon.ico">
|
|
||||||
<Filter>Resource Files</Filter>
|
|
||||||
</Image>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ResourceCompile Include="src\icon.rc">
|
|
||||||
<Filter>Resource Files</Filter>
|
|
||||||
</ResourceCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
Loading…
Reference in new issue