diff --git a/CMakeLists.txt b/CMakeLists.txt index e0311a364..093543727 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,346 +1,346 @@ project(umbrello) # KDE Application Version, managed by release script set (KDE_APPLICATIONS_VERSION_MAJOR "18") set (KDE_APPLICATIONS_VERSION_MINOR "11") set (KDE_APPLICATIONS_VERSION_MICRO "70") set(UMBRELLO_VERSION_MAJOR "2") -MATH(EXPR UMBRELLO_VERSION_MINOR "18+${KDE_APPLICATIONS_VERSION_MINOR}") +MATH(EXPR UMBRELLO_VERSION_MINOR "15+${KDE_APPLICATIONS_VERSION_MINOR}") set(UMBRELLO_VERSION_PATCH ${KDE_APPLICATIONS_VERSION_MICRO}) option(BUILD_ICONS "Create icons from svg source" OFF) option(BUILD_CURSOR_ICONS "Create cursor icons from svg source" OFF) option(BUILD_ICONS_INTO_SIZE_RELATED_DIRS "place icons into separate directories (for debugging purpose)" OFF) option(BUILD_KF5 "Build for KDE Frameworks 5" ON) # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) include(Macros) set(CMAKE_AUTORCC ON) if(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-delete-null-pointer-checks") # TODO: after removing kdelibs4support this could also be removed set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") endif() find_package(KDevelop-PG-Qt) if(NOT BUILD_KF5) cmake_minimum_required(VERSION 2.8 FATAL_ERROR) set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) find_package(Qt4 4.4.3 REQUIRED QtCore QtGui QtXml QtTest QtWebKit) set(KDE4_BUILD_TESTS ON) # for unit tests # search packages used by KDE find_package(KDE4 REQUIRED) include(KDE4Defaults) include(MacroLibrary) # The FindKDE4.cmake module sets _KDE4_PLATFORM_DEFINITIONS with # definitions like _GNU_SOURCE that are needed on each platform. set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS} -DQT_STRICT_ITERATORS) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") add_definitions ( ${KDE4_DEFINITIONS} ) include_directories( ${KDE4_INCLUDES} ) if(KDE4_BUILD_TESTS) enable_testing() set(BUILD_UNITTESTS 1) endif() macro(ki18n_wrap_ui) kde4_add_ui_files(${ARGN}) endmacro(ki18n_wrap_ui) macro(kconfig_add_kcfg_files) kde4_add_kcfg_files(${ARGN}) endmacro(kconfig_add_kcfg_files) macro(ecm_optional_add_subdirectory) add_subdirectory(${ARGN}) endmacro(ecm_optional_add_subdirectory) macro(ecm_add_test) set(sources) set(libs) set(name_prefix) set(test_name) set(mode 0) set(guimode "NOGUI") foreach(a ${ARGN}) if(a STREQUAL "LINK_LIBRARIES") set(mode 1) elseif(a STREQUAL "NAME_PREFIX") set(mode 2) elseif(a STREQUAL "GUI") set(guimode "GUI") set(mode 3) elseif(a STREQUAL "TEST_NAME") set(mode 4) elseif (mode EQUAL 0) list(APPEND sources ${a}) elseif(mode EQUAL 1) list(APPEND libs ${a}) elseif(mode EQUAL 2) set(name_prefix ${a}) elseif(mode EQUAL 4) set(test_name ${a}) endif() endforeach(a) set(targetname ${test_name}) if(name_prefix) set(testname ${name_prefix}-${targetname}) else() set(testname ${targetname}) endif() kde4_add_unit_test(${targetname} TESTNAME ${testname} ${guimode} ${sources}) target_link_libraries(${targetname} ${libs}) endmacro(ecm_add_test) macro(ecm_add_executable) kde4_add_executable(${ARGN}) endmacro(ecm_add_executable) macro(ecm_mark_nongui_executable) foreach(_target ${ARGN}) set_target_properties(${_target} PROPERTIES WIN32_EXECUTABLE FALSE MACOSX_BUNDLE FALSE ) endforeach() endmacro(ecm_mark_nongui_executable) if(NOT DISABLE_PHP_IMPORT) find_package(KDevelop-PG-Qt) find_package(KDevPlatform) if ("${KDevPlatform_VERSION_MAJOR}" STREQUAL "5") message(FATAL_ERROR "Could not compile with KF5 based kdevplatform. Please uninstall or specify -DDISABLE_PHP_IMPORT=1") endif() endif() if(KDEVPGQT_FOUND AND KDEVPLATFORM_FOUND) include_directories( ${KDEVPGQT_INCLUDE_DIR} ${KDEVPLATFORM_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/lib/kdev4-php/parser ${CMAKE_BINARY_DIR}/lib/kdev4-php/parser ) set(NO_INSTALL 1) set(BUILD_PARSER_ONLY 1) set(BUILD_PHP_IMPORT 1) add_definitions( -DKDEVPHPPARSER_EXPORT= -DENABLE_PHP_IMPORT ) add_subdirectory(lib/kdev4-php) endif() macro_display_feature_log() KDE4_NO_ENABLE_FINAL(umbrello) set(UMBRELLO_DATA_INSTALL_DIR ${DATA_INSTALL_DIR}/umbrello) else() cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) # we need some parts of the ECM CMake helpers find_package(ECM 1.1.0 REQUIRED NO_MODULE) list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) include(KDEInstallDirs) include(KDECompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) include(FeatureSummary) include(ECMInstallIcons) include(ECMSetupVersion) include(ECMOptionalAddSubdirectory) include(ECMAddAppIcon) include(ECMAddTests) # search packages used by Qt set(QT_MIN_VERSION "5.2.0") find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core Gui PrintSupport Svg Test Widgets Xml WebKitWidgets ) # search packages used by KDE find_package(KF5 REQUIRED COMPONENTS Archive Completion Config CoreAddons Crash DocTools I18n IconThemes KDELibs4Support KIO TextEditor WidgetsAddons WindowSystem XmlGui ) macro(ecm_add_executable) add_executable(${ARGN}) endmacro(ecm_add_executable) set(BUILD_UNITTESTS 1) set(UMBRELLO_DATA_INSTALL_DIR ${DATA_INSTALL_DIR}/umbrello5) ki18n_install(po) kdoctools_install(po) find_package(KDevPlatform "5.1.2" COMPONENTS KDev::Interfaces KDev::Language KDev::Tests ) if(KDEVPGQT_FOUND AND KDEVPLATFORM_FOUND AND TARGET KDev::Tests) include_directories( ${KDEVPGQT_INCLUDE_DIR} ${KDEVPLATFORM_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/lib/kdev5-php/parser ${CMAKE_BINARY_DIR}/lib/kdev5-php/parser ) set(NO_INSTALL 1) set(BUILD_PARSER_ONLY 1) set(BUILD_PHP_IMPORT 1) add_definitions( -DKDEVPHPPARSER_EXPORT= -DENABLE_PHP_IMPORT ) add_subdirectory(lib/kdev5-php) elseif(NOT TARGET KDev::Tests) message(STATUS "Could not find required KDevPlatform component KDev::Tests - disabling php import support") endif() endif() if(POLICY CMP0071) cmake_policy(SET CMP0071 OLD) endif() # use some compile flags add_definitions( -DQT_NO_SIGNAL_SLOTS_KEYWORDS -DQT_NO_URL_CAST_FROM_STRING ) # set default umbrello version # umbrello version could be overridden by cmake command line using -DUMBRELLO_VERSION_STRING=major.minor.patch if(NOT UMBRELLO_VERSION_STRING) set(UMBRELLO_VERSION_STRING "${UMBRELLO_VERSION_MAJOR}.${UMBRELLO_VERSION_MINOR}.${UMBRELLO_VERSION_PATCH}") if(EXISTS ${CMAKE_SOURCE_DIR}/.git) execute_process( COMMAND git rev-parse --short HEAD WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE _hash ) if(_hash) string(REPLACE "\n" "" hash ${_hash}) set(UMBRELLO_VERSION_STRING "${UMBRELLO_VERSION_STRING}-${hash}") endif() endif() endif() message(STATUS "Using umbrello version ${UMBRELLO_VERSION_STRING}") add_definitions(-DUMBRELLO_VERSION_STRING="${UMBRELLO_VERSION_STRING}") message(STATUS "Using automoc4 version ${AUTOMOC4_VERSION}") message(STATUS "Using cmake version ${CMAKE_VERSION}") message(STATUS "Using Qt version ${QT_MIN_VERSION}") find_package(LibXslt) set_package_properties(LibXslt PROPERTIES DESCRIPTION "A library to transform XMLfiles into other XML files." URL "http://xmlsoft.org/XSLT" TYPE REQUIRED) find_package(LibXml2) set_package_properties(LibXml2 PROPERTIES DESCRIPTION "Libraries used to develop XML applications." URL "http://xmlsoft.org" TYPE REQUIRED) include_directories( ${CMAKE_BINARY_DIR} ) # # Unstable features should not be enabled in stable branches # This macro limits unstable feature to development branches # by only adding -DENABLE_ to the compile command when # the patch level is >= 70 which includes releases from master # beta and rc releases. On cmake configure time a related status # note is displayed. # # syntax: add_unstable_feature() # # In code wrap feature related code with # # #ifdef ENABLE_ # # #endif # macro(add_unstable_feature name) if(UMBRELLO_VERSION_PATCH GREATER 69) add_definitions(-DENABLE_${name}) set(ENABLE_${name} 1) message(STATUS "Enable unstable feature ${name} - use '#ifdef ENABLE_${name}' in related code") else() set(ENABLE_${name} 0) message(STATUS "Disable unstable feature ${name}") endif() endmacro(add_unstable_feature) add_unstable_feature(WIDGET_SHOW_DOC) # show documentation in classes ticket xxx add_unstable_feature(NEW_CODE_GENERATORS) # new c++ code generator add_unstable_feature(UML_OBJECTS_WINDOW) # objects dock window add_unstable_feature(XMIRESOLUTION) # see https://bugs.kde.org/show_bug.cgi?id=90103 # Current object diagram implementation does not follow UML 1.4 standard # because of using umbrello specific XMI tag (UML:InstanceAttribute). add_unstable_feature(OBJECT_DIAGRAM) # see https://bugs.kde.org/show_bug.cgi?id=123633 configure_file(Doxyfile ${CMAKE_BINARY_DIR}/Doxyfile) find_program(DOXYGEN_EXECUTABLE doxygen) if(DOXYGEN_EXECUTABLE) add_custom_target(apidoc COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile ) endif() if(LIBXSLT_FOUND AND LIBXML2_FOUND) add_subdirectory(umbrello) add_subdirectory(doc) add_subdirectory(tools) endif(LIBXSLT_FOUND AND LIBXML2_FOUND) add_subdirectory(maintainer) # for automatic unit tests if(BUILD_UNITTESTS) ecm_optional_add_subdirectory(unittests) endif() feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/maintainer/release-windows-packages b/maintainer/release-windows-packages index f25a82ac6..bf6a33dbf 100755 --- a/maintainer/release-windows-packages +++ b/maintainer/release-windows-packages @@ -1,187 +1,187 @@ #!/bin/sh # # unpack windows rpm's from opensuse download server, upload files to kde.org and file a related release ticket # # Author: Ralf Habacker # # requirements: # # osc - opensuse build service command line client # # syntax: release-windows-packages # # run ./release-windows-packages to see all modes # NAME=umbrello PACKAGENAME32=mingw32-$NAME ROOT32=windows\:mingw\:win32 SRCROOT32=${ROOT32} ARCHOUT32=i686-w64-mingw32 PACKAGENAME64=mingw64-$NAME ROOT64=windows\:mingw\:win64 SRCROOT64=${ROOT64} ARCHOUT64=x86_64-w64-mingw32 -REPO=openSUSE_Leap_42.2 +REPO=openSUSE_Leap_42.3 SRCREPO=$REPO -VERSION=2.25.0 +VERSION=2.25.3 PHABURL=https://phabricator.kde.org oscoptions="-A https://api.opensuse.org" apitoken=cli-uxo23l4q5qrzoyscbz5kp4zcngqp options='projectPHIDs[]=PHID-PROJ-3qa4tomwgrmcmp4ym2ow' # abort on errors set -e echo2() { printf "%s\n" "$*" >&2; } which 7z >/dev/null 2>&1 if test $? -ne 0; then echo "7z not found, run 'zypper install p7zip'" exit 1 fi self=$(realpath $0) if ! test -d "work"; then mkdir work fi echo2 "running mode $1" case $1 in clean) ## clean working area rm -rf work/* ;; download) ## download rpm packages cd work rm -rf binaries - osc $oscoptions getbinaries $ROOT32 $PACKAGENAME32-installer $REPO x86_64 + osc $oscoptions getbinaries $ROOT32 $PACKAGENAME32:$PACKAGENAME32-installer $REPO x86_64 if test -n "$ROOT64"; then - osc $oscoptions getbinaries $ROOT64 $PACKAGENAME64-installer $REPO x86_64 + osc $oscoptions getbinaries $ROOT64 $PACKAGENAME64:$PACKAGENAME64-installer $REPO x86_64 fi cd .. $self downloadsrc touch work/$1.finished ;; downloadsrc) ## download source cd work # fetch source package src32pkg=$(osc $oscoptions ls -b -r $SRCREPO -a x86_64 $SRCROOT32 $PACKAGENAME32 | grep src) osc $oscoptions getbinaries --sources $SRCROOT32 $PACKAGENAME32 $SRCREPO x86_64 $src32pkg # we only need once source package #src64pkg=$(osc $oscoptions ls -b -r $SRCREPO -a x86_64 $SRCROOT64 mingw64-umbrello | grep src) #osc $oscoptions getbinaries --sources $SRCROOT64 mingw64-umbrello $SRCREPO x86_64 $src64pkg # fetch debug packages debug32pkg=$(osc $oscoptions ls -b -r $SRCREPO -a x86_64 $SRCROOT32 $PACKAGENAME32 | grep debug) osc $oscoptions getbinaries $SRCROOT32 $PACKAGENAME32 $SRCREPO x86_64 $debug32pkg if test -n "$ROOT64"; then debug64pkg=$(osc $oscoptions ls -b -r $SRCREPO -a x86_64 $SRCROOT64 $PACKAGENAME64 | grep debug) osc $oscoptions getbinaries $SRCROOT64 $PACKAGENAME64 $SRCREPO x86_64 $debug64pkg fi touch $1.finished ;; unpack) ## unpack rpm files cd work files=$(cd binaries; find -name '*installer*' -o -name '*portable*' -o -name '*src*' -o -name '*debugpackage*' | grep "$VERSION" | sed 's,^.,binaries,g') if test -d tmp; then rm -rf tmp fi mkdir -p tmp for i in $(echo $files); do (cd tmp; rpm2cpio ../$i | cpio -idmv) done touch $1.finished ;; movepackage) ## move windows binary packages into upload folder cd work rm -rf out mkdir -p out find tmp/ -type f -name '*.exe' -exec cp {} out \; find tmp/ -type f -name '*.7z' -exec cp {} out \; touch $1.finished ;; repacksource) ## repackage source tar ball to 7z # repackage source package srcfile=$(find work/tmp -name "$NAME*.xz") outfile=$(basename $srcfile | sed 's,\.tar\.xz,\.7z,g') (mkdir -p work/srctmp; cd work/srctmp; tar -xJf ../../$srcfile; 7za a ../out/$outfile *; cd ..; rm -rf srctmp) touch work/$1.finished ;; createsha) ## create sha256sums (cd work/out; find -type f -name '*.7z' -o -name '*.exe' | sed 's,\./,,g' | sort | xargs sha256sum > $NAME.sha256sum) touch work/$1.finished ;; upload) ## upload files to staging area for i in $(find work/out -name '*.7z' -o -name '*.exe'); do set +e curl -T $i ftp://upload.kde.org/incoming/ set -e done touch work/$1.finished ;; createdescription) ## create ticket description description="Please move the $NAME related files which has been uploaded to upload.kde.org/incoming to download mirror 'stable/$NAME/$VERSION' location and please update the symbolic link 'stable/$NAME/latest' to 'stable/$NAME/$VERSION'" sums=$(cat work/out/$NAME.sha256sum | gawk 'BEGIN { print "dir shasum file"} $2 ~ /i686/ { print "win32 " $0 } $2 ~ /x86_64/ { print "win64 " $0 } $2 ~ /[a-z]+-[0-9]/ { print "src " $0 }') echo -e "$description\n\n$sums" touch work/$1.finished ;; ticket) ## submit phabricator ticket description=$($0 createdescription) curl $PHABURL/api/maniphest.createtask \ -d api.token=$apitoken \ -d "title=tarball move request for stable/$NAME/$VERSION" \ -d "description=$description" \ -d "$options" touch work/$1.finished ;; sf) ## run all required targets for releasing on sourceforge $self clean $self download $self unpack $self movepackage $self repacksource $self createsha echo "All release related files are located in work/out" ls work/out touch work/$1.finished ;; kde) ## run all required targets for releasing on download.kde.org $self clean $self download $self unpack $self movepackage $self repacksource $self createsha $self upload echo2 "Content for ticket creating:" $self createdescription echo2 run "$self ticket" to submit ticket touch work/$1.finished ;; *) echo2 "Make sure to setup VERSION inside $0 and run" echo2 "$0 all" echo2 echo2 "or run single targets" echo2 gawk '$0 ~ /^[a-z].*) ##/ { sub(/) ##/,"",$0); a = $1; $1 = ""; printf(" %-20s - %s\n",a, $0); }' $0 >&2 ;; esac exit 0