mirror of
https://git.wownero.com/wowlet/wowlet.git
synced 2024-08-15 01:03:14 +00:00
reorg submodules
This commit is contained in:
parent
ca72462125
commit
ac096e5dc1
14 changed files with 85 additions and 64 deletions
13
.gitmodules
vendored
13
.gitmodules
vendored
|
@ -1,7 +1,10 @@
|
|||
[submodule "contrib/KDMacTouchBar"]
|
||||
path = contrib/KDMacTouchBar
|
||||
url = https://github.com/KDAB/KDMacTouchBar.git
|
||||
[submodule "monero"]
|
||||
path = monero
|
||||
[submodule "external/wownero"]
|
||||
path = external/wownero
|
||||
url = https://git.wownero.com/wownero/wownero
|
||||
branch = wowlet
|
||||
[submodule "external/monero-seed"]
|
||||
path = external/monero-seed
|
||||
url = https://git.wownero.com/wowlet/monero-seed
|
||||
[submodule "external/KDMacTouchBar"]
|
||||
path = external/KDMacTouchBar
|
||||
url = https://github.com/KDAB/KDMacTouchBar
|
||||
|
|
|
@ -28,13 +28,26 @@ if(DEBUG)
|
|||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
endif()
|
||||
|
||||
set(WOWNERO_HEAD "f611d5c9e32bc62f1735f6571b0bdb95cc020531")
|
||||
# Submodule commit hashes
|
||||
set(TOUCH_BAR_HEAD "696bb2141c")
|
||||
set(MONERO_SEED_HEAD "4674ef09b6")
|
||||
set(WOWNERO_HEAD "f611d5c9e3")
|
||||
|
||||
set(BUILD_GUI_DEPS ON)
|
||||
set(ARCH "x86-64")
|
||||
set(BUILD_64 ON)
|
||||
set(INSTALL_VENDORED_LIBUNBOUND ${STATIC})
|
||||
set(USE_SINGLE_BUILDDIR ON)
|
||||
|
||||
if(NOT WIN32)
|
||||
string(ASCII 27 Esc)
|
||||
set(BoldRed "${Esc}[1;31m")
|
||||
set(BoldGreen "${Esc}[1;32m")
|
||||
set(BoldYellow "${Esc}[1;33m")
|
||||
set(ResetColor "${Esc}[m")
|
||||
set(BoldColor "${Esc}[1m")
|
||||
endif()
|
||||
|
||||
check_include_file(sys/prctl.h HAVE_SYS_PRCTL_H)
|
||||
check_symbol_exists(prctl "sys/prctl.h" HAVE_PRCTL)
|
||||
|
||||
|
@ -47,7 +60,7 @@ if(STATIC)
|
|||
# manually set the unbound submodule the right commit that has the fix.
|
||||
# This only works with -DMANUAL_SUBMODULES=1
|
||||
message(STATUS "applying unbound static build fix contrib/unbound_static.patch")
|
||||
execute_process(COMMAND bash -c "git -C ${CMAKE_SOURCE_DIR}/monero/external/unbound apply ${CMAKE_SOURCE_DIR}/contrib/unbound_static.patch")
|
||||
execute_process(COMMAND bash -c "git -C ${CMAKE_SOURCE_DIR}/external/wownero/external/unbound apply ${CMAKE_SOURCE_DIR}/contrib/unbound_static.patch")
|
||||
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
set(Boost_USE_STATIC_RUNTIME ON)
|
||||
|
@ -81,23 +94,49 @@ endfunction()
|
|||
|
||||
find_package(Git)
|
||||
if(GIT_FOUND)
|
||||
message(STATUS "Initializing submodules")
|
||||
execute_process(COMMAND git "submodule" "update" "--init" "--recursive")
|
||||
execute_process(COMMAND git rev-parse "HEAD" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/monero OUTPUT_VARIABLE _WOWNERO_HEAD OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(NOT _WOWNERO_HEAD STREQUAL WOWNERO_HEAD)
|
||||
message(FATAL_ERROR "[submodule] Monero HEAD was at ${_WOWNERO_HEAD} but should be at ${WOWNERO_HEAD}")
|
||||
# Update and initialize submodules
|
||||
message("\n${BoldYellow}Initializing submodules...\n${ResetColor}")
|
||||
if(APPLE)
|
||||
execute_process(COMMAND git "submodule" "update" "--init" "--recursive" -- ${CMAKE_SOURCE_DIR}/external/KDMacTouchBar)
|
||||
endif()
|
||||
execute_process(COMMAND git "submodule" "update" "--init" "--recursive" -- ${CMAKE_SOURCE_DIR}/external/monero-seed)
|
||||
execute_process(COMMAND git "submodule" "update" "--init" "--recursive" -- ${CMAKE_SOURCE_DIR}/external/wownero)
|
||||
# Get submodule commit hashes
|
||||
if(APPLE)
|
||||
execute_process(COMMAND git rev-parse --short=10 "HEAD" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/external/KDMacTouchBar OUTPUT_VARIABLE _TOUCH_BAR_HEAD OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
execute_process(COMMAND git rev-parse --short=10 "HEAD" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/external/monero-seed OUTPUT_VARIABLE _MONERO_SEED_HEAD OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND git rev-parse --short=10 "HEAD" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/external/wownero OUTPUT_VARIABLE _WOWNERO_HEAD OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# Sanity check
|
||||
if(APPLE AND NOT _TOUCH_BAR_HEAD STREQUAL TOUCH_BAR_HEAD)
|
||||
message(FATAL_ERROR "[submodule] KDMacTouchBar HEAD was at ${_TOUCH_BAR_HEAD} but should be at ${TOUCH_BAR_HEAD}")
|
||||
elseif(APPLE)
|
||||
message("${BoldGreen}[submodule] KDMacTouchBar HEAD @ ${_TOUCH_BAR_HEAD}${ResetColor}")
|
||||
add_subdirectory(external/KDMacTouchBar)
|
||||
endif()
|
||||
if(NOT _MONERO_SEED_HEAD STREQUAL MONERO_SEED_HEAD)
|
||||
message(FATAL_ERROR "[submodule] monero-seed HEAD was at ${_MONERO_SEED} but should be at ${MONERO_SEED_HEAD}")
|
||||
else()
|
||||
message(STATUS "[submodule] Monero HEAD @ ${WOWNERO_HEAD}")
|
||||
message("${BoldGreen}[submodule] monero-seed HEAD @ ${_MONERO_SEED_HEAD}${ResetColor}")
|
||||
endif()
|
||||
if(NOT _WOWNERO_HEAD STREQUAL WOWNERO_HEAD)
|
||||
message(FATAL_ERROR "[submodule] wownero HEAD was at ${_WOWNERO_HEAD} but should be at ${WOWNERO_HEAD}")
|
||||
else()
|
||||
message("${BoldGreen}[submodule] wownero HEAD @ ${WOWNERO_HEAD}${ResetColor}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory(monero)
|
||||
set_property(TARGET wallet_merged PROPERTY FOLDER "monero")
|
||||
get_directory_property(ARCH_WIDTH DIRECTORY "monero" DEFINITION ARCH_WIDTH)
|
||||
get_directory_property(UNBOUND_LIBRARY DIRECTORY "monero" DEFINITION UNBOUND_LIBRARY)
|
||||
add_subdirectory(external/wownero)
|
||||
add_subdirectory(external/monero-seed)
|
||||
add_library(monero-seed::monero-seed ALIAS monero-seed)
|
||||
|
||||
set_property(TARGET wallet_merged PROPERTY FOLDER "external/wownero")
|
||||
get_directory_property(ARCH_WIDTH DIRECTORY "external/wownero" DEFINITION ARCH_WIDTH)
|
||||
get_directory_property(UNBOUND_LIBRARY DIRECTORY "external/wownero" DEFINITION UNBOUND_LIBRARY)
|
||||
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
include(VersionMonero)
|
||||
include(VersionWownero)
|
||||
include(VersionWowlet)
|
||||
|
||||
include_directories(${EASYLOGGING_INCLUDE})
|
||||
|
@ -122,24 +161,6 @@ set(HIDAPI_FOUND OFF)
|
|||
# QrEncode
|
||||
find_package(QREncode REQUIRED)
|
||||
|
||||
# Tevador 14 word Monero seed
|
||||
find_package(monero-seed CONFIG)
|
||||
if(NOT monero-seed_FOUND)
|
||||
if(FETCH_DEPS)
|
||||
FetchContent_Declare(monero-seed
|
||||
GIT_REPOSITORY https://git.wownero.com/wowlet/monero-seed.git)
|
||||
FetchContent_GetProperties(monero-seed)
|
||||
if(NOT monero-seed_POPULATED)
|
||||
message(STATUS "Fetching monero-seed")
|
||||
FetchContent_Populate(monero-seed)
|
||||
add_subdirectory(${monero-seed_SOURCE_DIR} ${monero-seed_BINARY_DIR})
|
||||
endif()
|
||||
add_library(monero-seed::monero-seed ALIAS monero-seed)
|
||||
else()
|
||||
message(FATAL_ERROR "monero-seed was not installed and fetching deps is disabled")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Boost
|
||||
if(DEBUG)
|
||||
set(Boost_DEBUG ON)
|
||||
|
@ -361,8 +382,4 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 ${C_SECURITY_FLAGS}")
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${CXX_SECURITY_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${STATIC_FLAGS}")
|
||||
|
||||
if(APPLE)
|
||||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/contrib/KDMacTouchBar")
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
|
|
@ -35,7 +35,7 @@ if(RET)
|
|||
message(WARNING "Cannot determine current commit. Make sure that you are building either from a Git working tree or from a source archive.")
|
||||
set(VERSIONTAG "unknown")
|
||||
set(VERSION_IS_RELEASE "false")
|
||||
configure_file("monero/src/version.cpp.in" "${TO}")
|
||||
configure_file("external/wownero/src/version.cpp.in" "${TO}")
|
||||
else()
|
||||
string(SUBSTRING ${COMMIT} 0 9 COMMIT)
|
||||
message(STATUS "You are currently on commit ${COMMIT}")
|
||||
|
@ -61,5 +61,5 @@ else()
|
|||
set(VERSION_IS_RELEASE "false")
|
||||
endif()
|
||||
endif()
|
||||
configure_file("monero/src/version.cpp.in" "${TO}")
|
||||
configure_file("external/wownero/src/version.cpp.in" "${TO}")
|
||||
endif()
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
function (write_static_version_header hash)
|
||||
set(VERSIONTAG "${hash}")
|
||||
configure_file("${CMAKE_SOURCE_DIR}/monero/src/version.cpp.in" "${CMAKE_BINARY_DIR}/version.cpp")
|
||||
configure_file("${CMAKE_SOURCE_DIR}/external/wownero/src/version.cpp.in" "${CMAKE_BINARY_DIR}/version.cpp")
|
||||
endfunction ()
|
||||
|
||||
find_package(Git QUIET)
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
find_package(Git QUIET)
|
||||
# Check what commit we're on
|
||||
execute_process(COMMAND "${GIT_EXECUTABLE}" rev-parse --short=9 HEAD RESULT_VARIABLE RET OUTPUT_VARIABLE COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/monero)
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/external/wownero)
|
||||
|
||||
if(RET)
|
||||
# Something went wrong, set the version tag to -unknown
|
||||
|
||||
message(WARNING "Cannot determine current commit. Make sure that you are building either from a Git working tree or from a source archive.")
|
||||
set(MONERO_BRANCH "unknown")
|
||||
set(WOWNERO_BRANCH "unknown")
|
||||
else()
|
||||
string(SUBSTRING ${COMMIT} 0 9 COMMIT)
|
||||
message(STATUS "You are currently on commit ${COMMIT}")
|
||||
|
@ -20,30 +20,30 @@ else()
|
|||
|
||||
if(NOT TAGGEDCOMMIT)
|
||||
message(STATUS "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")
|
||||
set(MONERO_BRANCH "${COMMIT}")
|
||||
set(WOWNERO_BRANCH "${COMMIT}")
|
||||
else()
|
||||
message(STATUS "The most recent tag was at ${TAGGEDCOMMIT}")
|
||||
|
||||
# Check if we're building that tagged commit or a different one
|
||||
if(COMMIT STREQUAL TAGGEDCOMMIT)
|
||||
message(STATUS "You are building a tagged release")
|
||||
set(MONERO_BRANCH "release")
|
||||
set(WOWNERO_BRANCH "release")
|
||||
else()
|
||||
message(STATUS "You are ahead of or behind a tagged release")
|
||||
set(MONERO_BRANCH "${COMMIT}")
|
||||
set(WOWNERO_BRANCH "${COMMIT}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Check latest tagged release
|
||||
execute_process(COMMAND "${GIT_EXECUTABLE}" describe --abbrev=0 RESULT_VARIABLE RET OUTPUT_VARIABLE TAG OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/monero)
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/external/wownero)
|
||||
|
||||
if(RET)
|
||||
message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")
|
||||
set(MONERO_VERSION "unknown")
|
||||
set(WOWNERO_VERSION "unknown")
|
||||
else ()
|
||||
set(MONERO_VERSION "${TAG}")
|
||||
set(WOWNERO_VERSION "${TAG}")
|
||||
endif()
|
||||
|
||||
configure_file("cmake/config-wowlet.h.cmake" "${CMAKE_CURRENT_SOURCE_DIR}/src/config-wowlet.h")
|
|
@ -4,8 +4,8 @@
|
|||
#define WOWLET_VERSION "@VERSION@"
|
||||
#define WOWLET_BRANCH "@WOWLET_BRANCH@"
|
||||
|
||||
#define MONERO_VERSION "@MONERO_VERSION@"
|
||||
#define MONERO_BRANCH "@MONERO_BRANCH@"
|
||||
#define WOWNERO_VERSION "@WOWNERO_VERSION@"
|
||||
#define WOWNERO_BRANCH "@WOWNERO_BRANCH@"
|
||||
|
||||
#define TOR_VERSION "@TOR_VERSION@"
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 470c4316460bb8c3e23bfa37c79c8621ef3f1b4c
|
1
external/KDMacTouchBar
vendored
Submodule
1
external/KDMacTouchBar
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 696bb2141cbc141023c8766f293c0ed6449a8f1f
|
1
external/monero-seed
vendored
Submodule
1
external/monero-seed
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 4674ef09b6faa6fe602ab5ae0b9ca8e1fd7d5e1b
|
0
monero → external/wownero
vendored
0
monero → external/wownero
vendored
|
@ -94,10 +94,10 @@ file(GLOB_RECURSE SRC_HEADERS *.h)
|
|||
|
||||
target_include_directories(wowlet PUBLIC
|
||||
${CMAKE_BINARY_DIR}/src/wowlet_autogen/include
|
||||
${CMAKE_SOURCE_DIR}/monero/include
|
||||
${CMAKE_SOURCE_DIR}/monero/src
|
||||
${CMAKE_SOURCE_DIR}/monero/external/easylogging++
|
||||
${CMAKE_SOURCE_DIR}/monero/contrib/epee/include
|
||||
${CMAKE_SOURCE_DIR}/external/wownero/include
|
||||
${CMAKE_SOURCE_DIR}/external/wownero/src
|
||||
${CMAKE_SOURCE_DIR}/external/wownero/external/easylogging++
|
||||
${CMAKE_SOURCE_DIR}/external/wownero/contrib/epee/include
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/daemon
|
||||
|
@ -165,7 +165,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
|||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# https://stackoverflow.com/questions/57766620/cmake-add-library-doesnt-initialize-static-global-variable
|
||||
# so that contrib/monero-seed/src/gf_elem.cpp properly initializes. A better solution is welcome.
|
||||
# so that external/monero-seed/src/gf_elem.cpp properly initializes. A better solution is welcome.
|
||||
target_link_libraries(wowlet -Wl,--whole-archive monero-seed::monero-seed -Wl,--no-whole-archive)
|
||||
else()
|
||||
target_link_libraries(wowlet monero-seed::monero-seed)
|
||||
|
@ -202,7 +202,7 @@ if(APPLE)
|
|||
KDMacTouchBar
|
||||
)
|
||||
target_include_directories(wowlet
|
||||
PUBLIC ../contrib/KDMacTouchBar)
|
||||
PUBLIC ../external/KDMacTouchBar)
|
||||
endif()
|
||||
|
||||
if(NOT APPLE)
|
||||
|
|
|
@ -41,7 +41,7 @@ void DebugInfoDialog::updateInfo() {
|
|||
torStatus = "Unknown";
|
||||
|
||||
ui->label_wowletVersion->setText(QString("%1-%2").arg(WOWLET_VERSION, WOWLET_BRANCH));
|
||||
ui->label_moneroVersion->setText(QString("%1-%2").arg(MONERO_VERSION, MONERO_BRANCH));
|
||||
ui->label_wowneroVersion->setText(QString("%1-%2").arg(WOWNERO_VERSION, WOWNERO_BRANCH));
|
||||
|
||||
ui->label_walletHeight->setText(QString::number(m_ctx->currentWallet->blockChainHeight()));
|
||||
ui->label_daemonHeight->setText(QString::number(m_ctx->currentWallet->daemonBlockChainHeight()));
|
||||
|
@ -90,7 +90,7 @@ void DebugInfoDialog::copyToClipboad() {
|
|||
// Two spaces at the end of each line are for newlines in Markdown
|
||||
QString text = "";
|
||||
text += QString("WOWlet version: %1 \n").arg(ui->label_wowletVersion->text());
|
||||
text += QString("Wownero version: %1 \n").arg(ui->label_moneroVersion->text());
|
||||
text += QString("Wownero version: %1 \n").arg(ui->label_wowneroVersion->text());
|
||||
|
||||
text += QString("Wallet height: %1 \n").arg(ui->label_walletHeight->text());
|
||||
text += QString("Daemon height: %1 \n").arg(ui->label_daemonHeight->text());
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_moneroVersion">
|
||||
<widget class="QLabel" name="label_wowneroVersion">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
|
|
|
@ -10,7 +10,7 @@ add_library(openpgp
|
|||
|
||||
find_package(GCrypt)
|
||||
target_include_directories(openpgp PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/monero/contrib/epee/include
|
||||
${CMAKE_SOURCE_DIR}/external/wownero/contrib/epee/include
|
||||
${GCRYPT_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue