Page MenuHomePhabricator

No OneTemporary

diff --git a/cmake/modules/ImageHelper.cmake b/cmake/modules/ImageHelper.cmake
new file mode 100644
index 000000000..507b56852
--- /dev/null
+++ b/cmake/modules/ImageHelper.cmake
@@ -0,0 +1,74 @@
+# Facilities for image transformations
+include(DoOrFail)
+
+macro(convert_svg_to_png SVG PNG DPI)
+ find_program_or_fail(RSVG_CONVERT_EXECUTABLE rsvg-convert)
+
+ add_custom_command(
+ OUTPUT
+ "${PNG}"
+ COMMAND
+ "${RSVG_CONVERT_EXECUTABLE}"
+ -f png
+ -d "${DPI}"
+ -p "${DPI}"
+ "${SVG}"
+ -o "${PNG}"
+ MAIN_DEPENDENCY
+ "${SVG}"
+ )
+endmacro()
+
+macro(_convert_png_to_tiff_linux PNG TIFF)
+ # find_package(ImageMagick) does not search in the default bin
+ # directories and fails. This is a known bug from FindImageMagick:
+ # https://gitlab.kitware.com/cmake/cmake/issues/16179
+ # When the issue is solved the following can be uncommented:
+ # find_package(ImageMagick COMPONENTS convert REQUIRED CMAKE_FIND_ROOT_PATH_BOTH)
+ #
+ # For now, use find_program as a workaround.
+ find_program_or_fail(ImageMagick_convert_EXECUTABLE convert)
+
+ add_custom_command(
+ OUTPUT
+ "${TIFF}"
+ COMMAND
+ "${ImageMagick_convert_EXECUTABLE}"
+ "${PNG}"
+ "${TIFF}"
+ MAIN_DEPENDENCY
+ "${PNG}"
+ )
+endmacro()
+
+macro(convert_png_to_tiff PNG TIFF)
+ if(NOT CMAKE_CROSSCOMPILING AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ message(FATAL_ERROR "The PNG to TIFF conversion is only supported on Linux.")
+ else()
+ _convert_png_to_tiff_linux("${PNG}" "${TIFF}")
+ endif()
+endmacro()
+
+macro(_cat_multi_resolution_tiff_linux OUTPUT)
+ find_program_or_fail(TIFFCP_EXECUTABLE tiffcp)
+
+ add_custom_command(
+ OUTPUT
+ "${OUTPUT}"
+ COMMAND
+ "${TIFFCP_EXECUTABLE}"
+ -c none
+ ${ARGN}
+ "${OUTPUT}"
+ DEPENDS
+ ${ARGN}
+ )
+endmacro()
+
+macro(cat_multi_resolution_tiff OUTPUT)
+ if(NOT CMAKE_CROSSCOMPILING AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ message(FATAL_ERROR "The PNG to TIFF concatenation is only supported on Linux.")
+ else()
+ _cat_multi_resolution_tiff_linux("${OUTPUT}" ${ARGN})
+ endif()
+endmacro()
diff --git a/contrib/macdeploy/background.svg.cmake.in b/contrib/macdeploy/background.svg.cmake.in
new file mode 100644
index 000000000..7a7218163
--- /dev/null
+++ b/contrib/macdeploy/background.svg.cmake.in
@@ -0,0 +1,35 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="1000pt" height="640pt" viewBox="0 0 1000 640" preserveAspectRatio="xMidYMid meet">
+ <!-- kate: space-indent off;
+ Copyright (c) 2015 The Bitcoin Core developers
+ Copyright (c) 2019 The Bitcoin developers
+ Distributed under the MIT software license, see the accompanying
+ file COPYING or http://www.opensource.org/licenses/mit-license.php.
+ -->
+ <style type="text/css"><![CDATA[
+ text {
+ font-family: "Tuffy";
+ font-size: 86px;
+ fill: gray;
+ text-anchor: middle;
+ }
+ ]]></style>
+ <defs>
+ <linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="100%">
+ <stop offset="0%" style="stop-color:rgb(239,239,239);stop-opacity:1" />
+ <stop offset="33%" style="stop-color:rgb(239,239,239);stop-opacity:1" />
+ <stop offset="80%" style="stop-color:rgb(205,205,205);stop-opacity:1" />
+ <stop offset="100%" style="stop-color:rgb(204,204,204);stop-opacity:1" />
+ </linearGradient>
+ </defs>
+ <rect width="1000" height="640" style="fill:url(#gradient);stroke-width:0" />
+ <g transform="translate(500,0) scale(0.9, 1)">
+ <text x="0" y="114">${PACKAGE_NAME}</text>
+ </g>
+ <g transform="translate(0.000000,640.000000) scale(0.100000,-0.100000)"
+ fill="#000000" stroke="none">
+ <path d="M4995 3705 c-24 -23 -25 -29 -25 -165 l0 -140 -306 0 -306 0 -29 -29 c-29 -29 -29 -31 -29 -141 0 -110 0 -112 29 -141 l29 -29 306 0 306 0 0 -140 c0 -136 1 -142 25 -165 16 -17 35 -25 57 -25 29 0 72 32 306 226 180 149 274 233 278 250 13 53 -2 70 -278 299 -235 194 -277 225 -306 225 -22 0 -41 -8 -57 -25z" fixlter="url(#glow)"/>
+ </g>
+</svg>
diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt
index f3c0c870c..6e4bddaaa 100644
--- a/src/qt/CMakeLists.txt
+++ b/src/qt/CMakeLists.txt
@@ -1,425 +1,465 @@
# Copyright (c) 2018 The Bitcoin developers
project(bitcoin-qt)
# This ensure that AUTOMOC doesn't run on generated files.
cmake_policy(SET CMP0071 OLD)
include(BrewHelper)
find_brew_prefix(QT5_PREFIX qt5)
set(QT_REQUIRED_COMPONENTS Core Widgets Network Test)
find_package(Qt5 COMPONENTS ${QT_REQUIRED_COMPONENTS} REQUIRED HINTS "${QT5_PREFIX}")
# Localisation
add_subdirectory(locale)
add_custom_command(OUTPUT temp_bitcoin_locale.qrc
COMMAND cmake
ARGS
-E copy
"${CMAKE_CURRENT_SOURCE_DIR}/bitcoin_locale.qrc"
temp_bitcoin_locale.qrc
MAIN_DEPENDENCY bitcoin_locale.qrc
VERBATIM
)
add_custom_command(OUTPUT qrc_bitcoin_locale.cpp
COMMAND Qt5::rcc
ARGS
temp_bitcoin_locale.qrc
-name bitcoin_locale
-o qrc_bitcoin_locale.cpp
MAIN_DEPENDENCY temp_bitcoin_locale.qrc
DEPENDS locales
VERBATIM
)
# UI elements
# qt5_wrap_ui() generates the files in the CMAKE_CURRENT_BINARY_DIR. As there
# is no option to change the output directory, moving the files to the forms
# subdirectory requires to override the variable. It is reset to its actual
# value after the call so it does not impact the other sections of this
# CMakeLists.txt file.
set(SAVE_CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/forms")
qt5_wrap_ui(UI_GENERATED_HEADERS
forms/addressbookpage.ui
forms/askpassphrasedialog.ui
forms/coincontroldialog.ui
forms/editaddressdialog.ui
forms/helpmessagedialog.ui
forms/intro.ui
forms/modaloverlay.ui
forms/openuridialog.ui
forms/optionsdialog.ui
forms/overviewpage.ui
forms/receivecoinsdialog.ui
forms/receiverequestdialog.ui
forms/debugwindow.ui
forms/sendcoinsdialog.ui
forms/sendcoinsentry.ui
forms/signverifymessagedialog.ui
forms/transactiondescdialog.ui
)
set(CMAKE_CURRENT_BINARY_DIR ${SAVE_CMAKE_CURRENT_BINARY_DIR})
# Qt MOC
set(CMAKE_AUTOMOC ON)
# Handle qrc resources
qt5_add_resources(QRC_BITCOIN_CPP bitcoin.qrc)
# Do protobuf codegen
find_package(Protobuf REQUIRED)
protobuf_generate_cpp(PROTOBUF_SOURCES PROTOBUF_HEADERS paymentrequest.proto)
add_library(bitcoin-qt-base
bantablemodel.cpp
bitcoinaddressvalidator.cpp
bitcoinamountfield.cpp
bitcoingui.cpp
bitcoinunits.cpp
clientmodel.cpp
csvmodelwriter.cpp
guiutil.cpp
intro.cpp
modaloverlay.cpp
networkstyle.cpp
notificator.cpp
optionsdialog.cpp
optionsmodel.cpp
peertablemodel.cpp
platformstyle.cpp
qvalidatedlineedit.cpp
qvaluecombobox.cpp
rpcconsole.cpp
splashscreen.cpp
trafficgraphwidget.cpp
utilitydialog.cpp
# Handle ui files
${UI_GENERATED_HEADERS}
# Protobuf codegen
${PROTOBUF_HEADERS}
${PROTOBUF_SOURCES}
# Translations
${BITCOIN_QM_FILES}
# Handle qrc files
${QRC_BITCOIN_CPP}
qrc_bitcoin_locale.cpp
)
target_include_directories(bitcoin-qt-base PUBLIC ${Protobuf_INCLUDE_DIRS})
# Add the minimal integration plugin, and other plugins according to the target
# platform.
set(QT_PLUGIN_COMPONENTS QMinimalIntegrationPlugin)
set(QT_PLUGIN_PLATFORM_DEFINITIONS -DQT_QPA_PLATFORM_MINIMAL=1)
# Linux support
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
list(APPEND QT_PLUGIN_COMPONENTS QXcbIntegrationPlugin)
list(APPEND QT_PLUGIN_PLATFORM_DEFINITIONS -DQT_QPA_PLATFORM_XCB=1)
endif()
# Windows support
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
list(APPEND QT_PLUGIN_COMPONENTS QWindowsIntegrationPlugin)
list(APPEND QT_PLUGIN_PLATFORM_DEFINITIONS -DQT_QPA_PLATFORM_WINDOWS=1)
target_sources(bitcoin-qt-base PRIVATE winshutdownmonitor.cpp)
endif()
# OSX support
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
list(APPEND QT_PLUGIN_COMPONENTS QCocoaIntegrationPlugin)
list(APPEND QT_PLUGIN_PLATFORM_DEFINITIONS -DQT_QPA_PLATFORM_COCOA=1)
target_sources(bitcoin-qt-base PRIVATE
macdockiconhandler.mm
macnotificationhandler.mm
)
set_property(TARGET bitcoin-qt-base PROPERTY AUTOMOC_MOC_OPTIONS "-DQ_OS_MAC")
target_link_libraries(bitcoin-qt-base
"-framework Foundation"
"-framework ApplicationServices"
"-framework AppKit"
)
endif()
# Find out more about Qt. This is similar to
# http://code.qt.io/cgit/qt/qtwebkit.git/tree/Source/cmake/OptionsQt.cmake
get_target_property(QT_CORE_TYPE Qt5::Core TYPE)
if(QT_CORE_TYPE MATCHES STATIC)
set(QT_STATIC_BUILD ON)
endif()
# Determine the Qt libraries directory from the QT5::Core library location
get_target_property(QT_CORE_LIB_LOCATION Qt5::Core LOCATION)
get_filename_component(QT5_LIB_DIR "${QT_CORE_LIB_LOCATION}" DIRECTORY)
set(STATIC_DEPENDENCIES_CMAKE_FILE "${CMAKE_BINARY_DIR}/QtStaticDependencies.cmake")
if(EXISTS ${STATIC_DEPENDENCIES_CMAKE_FILE})
file(REMOVE ${STATIC_DEPENDENCIES_CMAKE_FILE})
endif()
set(CONVERT_PRL_PATH "${CONTRIB_PATH}/qt/convert-prl-libs-to-cmake.pl")
macro(CONVERT_PRL_LIBS_TO_CMAKE _qt_component)
if(TARGET Qt5::${_qt_component})
get_target_property(_lib_location Qt5::${_qt_component} LOCATION)
execute_process(COMMAND ${PERL_EXECUTABLE} "${CONVERT_PRL_PATH}"
--lib "${_lib_location}"
--qt_lib_install_dir "${QT5_LIB_DIR}"
--out "${STATIC_DEPENDENCIES_CMAKE_FILE}"
--component "${_qt_component}"
--compiler "${CMAKE_CXX_COMPILER_ID}"
)
endif()
endmacro()
if(QT_STATIC_BUILD)
list(APPEND QT_REQUIRED_COMPONENTS ${QT_PLUGIN_COMPONENTS})
foreach(qt_module ${QT_REQUIRED_COMPONENTS})
CONVERT_PRL_LIBS_TO_CMAKE(${qt_module})
endforeach()
# HACK: We must explicitly add LIB path of the Qt installation
# to correctly find qtpcre
link_directories("${QT5_LIB_DIR}")
# Now that we generated the dependencies, import them.
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${CONVERT_PRL_PATH}")
if(NOT EXISTS ${STATIC_DEPENDENCIES_CMAKE_FILE})
message(FATAL_ERROR "Unable to find ${STATIC_DEPENDENCIES_CMAKE_FILE}")
endif()
include(${STATIC_DEPENDENCIES_CMAKE_FILE})
list(REMOVE_DUPLICATES STATIC_LIB_DEPENDENCIES)
# According to Qt documentation (https://doc.qt.io/qt-5/plugins-howto.html):
# "Plugins can be linked statically into your application.
# If you build the static version of Qt, this is the only option for
# including Qt's predefined plugins."
# So if the Qt build is static, the plugins should also be static and we
# need to define QT_STATICPLUGIN to tell the code to import <QTPlugin>.
target_compile_definitions(bitcoin-qt-base PUBLIC -DQT_STATICPLUGIN=1)
# Add the platform plugin definition if required
# Setting this definition tells the code what is the target for Q_IMPORT_PLUGIN().
foreach(qt_platform_definition ${QT_PLUGIN_PLATFORM_DEFINITIONS})
target_compile_definitions(bitcoin-qt-base PUBLIC "${qt_platform_definition}")
endforeach()
# Link the required plugins
foreach(qt_plugin ${QT_PLUGIN_COMPONENTS})
target_link_libraries(bitcoin-qt-base Qt5::${qt_plugin})
endforeach()
endif()
target_link_libraries(bitcoin-qt-base
server
rpcclient
Qt5::Widgets
Qt5::Network
OpenSSL::SSL
${Protobuf_LIBRARIES}
)
# Wallet
if(BUILD_BITCOIN_WALLET)
# Automoc option.
set(AUTOMOC_MOC_OPTIONS -DENABLE_WALLET=1)
# Add wallet functionality to bitcoin-qt
target_sources(bitcoin-qt-base
PRIVATE
addressbookpage.cpp
addresstablemodel.cpp
askpassphrasedialog.cpp
coincontroldialog.cpp
coincontroltreewidget.cpp
editaddressdialog.cpp
openuridialog.cpp
overviewpage.cpp
paymentrequestplus.cpp
paymentserver.cpp
receivecoinsdialog.cpp
receiverequestdialog.cpp
recentrequeststablemodel.cpp
sendcoinsdialog.cpp
sendcoinsentry.cpp
signverifymessagedialog.cpp
transactiondesc.cpp
transactiondescdialog.cpp
transactionfilterproxy.cpp
transactionrecord.cpp
transactiontablemodel.cpp
transactionview.cpp
walletframe.cpp
walletmodel.cpp
walletmodeltransaction.cpp
walletview.cpp
)
target_link_libraries(bitcoin-qt-base wallet)
if(ENABLE_QRCODE)
target_include_directories(bitcoin-qt-base PUBLIC ${QRENCODE_INCLUDE_DIR})
target_link_libraries(bitcoin-qt-base ${QRENCODE_LIBRARY})
endif()
endif()
# The executable
add_executable(bitcoin-qt WIN32 bitcoin.cpp)
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
target_sources(bitcoin-qt PRIVATE res/bitcoin-qt-res.rc)
endif()
target_link_libraries(bitcoin-qt bitcoin-qt-base)
include(BinaryTest)
add_to_symbols_check(bitcoin-qt)
add_to_security_check(bitcoin-qt)
include(InstallationHelper)
install_target(bitcoin-qt)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(BITCOINQT_BUNDLE_ICON "res/icons/bitcoin.icns")
get_filename_component(BITCOINQT_BUNDLE_ICON_NAME
"${BITCOINQT_BUNDLE_ICON}"
NAME
)
set(INFO_PLIST_STRINGS_FILE "Base.lproj/InfoPlist.strings")
set(INFO_PLIST_STRINGS_PATH "${CMAKE_CURRENT_BINARY_DIR}/${INFO_PLIST_STRINGS_FILE}")
file(WRITE
"${INFO_PLIST_STRINGS_PATH}"
"{ CFBundleDisplayName = \"${PACKAGE_NAME}\"; CFBundleName = \"${PACKAGE_NAME}\"; }"
)
set(EMPTY_LPROJ_FILE "${CMAKE_CURRENT_BINARY_DIR}/empty.lproj")
file(TOUCH "${EMPTY_LPROJ_FILE}")
add_executable(BitcoinABC-Qt MACOSX_BUNDLE
bitcoin.cpp
"${BITCOINQT_BUNDLE_ICON}"
"${INFO_PLIST_STRINGS_PATH}"
"${EMPTY_LPROJ_FILE}"
)
target_link_libraries(BitcoinABC-Qt bitcoin-qt-base)
string(JOIN ";" BITCOINQT_BUNDLE_RESOURCES
"${BITCOINQT_BUNDLE_ICON}"
"${EMPTY_LPROJ_FILE}"
)
set_target_properties(BitcoinABC-Qt PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/share/qt/Info.plist.cmake.in"
MACOSX_BUNDLE_BUNDLE_NAME "BitcoinABC-Qt"
MACOSX_BUNDLE_BUNDLE_VERSION "${bitcoin-abc_VERSION}"
MACOSX_BUNDLE_GUI_IDENTIFIER "org.bitcoinabc.BitcoinABC-Qt"
MACOSX_BUNDLE_ICON_FILE "${BITCOINQT_BUNDLE_ICON_NAME}"
MACOSX_BUNDLE_INFO_STRING "${bitcoin-abc_VERSION}, Copyright © 2009-${COPYRIGHT_YEAR} ${COPYRIGHT_HOLDERS_FINAL}"
MACOSX_BUNDLE_LONG_VERSION_STRING "${bitcoin-abc_VERSION}"
MACOSX_BUNDLE_SHORT_VERSION_STRING "${bitcoin-abc_VERSION}"
RESOURCE "${BITCOINQT_BUNDLE_RESOURCES}"
)
# The InfoPlist.strings files should be located in a resource subdirectory.
# This is not supported by the RESOURCE property and require the use of the
# MACOSX_PACKAGE_LOCATION property instead. The RESOURCE documentation has
# an example demonstrating this behavior (see the appres.txt file):
# https://cmake.org/cmake/help/latest/prop_tgt/RESOURCE.html
set_source_files_properties(
"${INFO_PLIST_STRINGS_PATH}"
PROPERTIES
MACOSX_PACKAGE_LOCATION "Resources/${INFO_PLIST_STRINGS_FILE}"
)
include(DoOrFail)
find_program_or_fail(CMAKE_INSTALL_NAME_TOOL "install_name_tool")
find_program_or_fail(CMAKE_OTOOL "otool")
set(QT_INSTALLER_SUPPORTED_LANGUAGES
"da"
"de"
"es"
"hu"
"ru"
"uk"
"zh_CN"
"zh_TW"
)
string(JOIN "," QT_LOCALES ${QT_INSTALLER_SUPPORTED_LANGUAGES})
get_target_property(QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
execute_process(
COMMAND
"${QMAKE_EXECUTABLE}"
-query QT_INSTALL_TRANSLATIONS
OUTPUT_VARIABLE
QT_TRANSLATION_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
function(get_qt_translation_dir QT_TRANSLATION_DIR)
foreach(_locale ${ARGN})
find_path(_qt_translation_dir
"qt_${_locale}.qm"
HINTS
"${QT_TRANSLATION_DIR}"
PATH_SUFFIXES
"translations"
)
# Ensure that all the translation files are found, and are located
# in the same directory.
if(NOT _qt_translation_dir OR (_qt_translation_dir_previous AND (NOT _qt_translation_dir_previous STREQUAL _qt_translation_dir)))
return()
endif()
set(_qt_translation_dir_previous _qt_translation_dir)
endforeach()
set(QT_TRANSLATION_DIR ${_qt_translation_dir} PARENT_SCOPE)
endfunction()
get_qt_translation_dir(QT_TRANSLATION_DIR ${QT_INSTALLER_SUPPORTED_LANGUAGES})
if(NOT QT_TRANSLATION_DIR)
message(FATAL_ERROR "Qt translation files are not found")
endif()
set(MACDEPLOY_DIR "${CMAKE_SOURCE_DIR}/contrib/macdeploy")
set(MACDEPLOYQTPLUS "${MACDEPLOY_DIR}/macdeployqtplus")
set(DMG_DIST "${CMAKE_BINARY_DIR}/dist")
add_custom_command(
OUTPUT
"${DMG_DIST}"
COMMAND
"INSTALLNAMETOOL=${CMAKE_INSTALL_NAME_TOOL}"
"OTOOL=${CMAKE_OTOOL}"
"STRIP=${CMAKE_STRIP}"
"${PYTHON_EXECUTABLE}"
"${MACDEPLOYQTPLUS}"
"$<TARGET_BUNDLE_DIR:BitcoinABC-Qt>"
-translations-dir "${QT_TRANSLATION_DIR}"
-add-qt-tr "${QT_LOCALES}"
WORKING_DIRECTORY
"${CMAKE_BINARY_DIR}"
DEPENDS
BitcoinABC-Qt
)
- add_custom_target(osx-deploydir
+ # Building the DMG background image requires several steps:
+ # 1/ The SVG file must be edited to display the package name
+ # 2/ The SVG file should be transformed into a couple PNG files, on for
+ # low resolution screens and one for high resolution screens.
+ # 3/ The PNG files must be transformed into a multi-resolution TIFF file.
+ # The names are not set arbitrarily, they follow Apple's guidelines for
+ # resolution independent bitmap images (see `man tiffutil`).
+ set(BACKGROUND_SVG "background.svg")
+ configure_file(
+ "${CMAKE_SOURCE_DIR}/contrib/macdeploy/background.svg.cmake.in"
+ "${BACKGROUND_SVG}"
+ )
+
+ include(ImageHelper)
+ set(BACKGROUND_PNG_LOWRES "${CMAKE_CURRENT_BINARY_DIR}/background_temp.png")
+ set(BACKGROUND_PNG_HIRES "${CMAKE_CURRENT_BINARY_DIR}/background_temp@2x.png")
+ set(BACKGROUND_TIFF_LOWRES "${CMAKE_CURRENT_BINARY_DIR}/background_temp.tiff")
+ set(BACKGROUND_TIFF_HIRES "${CMAKE_CURRENT_BINARY_DIR}/background_temp@2x.tiff")
+ set(BACKGROUND_TIFF_NAME "background.tiff")
+ set(BACKGROUND_TIFF_MULTIRES "${CMAKE_BINARY_DIR}/${BACKGROUND_TIFF_NAME}")
+ convert_svg_to_png("${BACKGROUND_SVG}" "${BACKGROUND_PNG_LOWRES}" 36)
+ convert_svg_to_png("${BACKGROUND_SVG}" "${BACKGROUND_PNG_HIRES}" 72)
+ convert_png_to_tiff("${BACKGROUND_PNG_LOWRES}" "${BACKGROUND_TIFF_LOWRES}")
+ convert_png_to_tiff("${BACKGROUND_PNG_HIRES}" "${BACKGROUND_TIFF_HIRES}")
+ cat_multi_resolution_tiff("${BACKGROUND_TIFF_MULTIRES}" "${BACKGROUND_TIFF_LOWRES}" "${BACKGROUND_TIFF_HIRES}")
+
+ set(BACKGROUND_DIST_DIR "${DMG_DIST}/.background")
+ set(BACKGROUND_DIST_TIFF "${BACKGROUND_DIST_DIR}/${BACKGROUND_TIFF_NAME}")
+ add_custom_command(
+ OUTPUT
+ "${BACKGROUND_DIST_TIFF}"
+ COMMAND
+ ${CMAKE_COMMAND} -E make_directory "${BACKGROUND_DIST_DIR}"
+ COMMAND
+ ${CMAKE_COMMAND} -E copy "${BACKGROUND_TIFF_MULTIRES}" "${BACKGROUND_DIST_TIFF}"
DEPENDS
+ "${BACKGROUND_TIFF_MULTIRES}"
"${DMG_DIST}"
)
+
+ add_custom_target(osx-deploydir
+ DEPENDS
+ "${BACKGROUND_DIST_TIFF}"
+ )
endif()
# Test tests
add_subdirectory(test)

File Metadata

Mime Type
image/svg+xml
Expires
Tue, Nov 19, 02:31 (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4517254
Default Alt Text
(18 KB)

Event Timeline