forked from lthn/blockchain
Merge branch 'release'
This commit is contained in:
commit
01eef47487
9 changed files with 282 additions and 10 deletions
|
|
@ -69,6 +69,9 @@ if(TESTNET)
|
|||
add_definitions(-DTESTNET)
|
||||
endif()
|
||||
|
||||
set(OPENSSL_USE_STATIC_LIBS TRUE) # link statically
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
if(DISABLE_TOR)
|
||||
message("NOTICE: Building with disabled TOR support!")
|
||||
add_definitions(-DDISABLE_TOR)
|
||||
|
|
|
|||
42
resources/app_icon.svg
Normal file
42
resources/app_icon.svg
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_1397_4507)">
|
||||
<rect width="512" height="512" rx="115" fill="#0C0C3A"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M286.571 80H327.158C341.059 79.9997 352.756 79.9994 362.33 80.79C372.345 81.617 381.885 83.4143 390.946 88.0805C404.749 95.1883 415.972 106.53 423.005 120.48C427.622 129.638 429.4 139.279 430.218 149.4C431.001 159.076 431 170.897 431 184.947V223.852C431 237.902 431.001 249.723 430.218 259.399C429.4 269.521 427.622 279.162 423.005 288.32C415.972 302.269 404.749 313.611 390.946 320.719C381.885 325.385 372.345 327.182 362.33 328.009C352.756 328.8 341.059 328.8 327.157 328.799H205.955C197.442 328.799 189.759 323.637 186.465 315.703C183.171 307.769 184.908 298.613 190.872 292.473L290.961 189.435L321.127 219.364L256.325 286.076H326.311C341.283 286.076 351.24 286.059 358.888 285.428C366.288 284.817 369.646 283.738 371.755 282.652C377.603 279.64 382.358 274.835 385.338 268.924C386.413 266.792 387.48 263.4 388.085 255.92C388.71 248.191 388.726 238.128 388.726 222.997V185.802C388.726 170.671 388.71 160.608 388.085 152.879C387.48 145.4 386.413 142.007 385.338 139.875C382.358 133.965 377.603 129.159 371.755 126.147C369.646 125.061 366.288 123.982 358.888 123.371C351.24 122.74 341.283 122.723 326.311 122.723H287.425C272.289 122.723 262.215 122.74 254.483 123.381C246.996 124.003 243.611 125.1 241.495 126.199C235.611 129.257 230.846 134.132 227.893 140.115C226.831 142.267 225.787 145.701 225.263 153.275C224.723 161.096 224.829 171.276 225.013 186.572L225.225 204.139L182.955 204.66L182.733 186.231C182.561 172.024 182.416 160.078 183.092 150.298C183.799 140.074 185.485 130.322 190.064 121.045C197.034 106.924 208.28 95.4193 222.166 88.2041C231.289 83.4635 240.917 81.6404 251.024 80.8017C260.692 79.9994 272.513 79.9997 286.571 80Z" fill="url(#paint0_linear_1397_4507)"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M286.571 80H327.158C341.059 79.9997 352.756 79.9994 362.33 80.79C372.345 81.617 381.885 83.4143 390.946 88.0805C404.749 95.1883 415.972 106.53 423.005 120.48C427.622 129.638 429.4 139.279 430.218 149.4C431.001 159.076 431 170.897 431 184.947V223.852C431 237.902 431.001 249.723 430.218 259.399C429.4 269.521 427.622 279.162 423.005 288.32C415.972 302.269 404.749 313.611 390.946 320.719C381.885 325.385 372.345 327.182 362.33 328.009C352.756 328.8 341.059 328.8 327.157 328.799H205.955C197.442 328.799 189.759 323.637 186.465 315.703C183.171 307.769 184.908 298.613 190.872 292.473L290.961 189.435L321.127 219.364L256.325 286.076H326.311C341.283 286.076 351.24 286.059 358.888 285.428C366.288 284.817 369.646 283.738 371.755 282.652C377.603 279.64 382.358 274.835 385.338 268.924C386.413 266.792 387.48 263.4 388.085 255.92C388.71 248.191 388.726 238.128 388.726 222.997V185.802C388.726 170.671 388.71 160.608 388.085 152.879C387.48 145.4 386.413 142.007 385.338 139.875C382.358 133.965 377.603 129.159 371.755 126.147C369.646 125.061 366.288 123.982 358.888 123.371C351.24 122.74 341.283 122.723 326.311 122.723H287.425C272.289 122.723 262.215 122.74 254.483 123.381C246.996 124.003 243.611 125.1 241.495 126.199C235.611 129.257 230.846 134.132 227.893 140.115C226.831 142.267 225.787 145.701 225.263 153.275C224.723 161.096 224.829 171.276 225.013 186.572L225.225 204.139L182.955 204.66L182.733 186.231C182.561 172.024 182.416 160.078 183.092 150.298C183.799 140.074 185.485 130.322 190.064 121.045C197.034 106.924 208.28 95.4193 222.166 88.2041C231.289 83.4635 240.917 81.6404 251.024 80.8017C260.692 79.9994 272.513 79.9997 286.571 80Z" fill="url(#paint1_radial_1397_4507)"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M286.571 80H327.158C341.059 79.9997 352.756 79.9994 362.33 80.79C372.345 81.617 381.885 83.4143 390.946 88.0805C404.749 95.1883 415.972 106.53 423.005 120.48C427.622 129.638 429.4 139.279 430.218 149.4C431.001 159.076 431 170.897 431 184.947V223.852C431 237.902 431.001 249.723 430.218 259.399C429.4 269.521 427.622 279.162 423.005 288.32C415.972 302.269 404.749 313.611 390.946 320.719C381.885 325.385 372.345 327.182 362.33 328.009C352.756 328.8 341.059 328.8 327.157 328.799H205.955C197.442 328.799 189.759 323.637 186.465 315.703C183.171 307.769 184.908 298.613 190.872 292.473L290.961 189.435L321.127 219.364L256.325 286.076H326.311C341.283 286.076 351.24 286.059 358.888 285.428C366.288 284.817 369.646 283.738 371.755 282.652C377.603 279.64 382.358 274.835 385.338 268.924C386.413 266.792 387.48 263.4 388.085 255.92C388.71 248.191 388.726 238.128 388.726 222.997V185.802C388.726 170.671 388.71 160.608 388.085 152.879C387.48 145.4 386.413 142.007 385.338 139.875C382.358 133.965 377.603 129.159 371.755 126.147C369.646 125.061 366.288 123.982 358.888 123.371C351.24 122.74 341.283 122.723 326.311 122.723H287.425C272.289 122.723 262.215 122.74 254.483 123.381C246.996 124.003 243.611 125.1 241.495 126.199C235.611 129.257 230.846 134.132 227.893 140.115C226.831 142.267 225.787 145.701 225.263 153.275C224.723 161.096 224.829 171.276 225.013 186.572L225.225 204.139L182.955 204.66L182.733 186.231C182.561 172.024 182.416 160.078 183.092 150.298C183.799 140.074 185.485 130.322 190.064 121.045C197.034 106.924 208.28 95.4193 222.166 88.2041C231.289 83.4635 240.917 81.6404 251.024 80.8017C260.692 79.9994 272.513 79.9997 286.571 80Z" fill="url(#paint2_radial_1397_4507)"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M286.571 80H327.158C341.059 79.9997 352.756 79.9994 362.33 80.79C372.345 81.617 381.885 83.4143 390.946 88.0805C404.749 95.1883 415.972 106.53 423.005 120.48C427.622 129.638 429.4 139.279 430.218 149.4C431.001 159.076 431 170.897 431 184.947V223.852C431 237.902 431.001 249.723 430.218 259.399C429.4 269.521 427.622 279.162 423.005 288.32C415.972 302.269 404.749 313.611 390.946 320.719C381.885 325.385 372.345 327.182 362.33 328.009C352.756 328.8 341.059 328.8 327.157 328.799H205.955C197.442 328.799 189.759 323.637 186.465 315.703C183.171 307.769 184.908 298.613 190.872 292.473L290.961 189.435L321.127 219.364L256.325 286.076H326.311C341.283 286.076 351.24 286.059 358.888 285.428C366.288 284.817 369.646 283.738 371.755 282.652C377.603 279.64 382.358 274.835 385.338 268.924C386.413 266.792 387.48 263.4 388.085 255.92C388.71 248.191 388.726 238.128 388.726 222.997V185.802C388.726 170.671 388.71 160.608 388.085 152.879C387.48 145.4 386.413 142.007 385.338 139.875C382.358 133.965 377.603 129.159 371.755 126.147C369.646 125.061 366.288 123.982 358.888 123.371C351.24 122.74 341.283 122.723 326.311 122.723H287.425C272.289 122.723 262.215 122.74 254.483 123.381C246.996 124.003 243.611 125.1 241.495 126.199C235.611 129.257 230.846 134.132 227.893 140.115C226.831 142.267 225.787 145.701 225.263 153.275C224.723 161.096 224.829 171.276 225.013 186.572L225.225 204.139L182.955 204.66L182.733 186.231C182.561 172.024 182.416 160.078 183.092 150.298C183.799 140.074 185.485 130.322 190.064 121.045C197.034 106.924 208.28 95.4193 222.166 88.2041C231.289 83.4635 240.917 81.6404 251.024 80.8017C260.692 79.9994 272.513 79.9997 286.571 80Z" fill="url(#paint3_radial_1397_4507)"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M153.112 388.466C160.76 389.098 170.717 389.114 185.689 389.114H225.228C238.879 389.114 247.959 389.1 254.952 388.573C261.73 388.061 264.838 387.156 266.785 386.253C273.548 383.118 278.974 377.634 282.077 370.799C282.97 368.831 283.866 365.69 284.372 358.84C284.894 351.772 284.908 342.596 284.908 328.799H327.181L327.182 329.579C327.182 342.391 327.182 353.172 326.528 362.021C325.845 371.266 324.364 380.102 320.5 388.612C313.178 404.744 300.373 417.685 284.411 425.085C275.99 428.989 267.248 430.487 258.099 431.177C249.344 431.838 238.677 431.838 225.999 431.837L184.842 431.837C170.94 431.838 159.244 431.838 149.67 431.047C139.655 430.22 130.115 428.423 121.054 423.757C107.251 416.649 96.0284 405.308 88.9954 391.358C84.3783 382.2 82.5999 372.559 81.7816 362.437C80.9994 352.761 80.9997 340.94 81 326.89V287.985C80.9997 273.935 80.9994 262.115 81.7816 252.438C82.5999 242.317 84.3783 232.676 88.9954 223.518C96.0284 209.568 107.251 198.226 121.054 191.119C130.115 186.452 139.655 184.655 149.67 183.828C159.244 183.038 170.941 183.038 184.843 183.038H306.045C317.718 183.038 327.181 192.602 327.181 204.4C327.181 216.197 317.718 225.761 306.045 225.761H185.689C170.717 225.761 160.76 225.778 153.112 226.409C145.712 227.02 142.354 228.099 140.245 229.185C134.397 232.197 129.642 237.003 126.661 242.914C125.587 245.045 124.519 248.438 123.915 255.917C123.29 263.646 123.274 273.71 123.274 288.841V326.035C123.274 341.166 123.29 351.229 123.915 358.958C124.519 366.438 125.587 369.831 126.661 371.962C129.642 377.873 134.397 382.679 140.245 385.69C142.354 386.776 145.712 387.855 153.112 388.466Z" fill="url(#paint4_linear_1397_4507)"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M153.112 388.466C160.76 389.098 170.717 389.114 185.689 389.114H225.228C238.879 389.114 247.959 389.1 254.952 388.573C261.73 388.061 264.838 387.156 266.785 386.253C273.548 383.118 278.974 377.634 282.077 370.799C282.97 368.831 283.866 365.69 284.372 358.84C284.894 351.772 284.908 342.596 284.908 328.799H327.181L327.182 329.579C327.182 342.391 327.182 353.172 326.528 362.021C325.845 371.266 324.364 380.102 320.5 388.612C313.178 404.744 300.373 417.685 284.411 425.085C275.99 428.989 267.248 430.487 258.099 431.177C249.344 431.838 238.677 431.838 225.999 431.837L184.842 431.837C170.94 431.838 159.244 431.838 149.67 431.047C139.655 430.22 130.115 428.423 121.054 423.757C107.251 416.649 96.0284 405.308 88.9954 391.358C84.3783 382.2 82.5999 372.559 81.7816 362.437C80.9994 352.761 80.9997 340.94 81 326.89V287.985C80.9997 273.935 80.9994 262.115 81.7816 252.438C82.5999 242.317 84.3783 232.676 88.9954 223.518C96.0284 209.568 107.251 198.226 121.054 191.119C130.115 186.452 139.655 184.655 149.67 183.828C159.244 183.038 170.941 183.038 184.843 183.038H306.045C317.718 183.038 327.181 192.602 327.181 204.4C327.181 216.197 317.718 225.761 306.045 225.761H185.689C170.717 225.761 160.76 225.778 153.112 226.409C145.712 227.02 142.354 228.099 140.245 229.185C134.397 232.197 129.642 237.003 126.661 242.914C125.587 245.045 124.519 248.438 123.915 255.917C123.29 263.646 123.274 273.71 123.274 288.841V326.035C123.274 341.166 123.29 351.229 123.915 358.958C124.519 366.438 125.587 369.831 126.661 371.962C129.642 377.873 134.397 382.679 140.245 385.69C142.354 386.776 145.712 387.855 153.112 388.466Z" fill="url(#paint5_radial_1397_4507)"/>
|
||||
</g>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_1397_4507" x1="247.767" y1="326.867" x2="250.596" y2="79.6832" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0.43118" stop-color="#498FFD"/>
|
||||
<stop offset="1" stop-color="#16D1D6"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint1_radial_1397_4507" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(179.657 155.329) rotate(-15.5725) scale(159.744 159.494)">
|
||||
<stop stop-color="#18CFD7"/>
|
||||
<stop offset="1" stop-color="#18CFD7" stop-opacity="0"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="paint2_radial_1397_4507" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(272.994 225.963) rotate(152.354) scale(59.8025 59.7092)">
|
||||
<stop stop-color="#4990FE"/>
|
||||
<stop offset="0.353962" stop-color="#4990FE"/>
|
||||
<stop offset="1" stop-color="#4990FE" stop-opacity="0"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="paint3_radial_1397_4507" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(199.838 306.686) rotate(-45.9392) scale(108.824 108.654)">
|
||||
<stop stop-color="#4990FE"/>
|
||||
<stop offset="0.405688" stop-color="#4990FE"/>
|
||||
<stop offset="1" stop-color="#4990FE" stop-opacity="0"/>
|
||||
</radialGradient>
|
||||
<linearGradient id="paint4_linear_1397_4507" x1="328.491" y1="432.817" x2="329.401" y2="180.559" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#2950FF"/>
|
||||
<stop offset="0.821717" stop-color="#498FFD"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint5_radial_1397_4507" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(328.491 326.867) rotate(129.289) scale(107.559 106.428)">
|
||||
<stop offset="0.337169" stop-color="#2950FF"/>
|
||||
<stop offset="0.792226" stop-color="#2950FF" stop-opacity="0"/>
|
||||
</radialGradient>
|
||||
<clipPath id="clip0_1397_4507">
|
||||
<rect width="512" height="512" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 12 KiB |
BIN
resources/app_icon_256.png
Normal file
BIN
resources/app_icon_256.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.6 KiB |
|
|
@ -8,6 +8,6 @@
|
|||
#define PROJECT_REVISION "0"
|
||||
#define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION
|
||||
|
||||
#define PROJECT_VERSION_BUILD_NO 143
|
||||
#define PROJECT_VERSION_BUILD_NO 144
|
||||
#define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO)
|
||||
#define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]"
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@
|
|||
|
||||
const command_line::arg_descriptor<bool> arg_alloc_win_console ( "alloc-win-console", "Allocates debug console with GUI", false );
|
||||
const command_line::arg_descriptor<std::string> arg_html_folder ( "html-path", "Manually set GUI html folder path");
|
||||
const command_line::arg_descriptor<std::string> arg_xcode_stub ( "-NSDocumentRevisionsDebugMode", "Substitute for xcode bug");
|
||||
const command_line::arg_descriptor<bool> arg_enable_gui_debug_mode ( "gui-debug-mode", "Enable debug options in GUI");
|
||||
const command_line::arg_descriptor<uint32_t> arg_qt_remote_debugging_port ( "remote-debugging-port", "Specify port for Qt remote debugging");
|
||||
const command_line::arg_descriptor<std::string> arg_remote_node ( "remote-node", "Switch GUI to work with remote node instead of local daemon");
|
||||
|
|
@ -62,6 +61,9 @@ const command_line::arg_descriptor<bool> arg_disable_logs_init("disable-logs-ini
|
|||
const command_line::arg_descriptor<std::string> arg_qt_dev_tools ( "qt-dev-tools", "Enable main web page inspection with Chromium DevTools, <vertical|horizontal>[,scale], e.g. \"horizontal,1.3\"", "");
|
||||
const command_line::arg_descriptor<bool> arg_disable_price_fetch("gui-disable-price-fetch", "Disable price fetching in UI(for privacy matter)");
|
||||
|
||||
const command_line::arg_descriptor<std::string> arg_xcode_stub("-NSDocumentRevisionsDebugMode", "Substitute for xcode bug");
|
||||
const command_line::arg_descriptor<std::string> arg_sandbox_disable("no-sandbox", "Substitute for ubuntu/linux rendering problem");
|
||||
|
||||
wallets_manager::wallets_manager():m_pview(&m_view_stub),
|
||||
m_stop_singal_sent(false),
|
||||
#ifndef MOBILE_WALLET_BUILD
|
||||
|
|
@ -172,7 +174,9 @@ bool wallets_manager::init_command_line(int argc, char* argv[], std::string& fai
|
|||
command_line::add_arg(desc_cmd_sett, command_line::arg_log_level);
|
||||
command_line::add_arg(desc_cmd_sett, command_line::arg_console);
|
||||
command_line::add_arg(desc_cmd_only, command_line::arg_show_details);
|
||||
|
||||
command_line::add_arg(desc_cmd_sett, arg_alloc_win_console);
|
||||
command_line::add_arg(desc_cmd_sett, arg_sandbox_disable);
|
||||
command_line::add_arg(desc_cmd_sett, arg_html_folder);
|
||||
command_line::add_arg(desc_cmd_only, arg_xcode_stub);
|
||||
command_line::add_arg(desc_cmd_sett, arg_enable_gui_debug_mode);
|
||||
|
|
@ -331,12 +335,19 @@ bool wallets_manager::init(view::i_view* pview_handler)
|
|||
std::string path_to_html;
|
||||
if (!command_line::has_arg(m_vm, arg_html_folder))
|
||||
{
|
||||
LOG_PRINT_L0("Detecting APPDIR... ");
|
||||
#if defined(__unix__) || defined(__linux__)
|
||||
const char* env_p = std::getenv("APPDIR");
|
||||
LOG_PRINT_L0("APPDIR = " << (void*)env_p);
|
||||
if (env_p)
|
||||
{
|
||||
LOG_PRINT_L0("APPDIR: " << env_p);
|
||||
}
|
||||
if (env_p && std::strlen(env_p))
|
||||
{
|
||||
//app running inside AppImage
|
||||
path_to_html = std::string(env_p) + "usr/bin/html";
|
||||
LOG_PRINT_L0("APPDIR SET: " << env_p);
|
||||
path_to_html = std::string(env_p) + "/usr/bin/html";
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
|
|
|||
12
utils/Zano.desktop
Normal file
12
utils/Zano.desktop
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=Zano
|
||||
GenericName=Zano
|
||||
Comment=Privacy blockchain
|
||||
Icon=Zano
|
||||
Terminal=true
|
||||
Type=Application
|
||||
Categories=Qt;Utility;
|
||||
Name[en_US]=Zano
|
||||
MimeType=x-scheme-handler/zano;
|
||||
|
||||
44
utils/Zano_appimage_wrapper.sh
Executable file
44
utils/Zano_appimage_wrapper.sh
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash -x
|
||||
script_dir=$( dirname "$(readlink -f "$0")" )
|
||||
|
||||
out_dir=~/.local/share/applications
|
||||
out_file_name="${out_dir}/Zano.desktop"
|
||||
|
||||
export QTWEBENGINE_DISABLE_SANDBOX=1
|
||||
|
||||
call_app()
|
||||
{
|
||||
pushd $script_dir
|
||||
usr/bin/Zano "$@"
|
||||
popd
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
create_desktop_icon()
|
||||
{
|
||||
target_file_name=$1
|
||||
echo "Generating icon file: $target_file_name..."
|
||||
rm -f "${out_dir}/Zano.png"
|
||||
rm -f $target_file_name
|
||||
cp -Rv "${APPDIR}/usr/share/icons/hicolor/256x256/apps/Zano.png" "${out_dir}/Zano.png"
|
||||
echo [Desktop Entry] | tee -a $target_file_name > /dev/null
|
||||
echo Version=1.0 | tee -a $target_file_name > /dev/null
|
||||
echo Name=Zano | tee -a $target_file_name > /dev/null
|
||||
echo GenericName=Zano | tee -a $target_file_name > /dev/null
|
||||
echo Comment=Privacy blockchain | tee -a $target_file_name > /dev/null
|
||||
echo Icon=${out_dir}/Zano.png | tee -a $target_file_name > /dev/null
|
||||
echo Exec=$APPIMAGE --deeplink-params=%u | tee -a $target_file_name > /dev/null
|
||||
echo Terminal=true | tee -a $target_file_name > /dev/null
|
||||
echo Type=Application | tee -a $target_file_name > /dev/null
|
||||
echo "Categories=Qt;Utility;" | tee -a $target_file_name > /dev/null
|
||||
echo "MimeType=x-scheme-handler/zano;" | tee -a $target_file_name > /dev/null
|
||||
echo "StartupWMClass=Zano" | tee -a $target_file_name > /dev/null
|
||||
}
|
||||
|
||||
|
||||
create_desktop_icon $out_file_name
|
||||
|
||||
xdg-mime default Zano.desktop x-scheme-handler/zano
|
||||
|
||||
call_app "$@"
|
||||
159
utils/build_script_linux_appimage.sh
Executable file
159
utils/build_script_linux_appimage.sh
Executable file
|
|
@ -0,0 +1,159 @@
|
|||
#!/bin/bash -x
|
||||
|
||||
# Environment prerequisites:
|
||||
# 1) QT_PREFIX_PATH should be set to Qt libs folder
|
||||
# 2) BOOST_ROOT should be set to the root of Boost
|
||||
# 3) OPENSSL_ROOT_DIR should be set to the root of OpenSSL
|
||||
#
|
||||
# for example, place these lines to the end of your ~/.bashrc :
|
||||
#
|
||||
# export BOOST_ROOT=/home/user/boost_1_66_0
|
||||
# export QT_PREFIX_PATH=/home/user/Qt5.10.1/5.10.1/gcc_64
|
||||
# export OPENSSL_ROOT_DIR=/home/user/openssl
|
||||
# export LINUX_DEPLOY_QT=/home/user/QtDeployment.appimage
|
||||
# export LINUX_APPIMAGE_TOOL=/home/user/AppImageTool.appimage
|
||||
|
||||
|
||||
ARCHIVE_NAME_PREFIX=zano-linux-x64-
|
||||
|
||||
: "${BOOST_ROOT:?BOOST_ROOT should be set to the root of Boost, ex.: /home/user/boost_1_66_0}"
|
||||
: "${QT_PREFIX_PATH:?QT_PREFIX_PATH should be set to Qt libs folder, ex.: /home/user/Qt5.10.1/5.10.1/gcc_64}"
|
||||
: "${OPENSSL_ROOT_DIR:?OPENSSL_ROOT_DIR should be set to OpenSSL root folder, ex.: /home/user/openssl}"
|
||||
|
||||
if [ -n "$build_prefix" ]; then
|
||||
ARCHIVE_NAME_PREFIX=${ARCHIVE_NAME_PREFIX}${build_prefix}-
|
||||
build_prefix_label="$build_prefix "
|
||||
fi
|
||||
|
||||
if [ "$testnet" == true ]; then
|
||||
testnet_def="-D TESTNET=TRUE"
|
||||
testnet_label="testnet "
|
||||
ARCHIVE_NAME_PREFIX=${ARCHIVE_NAME_PREFIX}testnet-
|
||||
fi
|
||||
|
||||
if [ "$testnet" == true ] || [ -n "$qt_dev_tools" ]; then
|
||||
copy_qt_dev_tools=true
|
||||
copy_qt_dev_tools_label="devtools "
|
||||
ARCHIVE_NAME_PREFIX=${ARCHIVE_NAME_PREFIX}devtools-
|
||||
fi
|
||||
|
||||
|
||||
prj_root=$(pwd)
|
||||
|
||||
if [ "$1" == "skip_build" ]; then
|
||||
echo "Skipping build, only packing..."
|
||||
cd build/release;
|
||||
else
|
||||
echo "---------------- BUILDING PROJECT ----------------"
|
||||
echo "--------------------------------------------------"
|
||||
|
||||
echo "Building...."
|
||||
|
||||
rm -rf build; mkdir -p build/release;
|
||||
cd build/release;
|
||||
cmake $testnet_def -D STATIC=true -D ARCH=x86-64 -D BUILD_GUI=TRUE -D OPENSSL_ROOT_DIR="$OPENSSL_ROOT_DIR" -D CMAKE_PREFIX_PATH="$QT_PREFIX_PATH" -D CMAKE_BUILD_TYPE=Release ../..
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to run cmake"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make -j2 daemon simplewallet connectivity_tool
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to make!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make -j1 Zano
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to make!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
read version_str <<< $(./src/zanod --version | awk '/^Zano/ { print $2 }')
|
||||
version_str=${version_str}
|
||||
|
||||
read commit_str <<< $(./src/zanod --version | grep -m 1 -P -o "(?<=\[)[0-9a-f]{7}")
|
||||
commit_str=${commit_str}
|
||||
|
||||
echo $version_str
|
||||
echo $commit_str
|
||||
|
||||
|
||||
rm -rf Zano;
|
||||
mkdir -p Zano/usr/bin;
|
||||
mkdir -p Zano/usr/lib;
|
||||
mkdir -p Zano/usr/share/applications;
|
||||
mkdir -p Zano/usr/share/icons/hicolor/scalable/apps;
|
||||
mkdir -p Zano/usr/share/icons/hicolor/256x256/apps;
|
||||
|
||||
|
||||
rsync -a ../../src/gui/qt-daemon/layout/html ./Zano/usr/bin --exclude less --exclude package.json --exclude gulpfile.js
|
||||
|
||||
cp -Rv src/zanod src/Zano src/simplewallet src/connectivity_tool ./Zano/usr/bin
|
||||
cp -Rv ../../utils/Zano.desktop ./Zano/usr/share/applications/Zano.desktop
|
||||
cp -Rv ../../resources/app_icon.svg ./Zano/usr/share/icons/hicolor/scalable/apps/Zano.svg
|
||||
cp -Rv ../../resources/app_icon_256.png ./Zano/usr/share/icons/hicolor/256x256/apps/Zano.png
|
||||
|
||||
|
||||
echo "Exec=$prj_root/build/release/Zano/usr/bin/Zano" >> ./Zano/usr/share/applications/Zano.desktop
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to append deskyop file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$LINUX_DEPLOY_QT ./Zano/usr/share/applications/Zano.desktop -qmake=$QT_PREFIX_PATH/bin/qmake
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to run linuxqtdeployment"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -f $prj_root/build/release/Zano/AppRun
|
||||
cp -Rv ../../utils/Zano_appimage_wrapper.sh $prj_root/build/release/Zano/AppRun
|
||||
|
||||
package_filename=${ARCHIVE_NAME_PREFIX}${version_str}.AppImage
|
||||
|
||||
$LINUX_APPIMAGE_TOOL ./Zano ./$package_filename
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to run appimagetool"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
#pattern="*.AppImage"
|
||||
#files=( $pattern )
|
||||
#app_image_file=${files[0]}
|
||||
|
||||
|
||||
#mv ./$app_image_file ./$package_filename
|
||||
|
||||
echo "Build success"
|
||||
|
||||
if [ -z "$upload_build" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Uploading..."
|
||||
|
||||
scp $package_filename zano_build_server:/var/www/html/builds
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to upload to remote server"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
read checksum <<< $(sha256sum $package_filename | awk '/^/ { print $1 }' )
|
||||
|
||||
mail_msg="New ${build_prefix_label}${testnet_label}${copy_qt_dev_tools_label}build for linux-x64:<br>
|
||||
https://build.zano.org/builds/$package_filename<br>
|
||||
sha256: $checksum"
|
||||
|
||||
echo "$mail_msg"
|
||||
|
||||
echo "$mail_msg" | mail -s "Zano linux-x64 ${build_prefix_label}${testnet_label}${copy_qt_dev_tools_label}build $version_str" ${emails}
|
||||
|
||||
exit 0
|
||||
|
|
@ -168,13 +168,14 @@ IF %ERRORLEVEL% NEQ 0 (
|
|||
set installer_file=%ACHIVE_NAME_PREFIX%%version%-installer.exe
|
||||
set installer_path=%BUILDS_PATH%\builds\%installer_file%
|
||||
|
||||
@echo " SIGNING ...."
|
||||
|
||||
%ZANO_SIGN_CMD% %installer_path%
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
@echo "failed to sign installer"
|
||||
goto error
|
||||
)
|
||||
:: Signing temporary disable
|
||||
::@echo " SIGNING ...."
|
||||
::
|
||||
::%ZANO_SIGN_CMD% %installer_path%
|
||||
::IF %ERRORLEVEL% NEQ 0 (
|
||||
:: @echo "failed to sign installer"
|
||||
:: goto error
|
||||
::)
|
||||
|
||||
@echo " UPLOADING TO SERVER ...."
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue