Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorHannah von Reth <vonreth@kde.org>2020-01-22 14:51:01 +0300
committerHannah von Reth <vonreth@kde.org>2020-01-22 15:29:33 +0300
commit6ed418abd0c7259e181fcad4d59a6ee312cdec58 (patch)
treeef601e1bc421b37de11d6059e4f57295e1d3e581 /cmake
parentd0508e855b70ff8ac757790589ca72992560efd5 (diff)
Remove unused files
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/CheckCCompilerFlagSSP.cmake26
-rw-r--r--cmake/modules/CheckPrototypeDefinition.c.in29
-rw-r--r--cmake/modules/CheckPrototypeDefinition.cmake98
-rw-r--r--cmake/modules/DeployQt5.cmake381
-rw-r--r--cmake/modules/FindLibSSH.cmake96
-rw-r--r--cmake/modules/FindPackageVersionCheck.cmake72
-rw-r--r--cmake/modules/MacroAddCompileFlags.cmake21
-rw-r--r--cmake/modules/MacroAddLinkFlags.cmake20
-rw-r--r--cmake/modules/MacroEnsureOutOfSourceBuild.cmake17
-rw-r--r--cmake/modules/MacroLogFeature.cmake157
-rw-r--r--cmake/modules/MacroOptionalFindPackage.cmake47
-rw-r--r--cmake/modules/NSIS.InstallOptions.ini.in24
-rw-r--r--cmake/modules/NSIS.template.in871
-rw-r--r--cmake/modules/UseDoxygen.cmake131
14 files changed, 0 insertions, 1990 deletions
diff --git a/cmake/modules/CheckCCompilerFlagSSP.cmake b/cmake/modules/CheckCCompilerFlagSSP.cmake
deleted file mode 100644
index 2fe43954a..000000000
--- a/cmake/modules/CheckCCompilerFlagSSP.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-# - Check whether the C compiler supports a given flag in the
-# context of a stack checking compiler option.
-
-# CHECK_C_COMPILER_FLAG_SSP(FLAG VARIABLE)
-#
-# FLAG - the compiler flag
-# VARIABLE - variable to store the result
-#
-# This actually calls check_c_source_compiles.
-# See help for CheckCSourceCompiles for a listing of variables
-# that can modify the build.
-
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-include(CheckCSourceCompiles)
-
-function(CHECK_C_COMPILER_FLAG_SSP _FLAG _RESULT)
- set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
- set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
- check_c_source_compiles("int main(int argc, char **argv) { char buffer[256]; return buffer[argc]=0;}" ${_RESULT})
- set(CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
-endfunction(CHECK_C_COMPILER_FLAG_SSP)
diff --git a/cmake/modules/CheckPrototypeDefinition.c.in b/cmake/modules/CheckPrototypeDefinition.c.in
deleted file mode 100644
index a97344ac3..000000000
--- a/cmake/modules/CheckPrototypeDefinition.c.in
+++ /dev/null
@@ -1,29 +0,0 @@
-@CHECK_PROTOTYPE_DEFINITION_HEADER@
-
-static void cmakeRequireSymbol(int dummy, ...) {
- (void) dummy;
-}
-
-static void checkSymbol(void) {
-#ifndef @CHECK_PROTOTYPE_DEFINITION_SYMBOL@
- cmakeRequireSymbol(0, &@CHECK_PROTOTYPE_DEFINITION_SYMBOL@);
-#endif
-}
-
-@CHECK_PROTOTYPE_DEFINITION_PROTO@ {
- return @CHECK_PROTOTYPE_DEFINITION_RETURN@;
-}
-
-#ifdef __CLASSIC_C__
-int main() {
- int ac;
- char*av[];
-#else
-int main(int ac, char *av[]) {
-#endif
- checkSymbol();
- if (ac > 1000) {
- return *av[0];
- }
- return 0;
-}
diff --git a/cmake/modules/CheckPrototypeDefinition.cmake b/cmake/modules/CheckPrototypeDefinition.cmake
deleted file mode 100644
index 2342b3c4f..000000000
--- a/cmake/modules/CheckPrototypeDefinition.cmake
+++ /dev/null
@@ -1,98 +0,0 @@
-# - Check if the protoype we expect is correct.
-# check_prototype_definition(FUNCTION PROTOTYPE RETURN HEADER VARIABLE)
-# FUNCTION - The name of the function (used to check if prototype exists)
-# PROTOTYPE- The prototype to check.
-# RETURN - The return value of the function.
-# HEADER - The header files required.
-# VARIABLE - The variable to store the result.
-# Example:
-# check_prototype_definition(getpwent_r
-# "struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)"
-# "NULL"
-# "unistd.h;pwd.h"
-# SOLARIS_GETPWENT_R)
-# The following variables may be set before calling this macro to
-# modify the way the check is run:
-#
-# CMAKE_REQUIRED_FLAGS = string of compile command line flags
-# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
-# CMAKE_REQUIRED_INCLUDES = list of include directories
-# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
-
-#=============================================================================
-# Copyright 2005-2009 Kitware, Inc.
-# Copyright 2010-2011 Andreas Schneider <asn@cryptomilk.org>
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-#
-
-
-get_filename_component(__check_proto_def_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
-
-
-function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE)
-
- if ("${_VARIABLE}" MATCHES "^${_VARIABLE}$")
- set(CHECK_PROTOTYPE_DEFINITION_CONTENT "/* */\n")
-
- set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS})
- if (CMAKE_REQUIRED_LIBRARIES)
- set(CHECK_PROTOTYPE_DEFINITION_LIBS
- LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
- else()
- set(CHECK_PROTOTYPE_DEFINITION_LIBS)
- endif()
- if (CMAKE_REQUIRED_INCLUDES)
- set(CMAKE_SYMBOL_EXISTS_INCLUDES
- "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
- else()
- set(CMAKE_SYMBOL_EXISTS_INCLUDES)
- endif()
-
- foreach(_FILE ${_HEADER})
- set(CHECK_PROTOTYPE_DEFINITION_HEADER
- "${CHECK_PROTOTYPE_DEFINITION_HEADER}#include <${_FILE}>\n")
- endforeach()
-
- set(CHECK_PROTOTYPE_DEFINITION_SYMBOL ${_FUNCTION})
- set(CHECK_PROTOTYPE_DEFINITION_PROTO ${_PROTOTYPE})
- set(CHECK_PROTOTYPE_DEFINITION_RETURN ${_RETURN})
-
- configure_file("${__check_proto_def_dir}/CheckPrototypeDefinition.c.in"
- "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c" @ONLY)
-
- file(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c _SOURCE)
-
- try_compile(${_VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c
- COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
- ${CHECK_PROTOTYPE_DEFINITION_LIBS}
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CHECK_PROTOTYPE_DEFINITION_FLAGS}
- "${CMAKE_SYMBOL_EXISTS_INCLUDES}"
- OUTPUT_VARIABLE OUTPUT)
-
- if (${_VARIABLE})
- set(${_VARIABLE} 1 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
- message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - True")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} passed with the following output:\n"
- "${OUTPUT}\n\n")
- else ()
- message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - False")
- set(${_VARIABLE} 0 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} failed with the following output:\n"
- "${OUTPUT}\n\n${_SOURCE}\n\n")
- endif ()
- endif()
-
-endfunction()
diff --git a/cmake/modules/DeployQt5.cmake b/cmake/modules/DeployQt5.cmake
deleted file mode 100644
index b9e5d7029..000000000
--- a/cmake/modules/DeployQt5.cmake
+++ /dev/null
@@ -1,381 +0,0 @@
-# - Functions to help assemble a standalone Qt5 executable.
-# A collection of CMake utility functions useful for deploying
-# Qt5 executables.
-#
-# The following functions are provided by this module:
-# write_qt5_conf
-# resolve_qt5_paths
-# fixup_qt5_executable
-# install_qt5_plugin_path
-# install_qt5_plugin
-# install_qt5_executable
-# Requires CMake 2.6 or greater because it uses function and
-# PARENT_SCOPE. Also depends on BundleUtilities.cmake.
-#
-# WRITE_QT5_CONF(<qt_conf_dir> <qt_conf_contents>)
-# Writes a qt.conf file with the <qt_conf_contents> into <qt_conf_dir>.
-#
-# RESOLVE_QT5_PATHS(<paths_var> [<executable_path>])
-# Loop through <paths_var> list and if any don't exist resolve them
-# relative to the <executable_path> (if supplied) or the CMAKE_INSTALL_PREFIX.
-#
-# FIXUP_QT5_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf>])
-# Copies Qt plugins, writes a Qt configuration file (if needed) and fixes up a
-# Qt5 executable using BundleUtilities so it is standalone and can be
-# drag-and-drop copied to another machine as long as all of the system
-# libraries are compatible.
-#
-# <executable> should point to the executable to be fixed-up.
-#
-# <qtplugins> should contain a list of the names or paths of any Qt plugins
-# to be installed.
-#
-# <libs> will be passed to BundleUtilities and should be a list of any already
-# installed plugins, libraries or executables to also be fixed-up.
-#
-# <dirs> will be passed to BundleUtilities and should contain and directories
-# to be searched to find library dependencies.
-#
-# <plugins_dir> allows an custom plugins directory to be used.
-#
-# <request_qt_conf> will force a qt.conf file to be written even if not needed.
-#
-# INSTALL_QT5_PLUGIN_PATH(plugin executable copy installed_plugin_path_var <plugins_dir> <component> <configurations>)
-# Install (or copy) a resolved <plugin> to the default plugins directory
-# (or <plugins_dir>) relative to <executable> and store the result in
-# <installed_plugin_path_var>.
-#
-# If <copy> is set to TRUE then the plugins will be copied rather than
-# installed. This is to allow this module to be used at CMake time rather than
-# install time.
-#
-# If <component> is set then anything installed will use this COMPONENT.
-#
-# INSTALL_QT5_PLUGIN(plugin executable copy installed_plugin_path_var <plugins_dir> <component>)
-# Install (or copy) an unresolved <plugin> to the default plugins directory
-# (or <plugins_dir>) relative to <executable> and store the result in
-# <installed_plugin_path_var>. See documentation of INSTALL_QT5_PLUGIN_PATH.
-#
-# INSTALL_QT5_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf> <component>])
-# Installs Qt plugins, writes a Qt configuration file (if needed) and fixes up
-# a Qt5 executable using BundleUtilities so it is standalone and can be
-# drag-and-drop copied to another machine as long as all of the system
-# libraries are compatible. The executable will be fixed-up at install time.
-# <component> is the COMPONENT used for bundle fixup and plugin installation.
-# See documentation of FIXUP_QT5_BUNDLE.
-
-#=============================================================================
-# Copyright 2011 Mike McQuaid <m...@mikemcquaid.com>
-# Copyright 2013 Mihai Moldovan <io...@ionic.de>
-# CMake - Cross Platform Makefile Generator
-# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# * Neither the names of Kitware, Inc., the Insight Software Consortium,
-# nor the names of their contributors may be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# The functions defined in this file depend on the fixup_bundle function
-# (and others) found in BundleUtilities.cmake
-
-include(BundleUtilities)
-set(DeployQt5_cmake_dir "${CMAKE_CURRENT_LIST_DIR}")
-set(DeployQt5_apple_plugins_dir "PlugIns")
-
-function(write_qt5_conf qt_conf_dir qt_conf_contents)
- set(qt_conf_path "${qt_conf_dir}/qt.conf")
- message(STATUS "Writing ${qt_conf_path}")
- file(WRITE "${qt_conf_path}" "${qt_conf_contents}")
-endfunction()
-
-function(resolve_qt5_paths paths_var)
- set(executable_path ${ARGV1})
-
- set(paths_resolved)
- foreach(path ${${paths_var}})
- if(EXISTS "${path}")
- list(APPEND paths_resolved "${path}")
- else()
- if(${executable_path})
- list(APPEND paths_resolved
-"${executable_path}/${path}")
- else()
- list(APPEND paths_resolved
-"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${path}")
- endif()
- endif()
- endforeach()
- set(${paths_var} ${paths_resolved} PARENT_SCOPE)
-endfunction()
-
-function(fixup_qt5_executable executable)
- set(qtplugins ${ARGV1})
- set(libs ${ARGV2})
- set(dirs ${ARGV3})
- set(plugins_dir ${ARGV4})
- set(request_qt_conf ${ARGV5})
-
- message(STATUS "fixup_qt5_executable")
- message(STATUS " executable='${executable}'")
- message(STATUS " qtplugins='${qtplugins}'")
- message(STATUS " libs='${libs}'")
- message(STATUS " dirs='${dirs}'")
- message(STATUS " plugins_dir='${plugins_dir}'")
- message(STATUS " request_qt_conf='${request_qt_conf}'")
-
- if(QT_LIBRARY_DIR)
- list(APPEND dirs "${QT_LIBRARY_DIR}")
- endif()
- if(QT_BINARY_DIR)
- list(APPEND dirs "${QT_BINARY_DIR}")
- endif()
-
- if(APPLE)
- set(qt_conf_dir "${executable}/Contents/Resources")
- set(executable_path "${executable}")
- set(write_qt_conf TRUE)
- if(NOT plugins_dir)
- set(plugins_dir "${DeployQt5_apple_plugins_dir}")
- endif()
- else()
- get_filename_component(executable_path "${executable}" PATH)
- if(NOT executable_path)
- set(executable_path ".")
- endif()
- set(qt_conf_dir "${executable_path}")
- set(write_qt_conf ${request_qt_conf})
- endif()
-
- foreach(plugin ${qtplugins})
- set(installed_plugin_path "")
- install_qt5_plugin("${plugin}" "${executable}" 1
-installed_plugin_path)
- list(APPEND libs ${installed_plugin_path})
- endforeach()
-
- foreach(lib ${libs})
- if(NOT EXISTS "${lib}")
- message(FATAL_ERROR "Library does not exist: ${lib}")
- endif()
- endforeach()
-
- resolve_qt5_paths(libs "${executable_path}")
-
- if(write_qt_conf)
- set(qt_conf_contents "[Paths]\nPlugins = ${plugins_dir}")
- write_qt5_conf("${qt_conf_dir}" "${qt_conf_contents}")
- endif()
-
- fixup_bundle("${executable}" "${libs}" "${dirs}")
-endfunction()
-
-function(install_qt5_plugin_path plugin executable copy
-installed_plugin_path_var)
- set(plugins_dir ${ARGV4})
- set(component ${ARGV5})
- set(configurations ${ARGV6})
- if(EXISTS "${plugin}")
- if(APPLE)
- if(NOT plugins_dir)
- set(plugins_dir
-"${DeployQt5_apple_plugins_dir}")
- endif()
- set(plugins_path
-"${executable}/Contents/${plugins_dir}")
- else()
- get_filename_component(plugins_path "${executable}"
-PATH)
- if(NOT plugins_path)
- set(plugins_path ".")
- endif()
- if(plugins_dir)
- set(plugins_path
-"${plugins_path}/${plugins_dir}")
- endif()
- endif()
-
- set(plugin_group "")
-
- get_filename_component(plugin_path "${plugin}" PATH)
- get_filename_component(plugin_parent_path "${plugin_path}" PATH)
- get_filename_component(plugin_parent_dir_name
-"${plugin_parent_path}" NAME)
- get_filename_component(plugin_name "${plugin}" NAME)
- string(TOLOWER "${plugin_parent_dir_name}"
-plugin_parent_dir_name)
-
- if("${plugin_parent_dir_name}" STREQUAL "plugins")
- get_filename_component(plugin_group "${plugin_path}"
-NAME)
- set(${plugin_group_var} "${plugin_group}")
- endif()
- set(plugins_path "${plugins_path}/${plugin_group}")
-
- if(${copy})
- file(MAKE_DIRECTORY "${plugins_path}")
- file(COPY "${plugin}" DESTINATION "${plugins_path}")
- else()
- if(configurations AND (CMAKE_CONFIGURATION_TYPES OR
-CMAKE_BUILD_TYPE))
- set(configurations CONFIGURATIONS
-${configurations})
- else()
- unset(configurations)
- endif()
- install(FILES "${plugin}" DESTINATION "${plugins_path}"
-${configurations} ${component})
- endif()
- set(${installed_plugin_path_var}
-"${plugins_path}/${plugin_name}" PARENT_SCOPE)
- endif()
-endfunction()
-
-function(install_qt5_plugin plugin executable copy installed_plugin_path_var)
- set(plugins_dir ${ARGV4})
- set(component ${ARGV5})
- if(EXISTS "${plugin}")
- install_qt5_plugin_path("${plugin}" "${executable}" "${copy}"
-"${installed_plugin_path_var}" "${plugins_dir}" "${component}")
- else()
- #string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var)
- set(plugin_release)
- set(plugin_debug)
- set(plugin_tmp_path)
- set(plugin_find_path "${Qt5Core_DIR}/../../../plugins/")
- get_filename_component(plugin_find_path "${plugin_find_path}"
-REALPATH)
- set(plugin_find_release_filename "lib${plugin}.dylib")
- set(plugin_find_debug_filename "lib${plugin}_debug.dylib")
- file(GLOB_RECURSE pluginlist "${plugin_find_path}"
-"${plugin_find_path}/*/lib*.dylib")
- foreach(found_plugin ${pluginlist})
- get_filename_component(curname "${found_plugin}" NAME)
- if("${curname}" STREQUAL "${plugin_find_release_filename}")
- set(plugin_tmp_release_path "${found_plugin}")
- endif()
- if("${curname}" STREQUAL "${plugin_find_debug_filename}")
- set(plugin_tmp_debug_path "${found_plugin}")
- endif()
- endforeach()
-
- if((NOT DEFINED plugin_tmp_release_path OR NOT EXISTS
-"${plugin_tmp_release_path}") AND (NOT DEFINED plugin_tmp_debug_PATH OR NOT
-EXISTS "${plugin_tmp_debug_path}"))
- message(WARNING "Qt plugin \"${plugin}\" not recognized
-or found.")
- endif()
-
- if(EXISTS "${plugin_tmp_release_path}")
- set(plugin_release "${plugin_tmp_release_path}")
- elseif(EXISTS "${plugin_tmp_debug_path}")
- set(plugin_release "${plugin_tmp_debug_path}")
- endif()
-
- if(EXISTS "${plugin_tmp_debug_path}")
- set(plugin_debug "${plugin_tmp_debug_path}")
- elseif(EXISTS "${plugin_tmp_release_path}")
- set(plugin_debug "${plugin_tmp_release_path}")
- endif()
-
- if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- install_qt5_plugin_path("${plugin_release}"
-"${executable}" "${copy}" "${installed_plugin_path_var}_release"
-"${plugins_dir}" "${component}" "Release|RelWithDebInfo|MinSizeRel")
- install_qt5_plugin_path("${plugin_debug}"
-"${executable}" "${copy}" "${installed_plugin_path_var}_debug" "${plugins_dir}"
-"${component}" "Debug")
-
- if(CMAKE_BUILD_TYPE MATCHES "^Debug$")
- set(${installed_plugin_path_var}
-${${installed_plugin_path_var}_debug})
- else()
- set(${installed_plugin_path_var}
-${${installed_plugin_path_var}_release})
- endif()
- else()
- install_qt5_plugin_path("${plugin_release}"
-"${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}"
-"${component}")
- endif()
- endif()
- set(${installed_plugin_path_var} ${${installed_plugin_path_var}}
-PARENT_SCOPE)
-endfunction()
-
-function(install_qt5_executable executable)
- set(qtplugins ${ARGV1})
- set(libs ${ARGV2})
- set(dirs ${ARGV3})
- set(plugins_dir ${ARGV4})
- set(request_qt_conf ${ARGV5})
- set(component ${ARGV6})
- if(QT_LIBRARY_DIR)
- list(APPEND dirs "${QT_LIBRARY_DIR}")
- endif()
- if(QT_BINARY_DIR)
- list(APPEND dirs "${QT_BINARY_DIR}")
- endif()
- if(component)
- set(component COMPONENT ${component})
- else()
- unset(component)
- endif()
-
- get_filename_component(executable_absolute "${executable}" ABSOLUTE)
- if(EXISTS "${QT_QTCORE_LIBRARY_RELEASE}")
- gp_file_type("${executable_absolute}"
-"${QT_QTCORE_LIBRARY_RELEASE}" qtcore_type)
- elseif(EXISTS "${QT_QTCORE_LIBRARY_DEBUG}")
- gp_file_type("${executable_absolute}" "${QT_QTCORE_LIBRARY_DEBUG}"
-qtcore_type)
- endif()
- if(qtcore_type STREQUAL "system")
- set(qt_plugins_dir "")
- endif()
-
- if(QT_IS_STATIC)
- message(WARNING "Qt built statically: not installing plugins.")
- else()
- foreach(plugin ${qtplugins})
- message(STATUS "trying to install plugin ${plugin}")
- set(installed_plugin_paths "")
- install_qt5_plugin("${plugin}" "${executable}" 0
-installed_plugin_paths "${plugins_dir}" "${component}")
- list(APPEND libs ${installed_plugin_paths})
- endforeach()
- endif()
-
- resolve_qt5_paths(libs "")
-
- install(CODE
- "include(\"${DeployQt5_cmake_dir}/DeployQt5.cmake\")
- set(BU_CHMOD_BUNDLE_ITEMS TRUE)
- FIXUP_QT5_EXECUTABLE(\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${executable}\"
-\"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")"
- ${component}
- )
-endfunction()
diff --git a/cmake/modules/FindLibSSH.cmake b/cmake/modules/FindLibSSH.cmake
deleted file mode 100644
index 94dbf762b..000000000
--- a/cmake/modules/FindLibSSH.cmake
+++ /dev/null
@@ -1,96 +0,0 @@
-# - Try to find LibSSH
-# Once done this will define
-#
-# LIBSSH_FOUND - system has LibSSH
-# LIBSSH_INCLUDE_DIRS - the LibSSH include directory
-# LIBSSH_LIBRARIES - Link these to use LibSSH
-# LIBSSH_DEFINITIONS - Compiler switches required for using LibSSH
-#
-# Copyright (c) 2009 Andreas Schneider <asn@cryptomilk.org>
-#
-# Redistribution and use is allowed according to the terms of the New
-# BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-#
-
-if (LIBSSH_LIBRARIES AND LIBSSH_INCLUDE_DIRS)
- # in cache already
- set(LIBSSH_FOUND TRUE)
-else (LIBSSH_LIBRARIES AND LIBSSH_INCLUDE_DIRS)
-
- find_path(LIBSSH_INCLUDE_DIR
- NAMES
- libssh/libssh.h
- PATHS
- /usr/include
- /usr/local/include
- /opt/local/include
- /sw/include
- ${CMAKE_INCLUDE_PATH}
- ${CMAKE_INSTALL_PREFIX}/include
- )
-
- find_library(SSH_LIBRARY
- NAMES
- ssh
- libssh
- PATHS
- /usr/lib
- /usr/local/lib
- /opt/local/lib
- /sw/lib
- ${CMAKE_LIBRARY_PATH}
- ${CMAKE_INSTALL_PREFIX}/lib
- )
-
- if (LIBSSH_INCLUDE_DIR AND SSH_LIBRARY)
- set(SSH_FOUND TRUE)
- endif (LIBSSH_INCLUDE_DIR AND SSH_LIBRARY)
-
- set(LIBSSH_INCLUDE_DIRS
- ${LIBSSH_INCLUDE_DIR}
- )
-
- if (SSH_FOUND)
- set(LIBSSH_LIBRARIES
- ${LIBSSH_LIBRARIES}
- ${SSH_LIBRARY}
- )
-
- if (LibSSH_FIND_VERSION)
- file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_MAJOR
- REGEX "#define[ ]+LIBSSH_VERSION_MAJOR[ ]+[0-9]+")
- # Older versions of libssh like libssh-0.2 have LIBSSH_VERSION but not LIBSSH_VERSION_MAJOR
- if (LIBSSH_VERSION_MAJOR)
- string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_MAJOR ${LIBSSH_VERSION_MAJOR})
- file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_MINOR
- REGEX "#define[ ]+LIBSSH_VERSION_MINOR[ ]+[0-9]+")
- string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_MINOR ${LIBSSH_VERSION_MINOR})
- file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_PATCH
- REGEX "#define[ ]+LIBSSH_VERSION_MICRO[ ]+[0-9]+")
- string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_PATCH ${LIBSSH_VERSION_PATCH})
-
- set(LibSSH_VERSION ${LIBSSH_VERSION_MAJOR}.${LIBSSH_VERSION_MINOR}.${LIBSSH_VERSION_PATCH})
-
- include(FindPackageVersionCheck)
- find_package_version_check(LibSSH DEFAULT_MSG)
- else (LIBSSH_VERSION_MAJOR)
- message(STATUS "LIBSSH_VERSION_MAJOR not found in ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h, assuming libssh is too old")
- set(LIBSSH_FOUND FALSE)
- endif (LIBSSH_VERSION_MAJOR)
- endif (LibSSH_FIND_VERSION)
- endif (SSH_FOUND)
-
- # If the version is too old, but libs and includes are set,
- # find_package_handle_standard_args will set LIBSSH_FOUND to TRUE again,
- # so we need this if() here.
- if (LIBSSH_FOUND)
- include(FindPackageHandleStandardArgs)
- find_package_handle_standard_args(LibSSH DEFAULT_MSG LIBSSH_LIBRARIES LIBSSH_INCLUDE_DIRS)
- endif (LIBSSH_FOUND)
-
- # show the LIBSSH_INCLUDE_DIRS and LIBSSH_LIBRARIES variables only in the advanced view
- mark_as_advanced(LIBSSH_INCLUDE_DIRS LIBSSH_LIBRARIES)
-
-endif (LIBSSH_LIBRARIES AND LIBSSH_INCLUDE_DIRS)
-
diff --git a/cmake/modules/FindPackageVersionCheck.cmake b/cmake/modules/FindPackageVersionCheck.cmake
deleted file mode 100644
index 7c026f362..000000000
--- a/cmake/modules/FindPackageVersionCheck.cmake
+++ /dev/null
@@ -1,72 +0,0 @@
-# (c) 2014 Copyright ownCloud GmbH
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING* file.
-
-# FIND_PACKAGE_VERSION_CHECK(NAME (DEFAULT_MSG|"Custom failure message"))
-# This function is intended to be used in FindXXX.cmake modules files.
-# It handles NAME_FIND_VERSION and NAME_VERSION variables in a Module.
-#
-# Example:
-# find_package(LibSSH 0.3.2)
-#
-# # check for the version and set it
-# set(LibSSH_VERSION 0.3.0)
-# find_package_version_check(LibSSH DEFAULT_MSG)
-#
-#
-# Copyright (c) 2009 Andreas Schneider <asn@cryptomilk.org>
-#
-# Redistribution and use is allowed according to the terms of the New
-# BSD license.
-
-function(FIND_PACKAGE_VERSION_CHECK _NAME _FAIL_MSG)
- string(TOUPPER ${_NAME} _NAME_UPPER)
- set(_AGE "old")
-
- if(${_NAME}_FIND_VERSION_EXACT)
- if (${_NAME}_FIND_VERSION VERSION_EQUAL ${_NAME}_VERSION)
- # exact version found
- set(${_NAME_UPPER}_FOUND TRUE)
- else (${_NAME}_FIND_VERSION VERSION_EQUAL ${_NAME}_VERSION)
- # exect version not found
- set(${_NAME_UPPER}_FOUND FALSE)
- # check if newer or older
- if (${_NAME}_FIND_VERSION VERSION_LESS ${_NAME}_VERSION)
- set(_AGE "new")
- else (${_NAME}_FIND_VERSION VERSION_LESS ${_NAME}_VERSION)
- set(_AGE "old")
- endif (${_NAME}_FIND_VERSION VERSION_LESS ${_NAME}_VERSION)
- endif (${_NAME}_FIND_VERSION VERSION_EQUAL ${_NAME}_VERSION)
- else (${_NAME}_FIND_VERSION_EXACT)
- if (${_NAME}_FIND_VERSION)
- if (${_NAME}_VERSION VERSION_LESS ${_NAME}_FIND_VERSION)
- set(${_NAME_UPPER}_FOUND FALSE)
- set(_AGE "old")
- else (${_NAME}_VERSION VERSION_LESS ${_NAME}_FIND_VERSION)
- set(${_NAME_UPPER}_FOUND TRUE)
- endif (${_NAME}_VERSION VERSION_LESS ${_NAME}_FIND_VERSION)
- endif (${_NAME}_FIND_VERSION)
- endif(${_NAME}_FIND_VERSION_EXACT)
-
- if ("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
- if (${_NAME}_FIND_VERSION_EXACT)
- set(_FAIL_MESSAGE "The installed ${_NAME} version ${${_NAME}_VERSION} is too ${_AGE}, version ${${_NAME}_FIND_VERSION} is required.")
- else (${_NAME}_FIND_VERSION_EXACT)
- set(_FAIL_MESSAGE "The installed ${_NAME} version ${${_NAME}_VERSION} is too ${_AGE}, at least version ${${_NAME}_FIND_VERSION} is required.")
- endif (${_NAME}_FIND_VERSION_EXACT)
- else ("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
- set(_FAIL_MESSAGE "${_FAIL_MSG}")
- endif ("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
-
- if (NOT ${_NAME_UPPER}_FOUND)
- if (${_NAME}_FIND_REQUIRED)
- message(FATAL_ERROR "${_FAIL_MESSAGE}")
- else (${_NAME}_FIND_REQUIRED)
- if (NOT ${_NAME}_FIND_QUIETLY)
- message(STATUS "${_FAIL_MESSAGE}")
- endif (NOT ${_NAME}_FIND_QUIETLY)
- endif (${_NAME}_FIND_REQUIRED)
- endif (NOT ${_NAME_UPPER}_FOUND)
-
- set(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE)
-endfunction(FIND_PACKAGE_VERSION_CHECK)
diff --git a/cmake/modules/MacroAddCompileFlags.cmake b/cmake/modules/MacroAddCompileFlags.cmake
deleted file mode 100644
index 8c5129609..000000000
--- a/cmake/modules/MacroAddCompileFlags.cmake
+++ /dev/null
@@ -1,21 +0,0 @@
-# - MACRO_ADD_COMPILE_FLAGS(target_name flag1 ... flagN)
-
-# Copyright (c) 2006, Oswald Buddenhagen, <ossi@kde.org>
-# Copyright (c) 2006, Andreas Schneider, <asn@cryptomilk.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-macro (MACRO_ADD_COMPILE_FLAGS _target)
-
- get_target_property(_flags ${_target} COMPILE_FLAGS)
- if (_flags)
- set(_flags ${_flags} ${ARGN})
- else (_flags)
- set(_flags ${ARGN})
- endif (_flags)
-
- set_target_properties(${_target} PROPERTIES COMPILE_FLAGS ${_flags})
-
-endmacro (MACRO_ADD_COMPILE_FLAGS)
diff --git a/cmake/modules/MacroAddLinkFlags.cmake b/cmake/modules/MacroAddLinkFlags.cmake
deleted file mode 100644
index eaef15401..000000000
--- a/cmake/modules/MacroAddLinkFlags.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
-# - MACRO_ADD_LINK_FLAGS(target_name flag1 ... flagN)
-
-# Copyright (c) 2006, Oswald Buddenhagen, <ossi@kde.org>
-# Copyright (c) 2006, Andreas Schneider, <asn@cryptomilk.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-macro (MACRO_ADD_LINK_FLAGS _target)
-
- get_target_property(_flags ${_target} LINK_FLAGS)
- if (_flags)
- set(_flags "${_flags} ${ARGN}")
- else (_flags)
- set(_flags "${ARGN}")
- endif (_flags)
-
- set_target_properties(${_target} PROPERTIES LINK_FLAGS "${_flags}")
-
-endmacro (MACRO_ADD_LINK_FLAGS)
diff --git a/cmake/modules/MacroEnsureOutOfSourceBuild.cmake b/cmake/modules/MacroEnsureOutOfSourceBuild.cmake
deleted file mode 100644
index a2e948099..000000000
--- a/cmake/modules/MacroEnsureOutOfSourceBuild.cmake
+++ /dev/null
@@ -1,17 +0,0 @@
-# - MACRO_ENSURE_OUT_OF_SOURCE_BUILD(<errorMessage>)
-# MACRO_ENSURE_OUT_OF_SOURCE_BUILD(<errorMessage>)
-
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-macro (MACRO_ENSURE_OUT_OF_SOURCE_BUILD _errorMessage)
-
- string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" _insource)
- if (_insource)
- message(SEND_ERROR "${_errorMessage}")
- message(FATAL_ERROR "Remove the file CMakeCache.txt in ${CMAKE_SOURCE_DIR} first.")
- endif (_insource)
-
-endmacro (MACRO_ENSURE_OUT_OF_SOURCE_BUILD)
diff --git a/cmake/modules/MacroLogFeature.cmake b/cmake/modules/MacroLogFeature.cmake
deleted file mode 100644
index 45e27b6df..000000000
--- a/cmake/modules/MacroLogFeature.cmake
+++ /dev/null
@@ -1,157 +0,0 @@
-# This file defines the Feature Logging macros.
-#
-# MACRO_LOG_FEATURE(VAR FEATURE DESCRIPTION URL [REQUIRED [MIN_VERSION [COMMENTS]]])
-# Logs the information so that it can be displayed at the end
-# of the configure run
-# VAR : TRUE or FALSE, indicating whether the feature is supported
-# FEATURE: name of the feature, e.g. "libjpeg"
-# DESCRIPTION: description what this feature provides
-# URL: home page
-# REQUIRED: TRUE or FALSE, indicating whether the featue is required
-# MIN_VERSION: minimum version number. empty string if unneeded
-# COMMENTS: More info you may want to provide. empty string if unnecessary
-#
-# MACRO_DISPLAY_FEATURE_LOG()
-# Call this to display the collected results.
-# Exits CMake with a FATAL error message if a required feature is missing
-#
-# Example:
-#
-# INCLUDE(MacroLogFeature)
-#
-# FIND_PACKAGE(JPEG)
-# MACRO_LOG_FEATURE(JPEG_FOUND "libjpeg" "Support JPEG images" "http://www.ijg.org" TRUE "3.2a" "")
-# ...
-# MACRO_DISPLAY_FEATURE_LOG()
-
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
-# Copyright (c) 2006, Allen Winter, <winter@kde.org>
-# Copyright (c) 2009, Sebastian Trueg, <trueg@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-IF (NOT _macroLogFeatureAlreadyIncluded)
- SET(_file ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
- IF (EXISTS ${_file})
- FILE(REMOVE ${_file})
- ENDIF (EXISTS ${_file})
-
- SET(_file ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
- IF (EXISTS ${_file})
- FILE(REMOVE ${_file})
- ENDIF (EXISTS ${_file})
-
- SET(_file ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
- IF (EXISTS ${_file})
- FILE(REMOVE ${_file})
- ENDIF (EXISTS ${_file})
-
- SET(_macroLogFeatureAlreadyIncluded TRUE)
-
- INCLUDE(FeatureSummary)
-
-ENDIF (NOT _macroLogFeatureAlreadyIncluded)
-
-
-MACRO(MACRO_LOG_FEATURE _var _package _description _url ) # _required _minvers _comments)
-
- STRING(TOUPPER "${ARGV4}" _required)
- SET(_minvers "${ARGV5}")
- SET(_comments "${ARGV6}")
-
- IF (${_var})
- SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
- ELSE (${_var})
- IF ("${_required}" STREQUAL "TRUE")
- SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
- ELSE ("${_required}" STREQUAL "TRUE")
- SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
- ENDIF ("${_required}" STREQUAL "TRUE")
- ENDIF (${_var})
-
- SET(_logtext " * ${_package}")
-
- IF (NOT ${_var})
- IF (${_minvers} MATCHES ".*")
- SET(_logtext "${_logtext} (${_minvers} or higher)")
- ENDIF (${_minvers} MATCHES ".*")
- SET(_logtext "${_logtext} <${_url}>\n ")
- ELSE (NOT ${_var})
- SET(_logtext "${_logtext} - ")
- ENDIF (NOT ${_var})
-
- SET(_logtext "${_logtext}${_description}")
-
- IF (NOT ${_var})
- IF (${_comments} MATCHES ".*")
- SET(_logtext "${_logtext}\n ${_comments}")
- ENDIF (${_comments} MATCHES ".*")
-# SET(_logtext "${_logtext}\n") #double-space missing features?
- ENDIF (NOT ${_var})
-
- FILE(APPEND "${_LOGFILENAME}" "${_logtext}\n")
-
- IF(COMMAND SET_PACKAGE_INFO) # in FeatureSummary.cmake since CMake 2.8.3
- SET_PACKAGE_INFO("${_package}" "\"${_description}\"" "${_url}" "\"${_comments}\"")
- ENDIF(COMMAND SET_PACKAGE_INFO)
-
-ENDMACRO(MACRO_LOG_FEATURE)
-
-
-MACRO(MACRO_DISPLAY_FEATURE_LOG)
- IF(COMMAND FEATURE_SUMMARY) # in FeatureSummary.cmake since CMake 2.8.3
- FEATURE_SUMMARY(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/FindPackageLog.txt
- WHAT ALL)
- ENDIF(COMMAND FEATURE_SUMMARY)
-
- SET(_missingFile ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
- SET(_enabledFile ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
- SET(_disabledFile ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
-
- IF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile})
- SET(_printSummary TRUE)
- ENDIF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile})
-
- IF(_printSummary)
- SET(_missingDeps 0)
- IF (EXISTS ${_enabledFile})
- FILE(READ ${_enabledFile} _enabled)
- FILE(REMOVE ${_enabledFile})
- SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following external packages were located on your system.\n-- This installation will have the extra features provided by these packages.\n-----------------------------------------------------------------------------\n${_enabled}")
- ENDIF (EXISTS ${_enabledFile})
-
-
- IF (EXISTS ${_disabledFile})
- SET(_missingDeps 1)
- FILE(READ ${_disabledFile} _disabled)
- FILE(REMOVE ${_disabledFile})
- SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following OPTIONAL packages could NOT be located on your system.\n-- Consider installing them to enable more features from this software.\n-----------------------------------------------------------------------------\n${_disabled}")
- ENDIF (EXISTS ${_disabledFile})
-
-
- IF (EXISTS ${_missingFile})
- SET(_missingDeps 1)
- FILE(READ ${_missingFile} _requirements)
- SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following REQUIRED packages could NOT be located on your system.\n-- You must install these packages before continuing.\n-----------------------------------------------------------------------------\n${_requirements}")
- FILE(REMOVE ${_missingFile})
- SET(_haveMissingReq 1)
- ENDIF (EXISTS ${_missingFile})
-
-
- IF (NOT ${_missingDeps})
- SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- Congratulations! All external packages have been found.")
- ENDIF (NOT ${_missingDeps})
-
-
- MESSAGE(${_summary})
- MESSAGE("-----------------------------------------------------------------------------\n")
-
-
- IF(_haveMissingReq)
- MESSAGE(FATAL_ERROR "Exiting: Missing Requirements")
- ENDIF(_haveMissingReq)
-
- ENDIF(_printSummary)
-
-ENDMACRO(MACRO_DISPLAY_FEATURE_LOG)
diff --git a/cmake/modules/MacroOptionalFindPackage.cmake b/cmake/modules/MacroOptionalFindPackage.cmake
deleted file mode 100644
index a066bc781..000000000
--- a/cmake/modules/MacroOptionalFindPackage.cmake
+++ /dev/null
@@ -1,47 +0,0 @@
-# - MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION()
-# MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] )
-# This macro is a combination of OPTION() and FIND_PACKAGE(), it
-# works like FIND_PACKAGE(), but additionally it automatically creates
-# an option name WITH_<name>, which can be disabled via the cmake GUI.
-# or via -DWITH_<name>=OFF
-# The standard <name>_FOUND variables can be used in the same way
-# as when using the normal FIND_PACKAGE()
-
-# Copyright (c) 2006-2010 Alexander Neundorf, <neundorf@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-# This is just a helper macro to set a bunch of variables empty.
-# We don't know whether the package uses UPPERCASENAME or CamelCaseName, so we try both:
-macro(_MOFP_SET_EMPTY_IF_DEFINED _name _var)
- if(DEFINED ${_name}_${_var})
- set(${_name}_${_var} "")
- endif(DEFINED ${_name}_${_var})
-
- string(TOUPPER ${_name} _nameUpper)
- if(DEFINED ${_nameUpper}_${_var})
- set(${_nameUpper}_${_var} "")
- endif(DEFINED ${_nameUpper}_${_var})
-endmacro(_MOFP_SET_EMPTY_IF_DEFINED _package _var)
-
-
-macro (MACRO_OPTIONAL_FIND_PACKAGE _name )
- option(WITH_${_name} "Search for ${_name} package" ON)
- if (WITH_${_name})
- find_package(${_name} ${ARGN})
- else (WITH_${_name})
- string(TOUPPER ${_name} _nameUpper)
- set(${_name}_FOUND FALSE)
- set(${_nameUpper}_FOUND FALSE)
-
- _mofp_set_empty_if_defined(${_name} INCLUDE_DIRS)
- _mofp_set_empty_if_defined(${_name} INCLUDE_DIR)
- _mofp_set_empty_if_defined(${_name} INCLUDES)
- _mofp_set_empty_if_defined(${_name} LIBRARY)
- _mofp_set_empty_if_defined(${_name} LIBRARIES)
- _mofp_set_empty_if_defined(${_name} LIBS)
- _mofp_set_empty_if_defined(${_name} FLAGS)
- _mofp_set_empty_if_defined(${_name} DEFINITIONS)
- endif (WITH_${_name})
-endmacro (MACRO_OPTIONAL_FIND_PACKAGE)
diff --git a/cmake/modules/NSIS.InstallOptions.ini.in b/cmake/modules/NSIS.InstallOptions.ini.in
deleted file mode 100644
index 566c0b47d..000000000
--- a/cmake/modules/NSIS.InstallOptions.ini.in
+++ /dev/null
@@ -1,24 +0,0 @@
-[Settings]
-NumFields=3
-
-[Field 1]
-Type=Label
-Left=0
-Right=-1
-Top=0
-Bottom=24
-
-[Field 2]
-Type=RadioButton
-Left=30
-Right=-1
-Top=50
-Bottom=58
-State=1
-
-[Field 3]
-Type=RadioButton
-Left=30
-Right=-1
-Top=70
-Bottom=78
diff --git a/cmake/modules/NSIS.template.in b/cmake/modules/NSIS.template.in
deleted file mode 100644
index 3840b6f05..000000000
--- a/cmake/modules/NSIS.template.in
+++ /dev/null
@@ -1,871 +0,0 @@
-;ownCloud installer script.
-
-!define APPLICATION_SHORTNAME "@APPLICATION_EXECUTABLE@"
-!define APPLICATION_NAME "@APPLICATION_NAME@"
-!define APPLICATION_VENDOR "@APPLICATION_VENDOR@"
-!define APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@.exe"
-!define APPLICATION_CMD_EXECUTABLE "@APPLICATION_EXECUTABLE@cmd.exe"
-!define APPLICATION_DOMAIN "@APPLICATION_DOMAIN@"
-!define APPLICATION_LICENSE "@APPLICATION_LICENSE@"
-!define APPLICATION_VIRTUALFILE_SUFFIX "@APPLICATION_VIRTUALFILE_SUFFIX@"
-!define APPLICATION_VIRTUALFILE_FILECLASS "@APPLICATION_EXECUTABLE@.@APPLICATION_VIRTUALFILE_SUFFIX@"
-!define WIN_SETUP_BITMAP_PATH "@WIN_SETUP_BITMAP_PATH@"
-
-!define CRASHREPORTER_EXECUTABLE "@CRASHREPORTER_EXECUTABLE@"
-
-;-----------------------------------------------------------------------------
-; Some installer script options (comment-out options not required)
-;-----------------------------------------------------------------------------
-!if "@APPLICATION_LICENSE@" != ""
- !define OPTION_LICENSE_AGREEMENT
-!endif
-!define OPTION_UAC_PLUGIN_ENHANCED
-!define OPTION_SECTION_SC_SHELL_EXT
-!define OPTION_SECTION_SC_START_MENU
-!define OPTION_SECTION_SC_DESKTOP
-!define OPTION_SECTION_SC_QUICK_LAUNCH
-!define OPTION_FINISHPAGE
-!define OPTION_FINISHPAGE_LAUNCHER
-; !define OPTION_FINISHPAGE_RELEASE_NOTES
-
-;-----------------------------------------------------------------------------
-; Some paths.
-;-----------------------------------------------------------------------------
-!ifndef MING_PATH
- !define MING_PATH "/usr/i686-w64-mingw32/sys-root/mingw"
-!endif
-!define MING_BIN "${MING_PATH}/bin"
-!define MING_LIB "${MING_PATH}/lib"
-!define MING_SHARE "${MING_PATH}/share"
-!define BUILD_PATH "@CMAKE_BINARY_DIR@"
-!define SOURCE_PATH "@CMAKE_SOURCE_DIR@"
-!define QT_DLL_PATH "${MING_BIN}"
-!define ACCESSIBLE_DLL_PATH "${MING_LIB}/qt5/plugins/accessible"
-!define IMAGEFORMATS_DLL_PATH "${MING_LIB}/qt5/plugins/imageformats"
-!define PLATFORMS_DLL_PATH "${MING_LIB}/qt5/plugins/platforms"
-
-!define CSYNC_LIBRARY_DIR "@CSYNC_LIBRARY_DIR@"
-!define CSYNC_CONFIG_DIR "@CSYNC_CONFIG_DIR@"
-
-!define NSI_PATH "${source_path}/admin/win/nsi"
-
-;-----------------------------------------------------------------------------
-; Installer version
-;-----------------------------------------------------------------------------
-
-!define VER_MAJOR "@CPACK_PACKAGE_VERSION_MAJOR@"
-!define VER_MINOR "@CPACK_PACKAGE_VERSION_MINOR@"
-!define VER_PATCH "@CPACK_PACKAGE_VERSION_PATCH@"
-!define VER_BUILD "@CPACK_PACKAGE_VERSION_BUILD@"
-!define VERSION "@CPACK_PACKAGE_VERSION@"
-
-Var InstallRunIfSilent
-Var NoAutomaticUpdates
-
-;-----------------------------------------------------------------------------
-; Installer build timestamp.
-;-----------------------------------------------------------------------------
-!define /date BUILD_TIME "built on %Y/%m/%d at %I:%M %p"
-
-;-----------------------------------------------------------------------------
-; Initial installer setup and definitions.
-;-----------------------------------------------------------------------------
-Name "@CPACK_NSIS_PACKAGE_NAME@"
-BrandingText "${APPLICATION_NAME} ${VERSION} -- ${BUILD_TIME}"
-OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
-InstallDir "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
-InstallDirRegKey HKCU "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" ""
-InstType Standard
-InstType Full
-InstType Minimal
-CRCCheck On
-SetCompressor @CPACK_NSIS_COMPRESSOR@
-RequestExecutionLevel user ;Now using the UAC plugin.
-ReserveFile NSIS.InstallOptions.ini
-ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
-
-@CPACK_NSIS_SECTION_SELECTED_VARS@
-
-;-----------------------------------------------------------------------------
-; Include some required header files.
-;-----------------------------------------------------------------------------
-!include LogicLib.nsh ;Used by APPDATA uninstaller.
-!include MUI2.nsh ;Used by APPDATA uninstaller.
-!include InstallOptions.nsh ;Required by MUI2 to support old MUI_INSTALLOPTIONS.
-!include Memento.nsh ;Remember user selections.
-!include WinVer.nsh ;Windows version detection.
-!include WordFunc.nsh ;Used by VersionCompare macro function.
-!include FileFunc.nsh ;Used to read out parameters
-!include UAC.nsh ;Used by the UAC elevation to install as user or admin.
-!include nsProcess.nsh ;Used to kill the running process
-!include Library.nsh ;Used by the COM registration for shell extensions
-!include x64.nsh ;Used to determine the right arch for the shell extensions
-
-!include ${source_path}/admin/win/nsi/lib/fileassoc.nsh
-
-;-----------------------------------------------------------------------------
-; Memento selections stored in registry.
-;-----------------------------------------------------------------------------
-!define MEMENTO_REGISTRY_ROOT HKLM
-!define MEMENTO_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}"
-
-;-----------------------------------------------------------------------------
-; Modern User Interface (MUI) definitions and setup.
-;-----------------------------------------------------------------------------
-!define MUI_ABORTWARNING
-!define MUI_ICON ${NSI_PATH}\installer.ico
-!define MUI_UNICON ${NSI_PATH}\installer.ico
-!define MUI_WELCOMEFINISHPAGE_BITMAP ${WIN_SETUP_BITMAP_PATH}/welcome.bmp
-!define MUI_HEADERIMAGE
-!define MUI_HEADERIMAGE_BITMAP ${WIN_SETUP_BITMAP_PATH}/page_header.bmp
-!define MUI_COMPONENTSPAGE_SMALLDESC
-; We removed this, h1 issue 191687
-;!define MUI_FINISHPAGE_LINK "${APPLICATION_DOMAIN}"
-;!define MUI_FINISHPAGE_LINK_LOCATION "http://${APPLICATION_DOMAIN}"
-!define MUI_FINISHPAGE_NOREBOOTSUPPORT
-!ifdef OPTION_FINISHPAGE_RELEASE_NOTES
- !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
- !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\NOTES.txt"
- !define MUI_FINISHPAGE_SHOWREADME_TEXT $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING
-!endif
-!ifdef OPTION_FINISHPAGE_LAUNCHER
- !define MUI_FINISHPAGE_NOAUTOCLOSE
- !define MUI_FINISHPAGE_RUN
- !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchApplication"
-!endif
-
-;-----------------------------------------------------------------------------
-; Page macros.
-;-----------------------------------------------------------------------------
-!insertmacro MUI_PAGE_WELCOME
-!ifdef OPTION_LICENSE_AGREEMENT
- !insertmacro MUI_PAGE_LICENSE "${APPLICATION_LICENSE}"
-!endif
-Page custom PageReinstall PageLeaveReinstall
-!insertmacro MUI_PAGE_COMPONENTS
-!insertmacro MUI_PAGE_DIRECTORY
-!insertmacro MUI_PAGE_INSTFILES
-!ifdef OPTION_FINISHPAGE
- !insertmacro MUI_PAGE_FINISH
-!endif
-!insertmacro MUI_UNPAGE_CONFIRM
-!insertmacro MUI_UNPAGE_INSTFILES
-
-;-----------------------------------------------------------------------------
-; Other MUI macros.
-;-----------------------------------------------------------------------------
-!insertmacro MUI_LANGUAGE "English"
-
-!include ${source_path}/admin/win/nsi/l10n/languages.nsh
-!include ${source_path}/admin/win/nsi/l10n/declarations.nsh
-
-; Set version strings with english locale
-VIProductVersion "${VERSION}"
-VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${APPLICATION_NAME}"
-VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${APPLICATION_VENDOR}"
-VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VERSION}"
-
-!macro SETLANG un
- Function ${un}SetLang
- # load the selected language file
- !include "${source_path}/admin/win/nsi/l10n\English.nsh"
- StrCmp $LANGUAGE ${LANG_GERMAN} German 0
- StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
- StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
- StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
- StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
- StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
- StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
- StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
- StrCmp $LANGUAGE ${LANG_GREEK} Greek 0
- StrCmp $LANGUAGE ${LANG_BASQUE} Basque 0
- StrCmp $LANGUAGE ${LANG_GALICIAN} Galician 0
- StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
- StrCmp $LANGUAGE ${LANG_TURKISH} Turkish 0
- StrCmp $LANGUAGE ${LANG_NORWEGIAN} Norwegian 0
- StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
- German:
- !include "${source_path}/admin/win/nsi/l10n\German.nsh"
- Goto EndLanguageCmp
- Dutch:
- !include "${source_path}/admin/win/nsi/l10n\Dutch.nsh"
- Goto EndLanguageCmp
- Finnish:
- !include "${source_path}/admin/win/nsi/l10n\Finnish.nsh"
- Goto EndLanguageCmp
- Japanese:
- !include "${source_path}/admin/win/nsi/l10n\Japanese.nsh"
- Goto EndLanguageCmp
- Slovenian:
- !include "${source_path}/admin/win/nsi/l10n\Slovenian.nsh"
- Goto EndLanguageCmp
- Spanish:
- !include "${source_path}/admin/win/nsi/l10n\Spanish.nsh"
- Goto EndLanguageCmp
- Italian:
- !include "${source_path}/admin/win/nsi/l10n\Italian.nsh"
- Goto EndLanguageCmp
- Estonian:
- !include "${source_path}/admin/win/nsi/l10n\Estonian.nsh"
- Goto EndLanguageCmp
- Greek:
- !include "${source_path}/admin/win/nsi/l10n\Greek.nsh"
- Goto EndLanguageCmp
- Basque:
- !include "${source_path}/admin/win/nsi/l10n\Basque.nsh"
- Goto EndLanguageCmp
- Galician:
- !include "${source_path}/admin/win/nsi/l10n\Galician.nsh"
- Goto EndLanguageCmp
- Polish:
- !include "${source_path}/admin/win/nsi/l10n\Polish.nsh"
- Goto EndLanguageCmp
- Turkish:
- !include "${source_path}/admin/win/nsi/l10n\Turkish.nsh"
- Goto EndLanguageCmp
- Brazilian:
- !include "${source_path}/admin/win/nsi/l10n\PortugueseBR.nsh"
- Goto EndLanguageCmp
- Norwegian:
- !include "${source_path}/admin/win/nsi/l10n\Norwegian.nsh"
- EndLanguageCmp:
-
- FunctionEnd
-!macroend
-
-!insertmacro SETLANG ""
-!insertmacro SETLANG "un."
-
-; Usage: ${If} ${HasSection} SectionName
-!macro _HasSection _a _b _t _f
- ReadRegDWORD $_LOGICLIB_TEMP "${MEMENTO_REGISTRY_ROOT}" "${MEMENTO_REGISTRY_KEY}" "MementoSection_${_b}"
- IntCmpU $_LOGICLIB_TEMP 0 ${_f} ${_t}
-!macroend
-!define HasSection `"" HasSection`
-
-##############################################################################
-# #
-# FINISH PAGE LAUNCHER FUNCTIONS #
-# #
-##############################################################################
-
-Function LaunchApplication
- !insertmacro UAC_AsUser_ExecShell "" "$INSTDIR\${APPLICATION_EXECUTABLE}" "" "" ""
-FunctionEnd
-
-##############################################################################
-# #
-# PROCESS HANDLING FUNCTIONS AND MACROS #
-# #
-##############################################################################
-
-!macro CheckForProcess processName gotoWhenFound gotoWhenNotFound
- ${nsProcess::FindProcess} ${processName} $R0
- StrCmp $R0 0 ${gotoWhenFound} ${gotoWhenNotFound}
-!macroend
-
-!macro ConfirmEndProcess processName
- MessageBox MB_YESNO|MB_ICONEXCLAMATION \
- $ConfirmEndProcess_MESSAGEBOX_TEXT \
- /SD IDYES IDYES process_${processName}_kill IDNO process_${processName}_ended
- process_${processName}_kill:
- DetailPrint $ConfirmEndProcess_KILLING_PROCESSES_TEXT
- ${nsProcess::KillProcess} ${processName} $R0
- Sleep 1500
- StrCmp $R0 "1" process_${processName}_ended
- DetailPrint $ConfirmEndProcess_KILL_NOT_FOUND_TEXT
- process_${processName}_ended:
-!macroend
-
-!macro CheckAndConfirmEndProcess processName
- !insertmacro CheckForProcess ${processName} 0 no_process_${processName}_to_end
- !insertmacro ConfirmEndProcess ${processName}
- no_process_${processName}_to_end:
-!macroend
-
-Function EnsureOwncloudShutdown
- !insertmacro CheckAndConfirmEndProcess "${APPLICATION_EXECUTABLE}"
-FunctionEnd
-
-Function InstallRedistributables
- ${If} ${RunningX64}
- ExecWait '"$OUTDIR\vcredist_x64.exe" /install /quiet'
- ${Else}
- ExecWait '"$OUTDIR\vcredist_x86.exe" /install /quiet'
- ${EndIf}
- Delete "$OUTDIR\vcredist_x86.exe"
- Delete "$OUTDIR\vcredist_x64.exe"
-FunctionEnd
-
-##############################################################################
-# #
-# RE-INSTALLER FUNCTIONS #
-# #
-##############################################################################
-
-Function PageReinstall
- ReadRegStr $R0 HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" ""
- StrCmp $R0 "" 0 +2
- Abort
-
- ;Detect version
- ReadRegDWORD $R0 HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMajor"
- IntCmp $R0 ${VER_MAJOR} minor_check new_version older_version
- minor_check:
- ReadRegDWORD $R0 HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMinor"
- IntCmp $R0 ${VER_MINOR} rev_check new_version older_version
- rev_check:
- ReadRegDWORD $R0 HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionRevision"
- IntCmp $R0 ${VER_PATCH} build_check new_version older_version
- build_check:
- ReadRegDWORD $R0 HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionBuild"
- IntCmp $R0 ${VER_BUILD} same_version new_version older_version
-
- new_version:
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 1" "Text" $PageReinstall_NEW_Field_1
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 2" "Text" $PageReinstall_NEW_Field_2
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 3" "Text" $PageReinstall_NEW_Field_3
- !insertmacro MUI_HEADER_TEXT $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE
- StrCpy $R0 "1"
- Goto reinst_start
-
- older_version:
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 1" "Text" $PageReinstall_OLD_Field_1
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 2" "Text" $PageReinstall_NEW_Field_2
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 3" "Text" $PageReinstall_NEW_Field_3
- !insertmacro MUI_HEADER_TEXT $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE
- StrCpy $R0 "1"
- Goto reinst_start
-
- same_version:
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 1" "Text" $PageReinstall_SAME_Field_1
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 2" "Text" $PageReinstall_SAME_Field_2
- !insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 3" "Text" $PageReinstall_SAME_Field_3
- !insertmacro MUI_HEADER_TEXT $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE
- StrCpy $R0 "2"
-
- reinst_start:
- !insertmacro INSTALLOPTIONS_DISPLAY "NSIS.InstallOptions.ini"
-FunctionEnd
-
-Function PageLeaveReinstall
- !insertmacro INSTALLOPTIONS_READ $R1 "NSIS.InstallOptions.ini" "Field 2" "State"
- StrCmp $R0 "1" 0 +2
- StrCmp $R1 "1" reinst_uninstall reinst_done
- StrCmp $R0 "2" 0 +3
- StrCmp $R1 "1" reinst_done reinst_uninstall
- reinst_uninstall:
- ReadRegStr $R1 ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "UninstallString"
- HideWindow
- ClearErrors
- ExecWait '$R1 _?=$INSTDIR'
- IfErrors no_remove_uninstaller
- IfFileExists "$INSTDIR\${APPLICATION_EXECUTABLE}" no_remove_uninstaller
- Delete $R1
- RMDir $INSTDIR
- no_remove_uninstaller:
- StrCmp $R0 "2" 0 +3
- Quit
- BringToFront
- reinst_done:
-FunctionEnd
-
-##############################################################################
-# #
-# INSTALLER SECTIONS #
-# #
-##############################################################################
-Section "${APPLICATION_NAME}" SEC_APPLICATION
- SectionIn 1 2 3 RO
- SetDetailsPrint listonly
-
- SetDetailsPrint textonly
- DetailPrint $SEC_APPLICATION_DETAILS
- SetDetailsPrint listonly
- SetOutPath "$INSTDIR"
-
- ;Main executable & csync
- File "${BUILD_PATH}\bin\${APPLICATION_EXECUTABLE}"
- File "${BUILD_PATH}\bin\${APPLICATION_CMD_EXECUTABLE}"
- File "${BUILD_PATH}\bin\lib${APPLICATION_SHORTNAME}sync.dll"
- File "${BUILD_PATH}\bin\lib${APPLICATION_SHORTNAME}_csync.dll"
-
- File "${BUILD_PATH}\src\gui\client*.qm"
- ; Make sure only to copy qt, not qt_help, etc
- File "${MING_SHARE}\qt5\translations\qt_??.qm"
- File "${MING_SHARE}\qt5\translations\qt_??_??.qm"
- File "${MING_SHARE}\qt5\translations\qtbase_*.qm"
- File "${MING_SHARE}\qt5\translations\qtkeychain_*.qm"
-
- ;Add crash reporter if it was built
- File /nonfatal "${BUILD_PATH}/bin/${CRASHREPORTER_EXECUTABLE}.exe"
-
- SetOutPath "$INSTDIR\platforms"
- File "${PLATFORMS_DLL_PATH}\qwindows.dll"
- SetOutPath "$INSTDIR\imageformats"
- File "${IMAGEFORMATS_DLL_PATH}\qgif.dll"
- File "${IMAGEFORMATS_DLL_PATH}\qjpeg.dll"
- File "${IMAGEFORMATS_DLL_PATH}\qico.dll"
- File "${IMAGEFORMATS_DLL_PATH}\qsvg.dll"
- ; PNG is built in Qt
-
- SetOutPath "$INSTDIR"
- ;License & release notes.
- File "@CPACK_RESOURCE_FILE_LICENSE@"
- ;File /oname=NOTES.txt ${NSI_PATH}\RELEASE_NOTES.txt
-
- ;Qt config:
- File "${NSI_PATH}\qt.conf"
-
- ;Qt stuff:
- File "${QT_DLL_PATH}\Qt5Core.dll"
- File "${QT_DLL_PATH}\Qt5Gui.dll"
- File "${QT_DLL_PATH}\Qt5Network.dll"
- File "${QT_DLL_PATH}\Qt5PrintSupport.dll"
- File "${QT_DLL_PATH}\Qt5Svg.dll"
- File "${QT_DLL_PATH}\Qt5Qml.dll"
- File "${QT_DLL_PATH}\Qt5Sql.dll"
- File "${QT_DLL_PATH}\Qt5Widgets.dll"
- File "${QT_DLL_PATH}\Qt5Xml.dll"
-
- ;Qt deps
- File "${MING_BIN}\libpng16-16.dll"
- File "${MING_BIN}\icudata56.dll"
- File "${MING_BIN}\icui18n56.dll"
- File "${MING_BIN}\icuuc56.dll"
- File "${MING_BIN}\libEGL.dll"
- File "${MING_BIN}\libGLESv2.dll"
- File "${MING_BIN}\libjpeg-8.dll"
- File "${MING_BIN}\libpcre16-0.dll"
- File "${MING_BIN}\libsqlite3-0.dll"
- File "${MING_BIN}\libcrypto-10.dll"
- File "${MING_BIN}\libssl-10.dll"
- File "${MING_BIN}\libstdc++-6.dll"
- File "${MING_BIN}\libwebp-5.dll"
- File "${MING_BIN}\libxslt-1.dll"
- File "${MING_BIN}\libxml2-2.dll"
- File "${MING_BIN}\zlib1.dll"
- File "${MING_BIN}\libharfbuzz-0.dll"
- File "${MING_BIN}\libfreetype-6.dll"
- File "${MING_BIN}\libglib-2.0-0.dll"
- File "${MING_BIN}\libintl-8.dll"
-
- ;QtKeyChain stuff
- File "${MING_BIN}\libqt5keychain.dll"
-
- ;MinGW stuff
- File "${MING_BIN}\libgcc_s_sjlj-1.dll"
- File "${MING_BIN}\libstdc++-6.dll"
- File "${MING_BIN}\libwinpthread-1.dll"
- File "${MING_BIN}\libssp-0.dll"
-
- ;CSync configs
- File "${SOURCE_PATH}/sync-exclude.lst"
-
- ;Add file association
- !insertmacro APP_ASSOCIATE "${APPLICATION_VIRTUALFILE_SUFFIX}" "${APPLICATION_VIRTUALFILE_FILECLASS}" "Virtual File for Remote File" "$INSTDIR\${APPLICATION_EXECUTABLE},0" "Download" "$INSTDIR\${APPLICATION_EXECUTABLE} $\"%1$\""
-
-SectionEnd
-
-!ifdef OPTION_SECTION_SC_SHELL_EXT
- ${MementoSection} $OPTION_SECTION_SC_SHELL_EXT_SECTION SEC_SHELL_EXT
- SectionIn 1 2
- SetDetailsPrint textonly
- DetailPrint $OPTION_SECTION_SC_SHELL_EXT_DetailPrint
- File "${BUILD_PATH}\vcredist_x86.exe"
- File "${BUILD_PATH}\vcredist_x64.exe"
- Call InstallRedistributables
- CreateDirectory "$INSTDIR\shellext"
- !define LIBRARY_COM
- !define LIBRARY_SHELL_EXTENSION
- !define LIBRARY_IGNORE_VERSION
- ${If} ${RunningX64}
- !define LIBRARY_X64
- !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCUtil_x64.dll" "$INSTDIR\shellext\OCUtil_x64.dll" "$INSTDIR\shellext"
- !insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCOverlays_x64.dll" "$INSTDIR\shellext\OCOverlays_x64.dll" "$INSTDIR\shellext"
- !insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCContextMenu_x64.dll" "$INSTDIR\shellext\OCContextMenu_x64.dll" "$INSTDIR\shellext"
- !undef LIBRARY_X64
- ${Else}
- !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCUtil_x86.dll" "$INSTDIR\shellext\OCUtil_x86.dll" "$INSTDIR\shellext"
- !insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCOverlays_x86.dll" "$INSTDIR\shellext\OCOverlays_x86.dll" "$INSTDIR\shellext"
- !insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCContextMenu_x86.dll" "$INSTDIR\shellext\OCContextMenu_x86.dll" "$INSTDIR\shellext"
- ${Endif}
- !undef LIBRARY_COM
- !undef LIBRARY_SHELL_EXTENSION
- !undef LIBRARY_IGNORE_VERSION
- ${MementoSectionEnd}
-!endif
-
-SectionGroup $SectionGroup_Shortcuts
-
-!ifdef OPTION_SECTION_SC_START_MENU
- ${MementoSection} $OPTION_SECTION_SC_START_MENU_SECTION SEC_START_MENU
- SectionIn 1 2 3
- SetDetailsPrint textonly
- DetailPrint $OPTION_SECTION_SC_START_MENU_DetailPrint
- SetDetailsPrint listonly
- SetShellVarContext all
- CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}"
- SetShellVarContext current
- ${MementoSectionEnd}
-!endif
-
-!ifdef OPTION_SECTION_SC_DESKTOP
- ${MementoSection} $OPTION_SECTION_SC_DESKTOP_SECTION SEC_DESKTOP
- SectionIn 1 2
- SetDetailsPrint textonly
- DetailPrint $OPTION_SECTION_SC_DESKTOP_DetailPrint
- SetDetailsPrint listonly
- SetShellVarContext all
- CreateShortCut "$DESKTOP\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}"
- SetShellVarContext current
- ${MementoSectionEnd}
-!endif
-
-!ifdef OPTION_SECTION_SC_QUICK_LAUNCH
- ${MementoSection} $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION SEC_QUICK_LAUNCH
- SectionIn 1 2
- SetDetailsPrint textonly
- DetailPrint $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint
- SetShellVarContext all
- SetDetailsPrint listonly
- CreateShortCut "$QUICKLAUNCH\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}"
- SetShellVarContext current
- ${MementoSectionEnd}
-!endif
-
-SectionGroupEnd
-
-${MementoSectionDone}
-
-; Installer section descriptions
-;--------------------------------
-!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APPLICATION} $OPTION_SECTION_SC_APPLICATION_Desc
-!insertmacro MUI_DESCRIPTION_TEXT ${SEC_START_MENU} $OPTION_SECTION_SC_START_MENU_Desc
-!insertmacro MUI_DESCRIPTION_TEXT ${SEC_DESKTOP} $OPTION_SECTION_SC_DESKTOP_Desc
-!insertmacro MUI_DESCRIPTION_TEXT ${SEC_QUICK_LAUNCH} $OPTION_SECTION_SC_QUICK_LAUNCH_Desc
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
-
-
-Section -post
-
- ;Uninstaller file.
- SetDetailsPrint textonly
- DetailPrint $UNINSTALLER_FILE_Detail
- SetDetailsPrint listonly
- WriteUninstaller $INSTDIR\uninstall.exe
-
- ;Registry keys required for installer version handling and uninstaller.
- SetDetailsPrint textonly
- DetailPrint $UNINSTALLER_REGISTRY_Detail
- SetDetailsPrint listonly
-
- ;Version numbers used to detect existing installation version for comparison.
- WriteRegStr HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "" $INSTDIR
- WriteRegDWORD HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMajor" "${VER_MAJOR}"
- WriteRegDWORD HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMinor" "${VER_MINOR}"
- WriteRegDWORD HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionRevision" "${VER_PATCH}"
- WriteRegDWORD HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionBuild" "${VER_BUILD}"
-
- ;Add or Remove Programs entry.
- WriteRegExpandStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
- WriteRegExpandStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "InstallLocation" "$INSTDIR"
- WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "DisplayName" "${APPLICATION_NAME}"
- WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "Publisher" "${APPLICATION_VENDOR}"
- WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "DisplayIcon" "$INSTDIR\Uninstall.exe,0"
- WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "DisplayVersion" "${VERSION}"
- WriteRegDWORD ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "VersionMajor" "${VER_MAJOR}"
- WriteRegDWORD ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "VersionMinor" "${VER_MINOR}.${VER_PATCH}.${VER_BUILD}"
- WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "URLInfoAbout" "http://${APPLICATION_DOMAIN}/"
- WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "HelpLink" "http://${APPLICATION_DOMAIN}/"
- WriteRegDWORD ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "NoModify" "1"
- WriteRegDWORD ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "NoRepair" "1"
-
-
- SetDetailsPrint textonly
- DetailPrint $UNINSTALLER_FINISHED_Detail
-SectionEnd
-
-##############################################################################
-# #
-# UNINSTALLER SECTION #
-# #
-##############################################################################
-
-Function un.EnsureOwncloudShutdown
- !insertmacro CheckAndConfirmEndProcess "${APPLICATION_EXECUTABLE}"
-FunctionEnd
-
-Section Uninstall
- IfFileExists "$INSTDIR\${APPLICATION_EXECUTABLE}" owncloud_installed
- MessageBox MB_YESNO $UNINSTALL_MESSAGEBOX /SD IDYES IDYES owncloud_installed
- Abort $UNINSTALL_ABORT
- owncloud_installed:
-
- ; Delete Navigation Pane entries added for Windows 10.
- ; On 64bit Windows, the client will be writing to the 64bit registry.
- ${If} ${RunningX64}
- SetRegView 64
- ${EndIf}
- StrCpy $0 0
- loop:
- ; Look at every registered explorer namespace for HKCU and check if it was added by our application
- ; (we write to a custom "ApplicationName" value there).
- EnumRegKey $1 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace" $0
- StrCmp $1 "" done
-
- ReadRegStr $R0 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\$1" "ApplicationName"
- StrCmp $R0 "${APPLICATION_NAME}" deleteClsid
- ; Increment the index when not deleting the enumerated key.
- IntOp $0 $0 + 1
- goto loop
-
- deleteClsid:
- DetailPrint "Removing Navigation Pane CLSID $1"
- ; Should match FolderMan::updateCloudStorageRegistry
- DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\$1"
- DeleteRegKey HKCU "Software\Classes\CLSID\$1"
- DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" $1
- goto loop
- done:
- ; Go back to the 32bit registry.
- SetRegView lastused
-
- ;Delete registry keys.
- DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionBuild"
- DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMajor"
- DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMinor"
- DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionRevision"
- DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" ""
- DeleteRegKey HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}"
-
- DeleteRegKey HKCR "${APPLICATION_NAME}"
-
- ;Remove file association
- !insertmacro APP_UNASSOCIATE "${APPLICATION_VIRTUALFILE_SUFFIX}" "${APPLICATION_VIRTUALFILE_FILECLASS}"
-
- ;Shell extension
- !ifdef OPTION_SECTION_SC_SHELL_EXT
- !define LIBRARY_COM
- !define LIBRARY_SHELL_EXTENSION
- !define LIBRARY_IGNORE_VERSION
- ${If} ${HasSection} SEC_SHELL_EXT
- DetailPrint "Uninstalling x64 overlay DLLs"
- !define LIBRARY_X64
- !insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCContextMenu_x64.dll"
- !insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCOverlays_x64.dll"
- !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCUtil_x64.dll"
- !undef LIBRARY_X64
- DetailPrint "Uninstalling x86 overlay DLLs"
- !insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCContextMenu_x86.dll"
- !insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCOverlays_x86.dll"
- !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCUtil_x86.dll"
- ${EndIf}
- !undef LIBRARY_COM
- !undef LIBRARY_SHELL_EXTENSION
- !undef LIBRARY_IGNORE_VERSION
- !endif
-
- ;Start menu shortcut
- !ifdef OPTION_SECTION_SC_START_MENU
- SetShellVarContext all
- ${If} ${HasSection} SEC_START_MENU
- Delete "$SMPROGRAMS\${APPLICATION_NAME}.lnk"
- ${EndIf}
- SetShellVarContext current
- !endif
-
- ;Desktop shortcut.
- !ifdef OPTION_SECTION_SC_DESKTOP
- ${If} ${HasSection} SEC_DESKTOP
- SetShellVarContext all
- ${If} ${FileExists} "$DESKTOP\${APPLICATION_NAME}.lnk"
- Delete "$DESKTOP\${APPLICATION_NAME}.lnk"
- ${EndIf}
- SetShellVarContext current
- ${EndIf}
- !endif
-
- ;Quick Launch shortcut.
- !ifdef OPTION_SECTION_SC_QUICK_LAUNCH
- ${If} ${HasSection} SEC_QUICK_LAUNCH
- SetShellVarContext all
- ${If} ${FileExists} "$QUICKLAUNCH\${APPLICATION_NAME}.lnk"
- Delete "$QUICKLAUNCH\${APPLICATION_NAME}.lnk"
- ${EndIf}
- SetShellVarContext current
- ${EndIf}
- !endif
-
- ;Remove all the Program Files.
- RMDir /r $INSTDIR
-
- DeleteRegKey ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}"
-
- SetDetailsPrint textonly
- DetailPrint $UNINSTALLER_FINISHED_Detail
-SectionEnd
-
-##############################################################################
-# #
-# NSIS Installer Event Handler Functions #
-# #
-##############################################################################
-
-Function .onInit
- SetOutPath $INSTDIR
-
- ${GetParameters} $R0
- ${GetOptions} $R0 "/launch" $R0
- ${IfNot} ${Errors}
- StrCpy $InstallRunIfSilent "yes"
- ${EndIf}
-
- ${GetParameters} $R0
- ${GetOptions} $R0 "/noautoupdate" $R0
- ${IfNot} ${Errors}
- StrCpy $NoAutomaticUpdates "yes"
- ${EndIf}
-
-
- !insertmacro INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini"
-
- ; uncomment this line if you want to see the language selection
- ;!insertmacro MUI_LANGDLL_DISPLAY
-
- Call SetLang
-
- ; Remove Quick Launch option from Windows 7, as no longer applicable - usually.
- ${IfNot} ${AtMostWinVista}
- SectionSetText ${SEC_QUICK_LAUNCH} $INIT_NO_QUICK_LAUNCH
- SectionSetFlags ${SEC_QUICK_LAUNCH} ${SF_RO}
- SectionSetInstTypes ${SEC_QUICK_LAUNCH} 0
- ${EndIf}
-
- ; Some people might have a shortcut called 'ownCloud' pointing elsewhere, see #356
- ; Unselect item and adjust text
- ${If} ${FileExists} "$DESKTOP\${APPLICATION_NAME}.lnk"
- SectionSetText ${SEC_DESKTOP} $INIT_NO_DESKTOP
- Push $0
- SectionSetFlags ${SEC_DESKTOP} 0
- SectionSetInstTypes ${SEC_DESKTOP} 0
- Pop $0
- ${EndIf}
-
- ${MementoSectionRestore}
-
- UAC_TryAgain:
- !insertmacro UAC_RunElevated
- ${Switch} $0
- ${Case} 0
- ${IfThen} $1 = 1 ${|} Quit ${|} ;we are the outer process, the inner process has done its work, we are done
- ${IfThen} $3 <> 0 ${|} ${Break} ${|} ;we are admin, let the show go on
- ${If} $1 = 3 ;RunAs completed successfully, but with a non-admin user
- MessageBox mb_YesNo|mb_ICONEXCLAMATION|MB_TOPMOST|MB_SETFOREGROUND $UAC_INSTALLER_REQUIRE_ADMIN /SD IDNO IDYES UAC_TryAgain IDNO 0
- ${EndIf}
- ;fall-through and die
- ${Case} 1223
- MessageBox MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND $UAC_INSTALLER_REQUIRE_ADMIN
- Quit
- ${Case} 1062
- MessageBox MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND $UAC_ERROR_LOGON_SERVICE
- Quit
- ${Default}
- MessageBox MB_ICONSTOP "$UAC_ERROR_ELEVATE $0"
- Abort
- Quit
- ${EndSwitch}
-
- ;Prevent multiple instances.
- System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${APPLICATION_SHORTNAME}Installer") i .r1 ?e'
- Pop $R0
- StrCmp $R0 0 +3
- MessageBox MB_OK|MB_ICONEXCLAMATION $INIT_INSTALLER_RUNNING
- Abort
-
- ;Use available InstallLocation when possible. This is useful in the uninstaller
- ;via re-install, which would otherwise use a default location - a bug.
- ReadRegStr $R0 ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "InstallLocation"
- StrCmp $R0 "" SkipSetInstDir
- StrCpy $INSTDIR $R0
- SkipSetInstDir:
-
- ;Shutdown ${APPLICATION_NAME} in case Add/Remove re-installer option used.
- Call EnsureOwncloudShutdown
-
- ReadRegStr $R0 ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "InstallLocation"
- ${If} ${Silent}
- ${AndIf} $R0 != ""
- ExecWait '"$R0\Uninstall.exe" /S _?=$R0'
- ${EndIf}
-FunctionEnd
-
-Function .onInstSuccess
- ${MementoSectionSave}
-
- ${If} $NoAutomaticUpdates == "yes"
- WriteRegDWORD HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "skipUpdateCheck" "1"
- ${EndIf}
-
- ; TODO: Only needed to when updating from 2.1.{0,1}. Remove in due time.
- Delete /REBOOTOK $INSTDIR\bearer\qgenericbearer.dll
- Delete /REBOOTOK $INSTDIR\bearer\qnativewifibearer.dll
- RMDir /REBOOTOK $INSTDIR\bearer
-
- ${If} ${Silent}
- ${AndIf} $InstallRunIfSilent == "yes"
- Call LaunchApplication
- ${EndIf}
-FunctionEnd
-
-Function .onInstFailed
-FunctionEnd
-
-##############################################################################
-# #
-# NSIS Uninstaller Event Handler Functions #
-# #
-##############################################################################
-
-Function un.onInit
- Call un.SetLang
-
- UAC_TryAgain:
- !insertmacro UAC_RunElevated
- ${Switch} $0
- ${Case} 0
- ${IfThen} $1 = 1 ${|} Quit ${|} ;we are the outer process, the inner process has done its work, we are done
- ${IfThen} $3 <> 0 ${|} ${Break} ${|} ;we are admin, let the show go on
- ${If} $1 = 3 ;RunAs completed successfully, but with a non-admin user
- MessageBox mb_YesNo|mb_ICONEXCLAMATION|MB_TOPMOST|MB_SETFOREGROUND $UAC_UNINSTALLER_REQUIRE_ADMIN /SD IDNO IDYES UAC_TryAgain IDNO 0
- ${EndIf}
- ;fall-through and die
- ${Case} 1223
- MessageBox MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND $UAC_UNINSTALLER_REQUIRE_ADMIN
- Quit
- ${Case} 1062
- MessageBox MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND $UAC_ERROR_LOGON_SERVICE
- Quit
- ${Default}
- MessageBox MB_ICONSTOP "$UAC_ERROR_ELEVATE $0"
- Abort
- Quit
- ${EndSwitch}
-
- ;Prevent multiple instances.
- System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${APPLICATION_SHORTNAME}Uninstaller") i .r1 ?e'
- Pop $R0
- StrCmp $R0 0 +3
- MessageBox MB_OK|MB_ICONEXCLAMATION $INIT_UNINSTALLER_RUNNING
- Abort
-
- ;Shutdown ${APPLICATION_NAME} in order to remove locked files.
- Call un.EnsureOwncloudShutdown
-FunctionEnd
-
-Function un.onUnInstSuccess
-FunctionEnd
-
-Function un.onUnInstFailed
-FunctionEnd
diff --git a/cmake/modules/UseDoxygen.cmake b/cmake/modules/UseDoxygen.cmake
deleted file mode 100644
index 86622f61c..000000000
--- a/cmake/modules/UseDoxygen.cmake
+++ /dev/null
@@ -1,131 +0,0 @@
-# (c) 2014 Copyright ownCloud GmbH
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING* file.
-
-# -helper macro to add a "doc" target with CMake build system.
-# and configure doxy.config.in to doxy.config
-#
-# target "doc" allows building the documentation with doxygen/dot on WIN32 and Linux
-# Creates .chm windows help file if MS HTML help workshop
-# (available from http://msdn.microsoft.com/workshop/author/htmlhelp)
-# is installed with its DLLs in PATH.
-#
-#
-# Please note, that the tools, e.g.:
-# doxygen, dot, latex, dvips, makeindex, gswin32, etc.
-# must be in path.
-#
-# Note about Visual Studio Projects:
-# MSVS has its own path environment which may differ from the shell.
-# See "Menu Tools/Options/Projects/VC++ Directories" in VS 7.1
-#
-# author Jan Woetzel 2004-2006
-# www.mip.informatik.uni-kiel.de/~jw
-
-
-FIND_PACKAGE(Doxygen)
-
-IF (DOXYGEN_FOUND)
-
- # click+jump in Emacs and Visual Studio (for doxy.config) (jw)
- IF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
- SET(DOXY_WARN_FORMAT "\"$file($line) : $text \"")
- ELSE (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
- SET(DOXY_WARN_FORMAT "\"$file:$line: $text \"")
- ENDIF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
-
- # we need latex for doxygen because of the formulas
- FIND_PACKAGE(LATEX)
- IF (NOT LATEX_COMPILER)
- MESSAGE(STATUS "latex command LATEX_COMPILER not found but usually required. You will probably get warnings and user interaction on doxy run.")
- ENDIF (NOT LATEX_COMPILER)
- IF (NOT MAKEINDEX_COMPILER)
- MESSAGE(STATUS "makeindex command MAKEINDEX_COMPILER not found but usually required.")
- ENDIF (NOT MAKEINDEX_COMPILER)
- IF (NOT DVIPS_CONVERTER)
- MESSAGE(STATUS "dvips command DVIPS_CONVERTER not found but usually required.")
- ENDIF (NOT DVIPS_CONVERTER)
- FIND_PROGRAM(DOXYGEN_DOT_EXECUTABLE_PATH NAMES dot)
- IF (DOXYGEN_DOT_EXECUTABLE_PATH)
- SET(DOXYGEN_DOT_FOUND "YES")
- ENDIF (DOXYGEN_DOT_EXECUTABLE_PATH)
-
- IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
- MESSAGE(STATUS "Generate ${CMAKE_CURRENT_BINARY_DIR}/doxy.config from doxy.config.in")
- CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in
- ${CMAKE_CURRENT_BINARY_DIR}/doxy.config
- @ONLY )
- # use (configured) doxy.config from (out of place) BUILD tree:
- SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
- ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
- # use static hand-edited doxy.config from SOURCE tree:
- SET(DOXY_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
- IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
- MESSAGE(STATUS "WARNING: using existing ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config instead of configuring from doxy.config.in file.")
- ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
- IF (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
- # using template doxy.config.in
- MESSAGE(STATUS "Generate ${CMAKE_CURRENT_BINARY_DIR}/doxy.config from doxy.config.in")
- CONFIGURE_FILE(${CMAKE_MODULE_PATH}/doxy.config.in
- ${CMAKE_CURRENT_BINARY_DIR}/doxy.config
- @ONLY )
- SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
- ELSE (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
- # failed completely...
- MESSAGE(SEND_ERROR "Please create ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in (or doxy.config as fallback)")
- ENDIF(EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
-
- ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
- ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
-
- ADD_CUSTOM_TARGET(csync_doc ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doxy.config)
-
- # create a windows help .chm file using hhc.exe
- # HTMLHelp DLL must be in path!
- # fallback: use hhw.exe interactively
- IF (WIN32)
- FIND_PACKAGE(HTMLHelp)
- IF (HTML_HELP_COMPILER)
- SET (TMP "${CMAKE_CURRENT_BINARY_DIR}\\doc\\html\\index.hhp")
- STRING(REGEX REPLACE "[/]" "\\\\" HHP_FILE ${TMP} )
- # MESSAGE(SEND_ERROR "DBG HHP_FILE=${HHP_FILE}")
- ADD_CUSTOM_TARGET(winhelp ${HTML_HELP_COMPILER} ${HHP_FILE})
- ADD_DEPENDENCIES (winhelp doc)
-
- IF (NOT TARGET_DOC_SKIP_INSTALL)
- # install windows help?
- # determine useful name for output file
- # should be project and version unique to allow installing
- # multiple projects into one global directory
- IF (EXISTS "${PROJECT_BINARY_DIR}/doc/html/index.chm")
- IF (PROJECT_NAME)
- SET(OUT "${PROJECT_NAME}")
- ELSE (PROJECT_NAME)
- SET(OUT "Documentation") # default
- ENDIF(PROJECT_NAME)
- IF (${PROJECT_NAME}_VERSION_MAJOR)
- SET(OUT "${OUT}-${${PROJECT_NAME}_VERSION_MAJOR}")
- IF (${PROJECT_NAME}_VERSION_MINOR)
- SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_MINOR}")
- IF (${PROJECT_NAME}_VERSION_PATCH)
- SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_PATCH}")
- ENDIF(${PROJECT_NAME}_VERSION_PATCH)
- ENDIF(${PROJECT_NAME}_VERSION_MINOR)
- ENDIF(${PROJECT_NAME}_VERSION_MAJOR)
- # keep suffix
- SET(OUT "${OUT}.chm")
-
- #MESSAGE("DBG ${PROJECT_BINARY_DIR}/doc/html/index.chm \n${OUT}")
- # create target used by install and package commands
- INSTALL(FILES "${PROJECT_BINARY_DIR}/doc/html/index.chm"
- DESTINATION "doc"
- RENAME "${OUT}"
- )
- ENDIF(EXISTS "${PROJECT_BINARY_DIR}/doc/html/index.chm")
- ENDIF(NOT TARGET_DOC_SKIP_INSTALL)
-
- ENDIF(HTML_HELP_COMPILER)
- # MESSAGE(SEND_ERROR "HTML_HELP_COMPILER=${HTML_HELP_COMPILER}")
- ENDIF (WIN32)
-ENDIF(DOXYGEN_FOUND)
-