Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some main loop crashes #2008

Merged
92 commits merged into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from 90 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
7b4b286
Merge pull request #6 from smk762/template_update
smk762 Sep 7, 2022
0c655a7
[temp][debugging] add more logs
Oct 13, 2022
6ecf009
[temp][debugging] add more logs
Oct 13, 2022
b0e8314
[temp][debugging] enable more logs
Oct 14, 2022
d13d14f
[temp][debugging] Tell ci to build in debug mode
Oct 14, 2022
9010543
ci: try ubuntu-22.04
Oct 17, 2022
909b7d7
Remove useless async stuff
Oct 17, 2022
82edd67
[temp][debugging] more logs
Oct 17, 2022
7e0230b
ci: try ubuntu 20.04
Oct 17, 2022
fd63baf
cmake: use project_source_dir instead of root_dir
Oct 17, 2022
3dce08c
[temp] ahhhhhhhhhhhhhhhhhh
Oct 17, 2022
5b5843b
check paths
smk762 Oct 17, 2022
ea149a1
use 20.04
smk762 Oct 17, 2022
c9df77c
use debug flag
smk762 Oct 17, 2022
75f5fef
add some logs to track cwd path
smk762 Oct 17, 2022
5530a56
missing import
smk762 Oct 17, 2022
80540ad
use PROJECT_ROOT_DIR
smk762 Oct 17, 2022
1072da3
set env var for nim
smk762 Oct 17, 2022
1eab374
nim syntax
smk762 Oct 17, 2022
d3a0a36
3tl
smk762 Oct 17, 2022
91a87f4
set path earlier
smk762 Oct 17, 2022
e46bf55
Update generate.nim
smk762 Oct 17, 2022
6fb9a68
Update generate.nim
smk762 Oct 17, 2022
b054bcf
Update atomicdex-desktop-ci.yml
smk762 Oct 17, 2022
6479962
use full path
smk762 Oct 17, 2022
eecffc4
use full paths
smk762 Oct 17, 2022
b747595
paths
smk762 Oct 18, 2022
0e435ae
fix test paths
smk762 Oct 18, 2022
d89272c
ls
smk762 Oct 18, 2022
fdba33f
clean up some vars, expand matrix
smk762 Oct 18, 2022
1cacbac
wake up Neo, they're coming
smk762 Oct 18, 2022
c8180cf
discard
smk762 Oct 18, 2022
6871f49
mac upload path
smk762 Oct 18, 2022
01a977d
Merge branch 'KomodoPlatform:dev' into dev
smk762 Oct 18, 2022
23fb88b
Merge remote-tracking branch 'origin/test_CI' into fix/loop_crashes
Oct 18, 2022
9b2a6e4
use macos-11
smk762 Oct 18, 2022
a5f03a4
Merge remote-tracking branch 'origin/test_CI' into fix/loop_crashes
Oct 18, 2022
0ef1a97
remove logs
smk762 Oct 18, 2022
02e8ec4
Merge branch 'fix/loop_crashes' into test_CI
smk762 Oct 20, 2022
3d92399
use default libtool, fix linux path
smk762 Oct 20, 2022
08e842c
path case
smk762 Oct 20, 2022
e636cb9
check osx var log
smk762 Oct 20, 2022
3cb2a57
Merge remote-tracking branch 'origin/test_CI' into fix/loop_crashes
Oct 20, 2022
4db688a
Reduce boilerplate code + better stdout logs
Oct 21, 2022
eaf64a1
Move some info logs to debug logs
Oct 21, 2022
24eda93
Add more checks when iterating through strange container
Oct 21, 2022
78d4b5c
More array size check
Oct 21, 2022
ade1547
[temp][debugging] more stdout log
Oct 21, 2022
ab35558
Remove useless statement
Oct 21, 2022
d921b75
Remove useless comments
Oct 21, 2022
4b22f74
Add some todo
Oct 21, 2022
67a9dba
Add todo
Oct 21, 2022
b08ade6
add debug builds to CI
smk762 Oct 22, 2022
eec1716
fin the appimage
smk762 Oct 22, 2022
9673d02
find the appimage
smk762 Oct 22, 2022
3060522
rename the appimage
smk762 Oct 22, 2022
c8cb43e
rm ls
smk762 Oct 22, 2022
6b60dc2
rename syntax
smk762 Oct 22, 2022
ee8503d
appimage filename
smk762 Oct 22, 2022
7deaed3
clean logs
smk762 Oct 22, 2022
a055dc9
use master coins
smk762 Oct 22, 2022
766880d
Revert "use master coins"
smk762 Oct 22, 2022
ec390fa
Merge pull request #2021 from smk762/debug_builds
smk762 Oct 22, 2022
d4767f2
fix mac qt, add logs
smk762 Oct 22, 2022
8f52acc
look for missing .7z file
smk762 Oct 22, 2022
a368bd4
log archivegen, use full path
smk762 Oct 22, 2022
c9fc4ee
search for 7z
smk762 Oct 22, 2022
0c1304c
more full paths
smk762 Oct 22, 2022
1a0f478
more searching
smk762 Oct 23, 2022
81d7441
harder to find than WMDs
smk762 Oct 23, 2022
17938db
upload anyway if build error on test stage
smk762 Oct 23, 2022
a22c1e3
archivegen mac installer
smk762 Oct 23, 2022
15d4257
more ls
smk762 Oct 23, 2022
299ba21
comment out tests for faster completion
smk762 Oct 23, 2022
1b7325e
missing quote
smk762 Oct 24, 2022
23086b3
use full path
smk762 Oct 24, 2022
f51887a
more or ls
smk762 Oct 24, 2022
bd0bdfa
copy to where it needs to be
smk762 Oct 24, 2022
802307c
rm logs no longer needed
smk762 Oct 24, 2022
b5fc710
Revert "CI: macOS: Fix path of artifact"
Oct 20, 2022
0402be3
Revert "[temp] ahhhhhhhhhhhhhhhhhh"
Oct 24, 2022
3289211
Revert "cmake: use project_source_dir instead of root_dir"
Oct 17, 2022
9af7cb0
Revert "ci: try ubuntu-22.04"
Oct 24, 2022
f5ac62c
Revert "[temp][debugging] Tell ci to build in debug mode"
Oct 24, 2022
b124e4f
Revert "Merge remote-tracking branch 'origin/test_CI' into fix/loop_c…
Oct 20, 2022
faeae12
Revert "[temp][debugging] Tell ci to build in debug mode"
Oct 24, 2022
f6cbfaa
revert ci changes
Oct 24, 2022
32dbc10
revert more ci changes
Oct 24, 2022
9c3ee9d
Merge pull request #2022 from KomodoPlatform/debug-builds
Oct 24, 2022
e809204
[temp] [debugging] more log
Oct 28, 2022
a980f3f
Remove temp and some useless logs
Nov 1, 2022
90f867c
Remove log
Nov 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
256 changes: 138 additions & 118 deletions .github/workflows/atomicdex-desktop-ci.yml

Large diffs are not rendered by default.

31 changes: 19 additions & 12 deletions ci_tools_atomic_dex/src/ci_tools_atomic_dex.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Atomic Dex CI Tools.
Usage:
ci_tools_atomic_dex --install_vcpkg
ci_tools_atomic_dex --install_dependencies
ci_tools_atomic_dex build (release|debug) [--osx_sdk=<sdk_path>] [--compiler=<compiler_path>]
ci_tools_atomic_dex build (Release|Debug) [--osx_sdk=<sdk_path>] [--compiler=<compiler_path>]
ci_tools_atomic_dex clean (full|dependencies|build_dir)
ci_tools_atomic_dex generate (release|debug) [--osx_sdk=<sdk_path>] [--compiler=<compiler_path>]
ci_tools_atomic_dex bundle (release|debug) [--osx_sdk=<sdk_path>] [--compiler=<compiler_path>]
ci_tools_atomic_dex tests (release|debug) [--osx_sdk=<sdk_path>] [--compiler=<compiler_path>]
ci_tools_atomic_dex generate (Release|Debug) [--osx_sdk=<sdk_path>] [--compiler=<compiler_path>]
ci_tools_atomic_dex bundle (Release|Debug) [--osx_sdk=<sdk_path>] [--compiler=<compiler_path>]
ci_tools_atomic_dex tests (Release|Debug) [--osx_sdk=<sdk_path>] [--compiler=<compiler_path>]
ci_tools_atomic_dex --version
ci_tools_atomic_dex (-h | --help)

Expand All @@ -32,30 +32,37 @@ Options:
proc main() =
let args = docopt(doc, version = "Atomic Dex CI Tools 0.0.1")
vcpkg_prepare()

if args["--install_vcpkg"]:
install_vcpkg()

elif args["--install_dependencies"]:
download_packages()

elif args["generate"]:
if args["release"]:
if args["Release"]:
generate_solution("Release", $args["--osx_sdk"], $args["--compiler"])
elif args["debug"]:
elif args["Debug"]:
generate_solution("Debug", $args["--osx_sdk"], $args["--compiler"])

elif args["build"]:
if args["release"]:
if args["Release"]:
build_atomic_qt("Release", $args["--osx_sdk"], $args["--compiler"])
elif args["debug"]:
elif args["Debug"]:
build_atomic_qt("Debug", $args["--osx_sdk"], $args["--compiler"])

elif args["bundle"]:
if args["release"]:
if args["Release"]:
bundle("Release", $args["--osx_sdk"], $args["--compiler"])
elif args["debug"]:
elif args["Debug"]:
bundle("Debug", $args["--osx_sdk"], $args["--compiler"])

elif args["tests"]:
if args["release"]:
if args["Release"]:
run_tests("Release", $args["--osx_sdk"], $args["--compiler"])
elif args["debug"]:
elif args["Debug"]:
run_tests("Debug", $args["--osx_sdk"], $args["--compiler"])

elif args["clean"]:
if args["full"]:
clean("full")
Expand Down
20 changes: 19 additions & 1 deletion ci_tools_atomic_dex/src/tests.nim
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,26 @@ proc run_tests*(build_type: string, osx_sdk_path: string, compiler_path: string)
generate_solution(build_type, osx_sdk_path, compiler_path)

when defined(osx):
echo "CURRENT OSX FOLDER"
echo os.getCurrentDir()
os.setCurrentDir(os.getCurrentDir().joinPath("bin").joinPath(os.getEnv("DEX_PROJECT_NAME") & "_tests.app").joinPath("Contents").joinPath("MacOS"))
discard osproc.execCmd("ls")
os.setCurrentDir(os.getCurrentDir().joinPath("bin"))
echo "CURRENT OSX FOLDER"
echo os.getCurrentDir()
discard osproc.execCmd("ls")
os.setCurrentDir(os.getCurrentDir().joinPath(os.getEnv("DEX_PROJECT_NAME") & "_tests.app"))
echo "CURRENT OSX FOLDER"
echo os.getCurrentDir()
discard osproc.execCmd("ls")
os.setCurrentDir(os.getCurrentDir().joinPath("Contents"))
echo "CURRENT OSX FOLDER"
echo os.getCurrentDir()
discard osproc.execCmd("ls")
os.setCurrentDir(os.getCurrentDir().joinPath("MacOS"))
echo "CURRENT OSX FOLDER"
echo os.getCurrentDir()
discard osproc.execCmd("ls")
# os.setCurrentDir(os.getCurrentDir().joinPath("bin").joinPath(os.getEnv("DEX_PROJECT_NAME") & "_tests.app").joinPath("Contents").joinPath("MacOS"))
echo "Running AtomicDex Pro Unit tests"
discard osproc.execCmd("./" & os.getEnv("DEX_PROJECT_NAME") & "_tests --reporters=xml --out=" & os.getEnv("DEX_PROJECT_NAME") & "-tests-result.xml -s")
echo "Successfully Generated", os.getEnv("DEX_PROJECT_NAME"), "-tests-result.xml"
Expand Down
26 changes: 19 additions & 7 deletions cmake/install/linux/linux_post_install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,26 @@ execute_process(COMMAND bash -c "echo -n `git rev-parse --short HEAD`"
OUTPUT_VARIABLE VERSION_ID
)

message(STATUS "PROJECT_ROOT_DIR (before readjusting) -> ${PROJECT_ROOT_DIR}")

get_filename_component(PROJECT_ROOT_DIR ${CMAKE_SOURCE_DIR} DIRECTORY)
if (EXISTS ${PROJECT_ROOT_DIR}/build-Release)
if (EXISTS ${PROJECT_ROOT_DIR}/build-Release OR EXISTS ${PROJECT_ROOT_DIR}/build-Debug)
message(STATUS "from ci tools, readjusting")
get_filename_component(PROJECT_ROOT_DIR ${PROJECT_ROOT_DIR} DIRECTORY)
endif ()

message(STATUS "PROJECT_ROOT_DIR -> ${PROJECT_ROOT_DIR}")
set(PROJECT_QML_DIR ${PROJECT_ROOT_DIR}/atomic_defi_design/Dex)
message(STATUS "PROJECT_QML_DIR -> ${PROJECT_QML_DIR}")
set(PROJECT_APP_DIR AntaraAtomicDexAppDir)
set(PROJECT_APP_PATH ${CMAKE_SOURCE_DIR}/bin/${PROJECT_APP_DIR})
set(PROJECT_BIN_PATH ${PROJECT_APP_PATH}/usr/bin/${DEX_PROJECT_NAME})
set(PROJECT_LIB_PATH ${PROJECT_APP_PATH}/usr/lib)
set(TARGET_APP_PATH ${PROJECT_ROOT_DIR}/bundled/linux)

message(STATUS "VCPKG package manager enabled")
message(STATUS "PROJECT_ROOT_DIR (after readjusting) -> ${PROJECT_ROOT_DIR}")
message(STATUS "PROJECT_QML_DIR -> ${PROJECT_QML_DIR}")
message(STATUS "VERSION_ID -> ${VERSION_ID}")

if (EXISTS ${PROJECT_APP_PATH})
message(STATUS "PROJECT_APP_PATH path is -> ${PROJECT_APP_PATH}")
message(STATUS "PROJECT_BIN_PATH path is -> ${PROJECT_BIN_PATH}")
Expand All @@ -28,16 +34,13 @@ else ()
message(FATAL_ERROR "Didn't find ${PROJECT_APP_PATH}")
endif ()

message(STATUS "VCPKG package manager enabled")
set(LINUX_DEPLOY_PATH ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/linux_misc/linuxdeployqt-7-x86_64.AppImage)

if (EXISTS ${LINUX_DEPLOY_PATH})
message(STATUS "linuxdeployqt path is -> ${LINUX_DEPLOY_PATH}")
else ()
message(FATAL_ERROR "Didn't find ${LINUX_DEPLOY_PATH}")
endif ()


message(STATUS "Copying required libraries for QtWebEngine")
list(APPEND LIST_LIBS
"/usr/lib/x86_64-linux-gnu/libsmime3.so"
Expand All @@ -49,26 +52,35 @@ list(APPEND LIST_LIBS
"/usr/lib/x86_64-linux-gnu/nss/libnssdbm3.so"
"/usr/lib/x86_64-linux-gnu/nss/libsoftokn3.chk"
"/usr/lib/x86_64-linux-gnu/nss/libsoftokn3.so")

file(COPY ${PROJECT_APP_PATH}/usr/share/icons/default/64x64/apps/dex-logo-64.png DESTINATION ${PROJECT_APP_PATH})
file(COPY ${PROJECT_APP_PATH}/usr/share/applications/dex.desktop DESTINATION ${PROJECT_APP_PATH})

foreach (current_lib ${LIST_LIBS})
message(STATUS "copying ${current_lib} to ${PROJECT_LIB_PATH}")
file(COPY ${current_lib} DESTINATION ${PROJECT_LIB_PATH})
endforeach ()

message(STATUS "Executing linuxdeployqt to fix dependencies")
message(STATUS "Executing cmd: [${LINUX_DEPLOY_PATH} ${PROJECT_BIN_PATH} -qmldir=${PROJECT_QML_DIR} -bundle-non-qt-libs -exclude-libs='libnss3.so,libnssutil3.so' -unsupported-allow-new-glibc -no-copy-copyright-files -verbose=1 -extra-plugins=iconengines,platformthemes/libqgtk3.so -appimage]")
execute_process(COMMAND ${LINUX_DEPLOY_PATH} ${PROJECT_BIN_PATH} -qmldir=${PROJECT_QML_DIR} -bundle-non-qt-libs -exclude-libs='libnss3.so,libnssutil3.so' -unsupported-allow-new-glibc -no-copy-copyright-files -verbose=1 -extra-plugins=iconengines,platformthemes/libqgtk3.so -appimage
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
ECHO_OUTPUT_VARIABLE
ECHO_ERROR_VARIABLE)

message(STATUS "Renaming ${CMAKE_SOURCE_DIR}/${DEX_PROJECT_NAME}-${VERSION_ID}-x86_64.AppImage to ${CMAKE_SOURCE_DIR}/${DEX_PROJECT_NAME}-linux-${VERSION_ID}-x86_64.AppImage")
file(RENAME ${CMAKE_SOURCE_DIR}/${DEX_PROJECT_NAME}-${VERSION_ID}-x86_64.AppImage ${CMAKE_SOURCE_DIR}/${DEX_PROJECT_NAME}-linux-${VERSION_ID}-x86_64.AppImage)

message(STATUS "Copying ${PROJECT_APP_PATH} to ${TARGET_APP_PATH}/${PROJECT_APP_DIR}")
file(COPY ${PROJECT_APP_PATH} DESTINATION ${TARGET_APP_PATH})
execute_process(COMMAND zip -r ${DEX_PROJECT_NAME}-linux-${VERSION_ID}.zip AntaraAtomicDexAppDir
WORKING_DIRECTORY ${TARGET_APP_PATH}
ECHO_OUTPUT_VARIABLE
ECHO_ERROR_VARIABLE)

execute_process(COMMAND tar --zstd -cf ${DEX_PROJECT_NAME}-linux-${VERSION_ID}.tar.zst AntaraAtomicDexAppDir
WORKING_DIRECTORY ${TARGET_APP_PATH}
ECHO_OUTPUT_VARIABLE
ECHO_ERROR_VARIABLE)
file(COPY ${CMAKE_SOURCE_DIR}/${DEX_PROJECT_NAME}-${VERSION_ID}-x86_64.AppImage DESTINATION ${TARGET_APP_PATH})

file(COPY ${CMAKE_SOURCE_DIR}/${DEX_PROJECT_NAME}-linux-${VERSION_ID}-x86_64.AppImage DESTINATION ${TARGET_APP_PATH})
55 changes: 31 additions & 24 deletions cmake/install/macos/osx_post_install.cmake
Original file line number Diff line number Diff line change
@@ -1,38 +1,43 @@
include(${CMAKE_CURRENT_LIST_DIR}/../../project.metadata.cmake)

message(STATUS "OSX POST INSTALL CMAKE")
message(STATUS "PROJECT_ROOT_DIR (before readjusting) -> ${PROJECT_ROOT_DIR}")

get_filename_component(PROJECT_ROOT_DIR ${CMAKE_SOURCE_DIR} DIRECTORY)
if (EXISTS ${PROJECT_ROOT_DIR}/build-Release OR EXISTS ${PROJECT_ROOT_DIR}/build-Debug)
message(STATUS "from ci tools, readjusting")
get_filename_component(PROJECT_ROOT_DIR ${PROJECT_ROOT_DIR} DIRECTORY)
endif ()

message(STATUS "PROJECT_ROOT_DIR -> ${PROJECT_ROOT_DIR}")
set(PROJECT_QML_DIR ${PROJECT_ROOT_DIR}/atomic_defi_design/Dex)
message(STATUS "PROJECT_QML_DIR -> ${PROJECT_QML_DIR}")
message(STATUS "bin dir -> ${CMAKE_CURRENT_SOURCE_DIR}/bin")
set(BIN_DIR ${CMAKE_CURRENT_SOURCE_DIR}/bin)
set(TARGET_APP_PATH ${PROJECT_ROOT_DIR}/bundled/osx/)
set(PROJECT_APP_DIR ${DEX_PROJECT_NAME}.app)
set(PROJECT_APP_PATH ${CMAKE_SOURCE_DIR}/bin/${PROJECT_APP_DIR})
if (EXISTS ${PROJECT_APP_PATH})
message(STATUS "PROJECT_APP_PATH path is -> ${PROJECT_APP_PATH}")
else ()
message(FATAL_ERROR "Didn't find PROJECT_APP_PATH -> ${PROJECT_APP_PATH}")
endif ()

set(PROJECT_APP_PATH ${BIN_DIR}/${PROJECT_APP_DIR})
set(PROJECT_QML_DIR ${PROJECT_ROOT_DIR}/atomic_defi_design/Dex)
set(MAC_DEPLOY_PATH $ENV{QT_ROOT}/clang_64/bin/macdeployqt)

message(STATUS "VCPKG package manager enabled")
message(STATUS "QT_ROOT -> ${QT_ROOT}")
message(STATUS "BIN_DIR -> ${BIN_DIR}")
message(STATUS "TARGET_APP_PATH -> ${TARGET_APP_PATH}")
message(STATUS "PROJECT_APP_DIR -> ${PROJECT_APP_DIR}")
message(STATUS "PROJECT_QML_DIR -> ${PROJECT_QML_DIR}")
message(STATUS "PROJECT_ROOT_DIR (after readjusting) -> ${PROJECT_ROOT_DIR}")

message(STATUS "Using QT tools from $HOME/QT")
set(MAC_DEPLOY_PATH $ENV{QT_ROOT}/clang_64/bin/macdeployqt)
if (EXISTS ${PROJECT_APP_PATH})
message(STATUS "PROJECT_APP_PATH -> ${PROJECT_APP_PATH}")
else ()
message(FATAL_ERROR "Didn't find PROJECT_APP_PATH")
endif ()

if (EXISTS ${MAC_DEPLOY_PATH})
message(STATUS "macdeployqt path is -> ${MAC_DEPLOY_PATH}")
message(STATUS "MAC_DEPLOY_PATH -> ${MAC_DEPLOY_PATH}")
else ()
message(FATAL_ERROR "Didn't find macdeployqt")
message(FATAL_ERROR "Didn't find MAC_DEPLOY_PATH")
endif ()

message(STATUS "CREATING DMG")
if (NOT EXISTS ${CMAKE_SOURCE_DIR}/bin/${DEX_PROJECT_NAME}.dmg)
##-------------------------------------------
message(STATUS "${MAC_DEPLOY_PATH} ${PROJECT_APP_PATH} -qmldir=${PROJECT_QML_DIR} -always-overwrite -sign-for-notarization=$ENV{MAC_SIGN_IDENTITY} -verbose=3")
execute_process(
COMMAND
Expand All @@ -41,9 +46,6 @@ if (NOT EXISTS ${CMAKE_SOURCE_DIR}/bin/${DEX_PROJECT_NAME}.dmg)
ECHO_OUTPUT_VARIABLE
ECHO_ERROR_VARIABLE
)
##-------------------------------------------

##-------------------------------------------
message(STATUS "Fixing QTWebengineProcess")
set(QTWEBENGINE_BUNDLED_PATH ${PROJECT_APP_PATH}/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess)
message(STATUS "Executing: [install_name_tool -add_rpath @executable_path/../../../../../../Frameworks ${QTWEBENGINE_BUNDLED_PATH}]")
Expand All @@ -68,7 +70,6 @@ if (NOT EXISTS ${CMAKE_SOURCE_DIR}/bin/${DEX_PROJECT_NAME}.dmg)
ECHO_OUTPUT_VARIABLE
ECHO_ERROR_VARIABLE)

##-------------------------------------------
message(STATUS "Packaging the DMG")
set(PACKAGER_PATH ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/dmg-packager/package.sh)
if (EXISTS ${PACKAGER_PATH})
Expand Down Expand Up @@ -97,23 +98,26 @@ endif ()

file(COPY ${CMAKE_SOURCE_DIR}/bin/${DEX_PROJECT_NAME}.dmg DESTINATION ${TARGET_APP_PATH})

get_filename_component(QT_ROOT_DIR $ENV{QT_ROOT} DIRECTORY)
get_filename_component(QT_ROOT_DIR $ENV{QT_ROOT} DIRECTORY)
set(IFW_BINDIR ${QT_ROOT_DIR}/Tools/QtInstallerFramework/4.4/bin)
message(STATUS "IFW_BIN PATH IS ${IFW_BINDIR}")
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${DEX_PROJECT_NAME}.7z)
execute_process(COMMAND ls WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
message(STATUS "Generating ${DEX_PROJECT_NAME}.7z with [${IFW_BINDIR}/archivegen ${DEX_PROJECT_NAME}.7z ${DEX_PROJECT_NAME}.app] from directory: ${CMAKE_CURRENT_SOURCE_DIR}/bin")
execute_process(COMMAND
${IFW_BINDIR}/archivegen ${DEX_PROJECT_NAME}.7z ${DEX_PROJECT_NAME}.app
${IFW_BINDIR}/archivegen ${DEX_PROJECT_NAME}.7z ${PROJECT_APP_PATH}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin
ECHO_OUTPUT_VARIABLE
ECHO_ERROR_VARIABLE)
else()
message(STATUS "${DEX_PROJECT_NAME}.7z already created - skipping")
endif()

message(STATUS "Copying ${CMAKE_CURRENT_SOURCE_DIR}/bin/${DEX_PROJECT_NAME}.7z TO ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/installer/osx/packages/com.komodoplatform.atomicdex/data")

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/bin/${DEX_PROJECT_NAME}.7z DESTINATION ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/installer/osx/packages/com.komodoplatform.atomicdex/data)

execute_process(COMMAND ${IFW_BINDIR}/binarycreator -c ./config/config.xml -p ./packages/ ${DEX_PROJECT_NAME}_installer -s $ENV{MAC_SIGN_IDENTITY}
execute_process(COMMAND ${IFW_BINDIR}/binarycreator -c ./config/config.xml -p ./packages/ ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/installer/osx/${DEX_PROJECT_NAME}_installer -s $ENV{MAC_SIGN_IDENTITY}
WORKING_DIRECTORY ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/installer/osx
ECHO_OUTPUT_VARIABLE
ECHO_ERROR_VARIABLE)
Expand All @@ -130,7 +134,10 @@ execute_process(COMMAND ${PROJECT_ROOT_DIR}/cmake/install/macos/macos_notarize.s

file(COPY ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/installer/osx/${DEX_PROJECT_NAME}_installer.app DESTINATION ${TARGET_APP_PATH})

execute_process(COMMAND ${IFW_BINDIR}/archivegen ${DEX_PROJECT_NAME}_installer.7z ${DEX_PROJECT_NAME}_installer.app

execute_process(COMMAND ${IFW_BINDIR}/archivegen ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/installer/osx/${DEX_PROJECT_NAME}_installer.7z ${DEX_PROJECT_NAME}_installer.app
WORKING_DIRECTORY ${TARGET_APP_PATH}
ECHO_OUTPUT_VARIABLE
ECHO_ERROR_VARIABLE)

file(COPY ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/installer/osx/${DEX_PROJECT_NAME}_installer.7z DESTINATION ${TARGET_APP_PATH})
10 changes: 7 additions & 3 deletions cmake/install/windows/windows_post_install.cmake
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
include(${CMAKE_CURRENT_LIST_DIR}/../../project.metadata.cmake)

message(STATUS "PROJECT_ROOT_DIR (before readjusting) -> ${PROJECT_ROOT_DIR}")

get_filename_component(PROJECT_ROOT_DIR ${CMAKE_SOURCE_DIR} DIRECTORY)
if (EXISTS ${PROJECT_ROOT_DIR}/build-Release)
if (EXISTS ${PROJECT_ROOT_DIR}/build-Release OR EXISTS ${PROJECT_ROOT_DIR}/build-Debug)
message(STATUS "from ci tools, readjusting")
get_filename_component(PROJECT_ROOT_DIR ${PROJECT_ROOT_DIR} DIRECTORY)
endif ()

message(STATUS "PROJECT_ROOT_DIR -> ${PROJECT_ROOT_DIR}")

set(PROJECT_APP_DIR bin)
set(PROJECT_APP_PATH ${CMAKE_SOURCE_DIR}/${PROJECT_APP_DIR})
set(TARGET_APP_PATH ${PROJECT_ROOT_DIR}/bundled/windows)

message(STATUS "VCPKG package manager enabled")
message(STATUS "PROJECT_ROOT_DIR (after readjusting) -> ${PROJECT_ROOT_DIR}")
message(STATUS "PROJECT_QML_DIR -> ${PROJECT_QML_DIR}")

if (EXISTS ${PROJECT_APP_PATH})
message(STATUS "PROJECT_APP_PATH path is -> ${PROJECT_APP_PATH}")
message(STATUS "TARGET_APP_PATH path is -> ${TARGET_APP_PATH}")
Expand Down
20 changes: 17 additions & 3 deletions cmake/project.metadata.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ if (APPLE)
else ()
set(DEX_APPDATA_FOLDER "atomic_qt")
endif ()
message(STATUS "APPDATA folder is ${DEX_APPDATA_FOLDER}")

if (UNIX AND NOT APPLE)
set(DEX_LINUX_APP_ID "dex.desktop")
endif ()
Expand All @@ -49,9 +47,25 @@ endif ()
if (DEFINED ENV{DEX_WEBSITE})
set(DEX_WEBSITE $ENV{DEX_WEBSITE})
endif ()
if (DEFINED ENV{PROJECT_ROOT})
set(PROJECT_ROOT $ENV{PROJECT_ROOT})
else ()
set(PROJECT_ROOT ${CMAKE_SOURCE_DIR})
endif ()


# Shows project metadata
message(STATUS "Project Metadata: ${DEX_PROJECT_NAME}.${DEX_DISPLAY_NAME}.${DEX_COMPANY}.${DEX_WEBSITE}")
message(STATUS "Project Metadata:")
message(STATUS "DEX_APPDATA_FOLDER --> ${DEX_APPDATA_FOLDER}")
message(STATUS "CMAKE_BUILD_TYPE --> ${CMAKE_BUILD_TYPE}")
message(STATUS "DEX_PROJECT_NAME --> ${DEX_PROJECT_NAME}")
message(STATUS "DEX_DISPLAY_NAME --> ${DEX_DISPLAY_NAME}")
message(STATUS "DEX_COMPANY --> ${DEX_COMPANY}")
message(STATUS "DEX_WEBSITE --> ${DEX_WEBSITE}")
message(STATUS "CMAKE_SOURCE_DIR --> ${CMAKE_SOURCE_DIR}")
message(STATUS "PROJECT_ROOT --> ${PROJECT_ROOT}")



# Generates files which need to be configured with custom variables from env/CMake.
macro(generate_dex_project_metafiles)
Expand Down
2 changes: 2 additions & 0 deletions src/core/atomicdex/data/dex/orders.and.swaps.data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ namespace atomic_dex

using t_filtering_infos = filtering_infos;

// todo: please change the logic of this and its usage in mm2 service and other places.
// not happy with the current implementation we can do better
struct orders_and_swaps
{
//! Registries
Expand Down
Loading