From 660174e01140a84aa518c30032a26deead212728 Mon Sep 17 00:00:00 2001 From: KangLin Date: Thu, 18 Apr 2019 18:43:19 +0800 Subject: [PATCH] Release v0.0.3 --- App/App.pro | 204 ++++++++++++++++++++++---------------------- App/MainWindow.cpp | 2 +- CMakeLists.txt | 2 +- Install/Install.nsi | 2 +- appveyor.yml | 2 +- tag.sh | 1 + 6 files changed, 107 insertions(+), 106 deletions(-) diff --git a/App/App.pro b/App/App.pro index 15fceab1..fcd1dde9 100644 --- a/App/App.pro +++ b/App/App.pro @@ -1,102 +1,102 @@ -TARGET = LunarCalendarApp -TEMPLATE = app - -QT += core gui -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - - -#Get app version use git, please set git path to environment variable PATH -isEmpty(BUILD_VERSION) { - isEmpty(GIT) : GIT=$$(GIT) - isEmpty(GIT) : GIT=git - isEmpty(GIT_DESCRIBE) { - GIT_DESCRIBE = $$system(cd $$system_path($$_PRO_FILE_PWD_) && $$GIT describe --tags) - isEmpty(BUILD_VERSION) { - BUILD_VERSION = $$GIT_DESCRIBE - } - } - isEmpty(BUILD_VERSION) { - BUILD_VERSION = $$system(cd $$system_path($$_PRO_FILE_PWD_) && $$GIT rev-parse --short HEAD) - } - - isEmpty(BUILD_VERSION){ - warning("Built without git, please add BUILD_VERSION to DEFINES or add git path to environment variable GIT or qmake parameter GIT") - } -} -isEmpty(BUILD_VERSION){ - BUILD_VERSION="v0.0.1" -} -message("BUILD_VERSION:$$BUILD_VERSION") -DEFINES += BUILD_VERSION=\"\\\"$$quote($$BUILD_VERSION)\\\"\" - -msvc { - QMAKE_CXXFLAGS += "/utf-8" - QMAKE_LFLAGS *= /SUBSYSTEM:WINDOWS",5.01" -} - -INCLUDEPATH = ../Src ../Src/export - -!android: DESTDIR = $$OUT_PWD/../bin - -SOURCES += \ - main.cpp \ - MainWindow.cpp - -HEADERS += \ - MainWindow.h - -FORMS += \ - MainWindow.ui - -RESOURCES += \ - Resource/Resource.qrc - -RC_FILE = AppIcon.rc - -android { - LIBS *= "-L$$OUT_PWD/../Src" -} else { - LIBS *= "-L$$DESTDIR" -} -LIBS *= -lLunarCalendar - -isEmpty(PREFIX) { - qnx : PREFIX = /tmp - else : android : PREFIX = /. - else : unnix : PREFIX = /usr/local - else : PREFIX = $$OUT_PWD/../install -} - -win32 { - INSTALL_TARGET = $$system_path($${DESTDIR}/$(TARGET)) - - Deployment_qtlib.target = Deployment_qtlib - Deployment_qtlib.files = $$system_path($${DESTDIR}/) - Deployment_qtlib.path = $$system_path($${PREFIX}) - Deployment_qtlib.commands = "$$system_path($$[QT_INSTALL_BINS]/windeployqt)" \ - --compiler-runtime \ - --verbose 7 \ - "$${INSTALL_TARGET}" - INSTALLS += Deployment_qtlib -} else { - # Default rules for deployment. - !android: target.path = $${PREFIX}/bin - !isEmpty(target.path): INSTALLS += target -} - -OTHER_FILES += \ - CMakeLists.txt \ - AppIcon.rc - -include(../pri/Translations.pri) - -isEmpty(RabbitCommon_DIR): RabbitCommon_DIR=$$(RabbitCommon_DIR) -!isEmpty(RabbitCommon_DIR): exists("$${RabbitCommon_DIR}/Src/RabbitCommon.pri"){ - DEFINES += RABBITCOMMON - include("$${RabbitCommon_DIR}/Src/RabbitCommon.pri") -} else{ - message("RabbitCommon_DIR:$$RabbitCommon_DIR") - message("1. Please download RabbitCommon source code from https://github.com/KangLin/RabbitCommon ag:") - message(" git clone https://github.com/KangLin/RabbitCommon.git") - error ("2. Then set value RabbitCommon_DIR to download root dirctory") -} +TARGET = LunarCalendarApp +TEMPLATE = app + +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + + +#Get app version use git, please set git path to environment variable PATH +isEmpty(BUILD_VERSION) { + isEmpty(GIT) : GIT=$$(GIT) + isEmpty(GIT) : GIT=git + isEmpty(GIT_DESCRIBE) { + GIT_DESCRIBE = $$system(cd $$system_path($$_PRO_FILE_PWD_) && $$GIT describe --tags) + isEmpty(BUILD_VERSION) { + BUILD_VERSION = $$GIT_DESCRIBE + } + } + isEmpty(BUILD_VERSION) { + BUILD_VERSION = $$system(cd $$system_path($$_PRO_FILE_PWD_) && $$GIT rev-parse --short HEAD) + } + + isEmpty(BUILD_VERSION){ + warning("Built without git, please add BUILD_VERSION to DEFINES or add git path to environment variable GIT or qmake parameter GIT") + } +} +isEmpty(BUILD_VERSION){ + BUILD_VERSION="v0.0.3" +} +message("BUILD_VERSION:$$BUILD_VERSION") +DEFINES += BUILD_VERSION=\"\\\"$$quote($$BUILD_VERSION)\\\"\" + +msvc { + QMAKE_CXXFLAGS += "/utf-8" + QMAKE_LFLAGS *= /SUBSYSTEM:WINDOWS",5.01" +} + +INCLUDEPATH = ../Src ../Src/export + +!android: DESTDIR = $$OUT_PWD/../bin + +SOURCES += \ + main.cpp \ + MainWindow.cpp + +HEADERS += \ + MainWindow.h + +FORMS += \ + MainWindow.ui + +RESOURCES += \ + Resource/Resource.qrc + +RC_FILE = AppIcon.rc + +android { + LIBS *= "-L$$OUT_PWD/../Src" +} else { + LIBS *= "-L$$DESTDIR" +} +LIBS *= -lLunarCalendar + +isEmpty(PREFIX) { + qnx : PREFIX = /tmp + else : android : PREFIX = /. + else : unnix : PREFIX = /usr/local + else : PREFIX = $$OUT_PWD/../install +} + +win32 { + INSTALL_TARGET = $$system_path($${DESTDIR}/$(TARGET)) + + Deployment_qtlib.target = Deployment_qtlib + Deployment_qtlib.files = $$system_path($${DESTDIR}/) + Deployment_qtlib.path = $$system_path($${PREFIX}) + Deployment_qtlib.commands = "$$system_path($$[QT_INSTALL_BINS]/windeployqt)" \ + --compiler-runtime \ + --verbose 7 \ + "$${INSTALL_TARGET}" + INSTALLS += Deployment_qtlib +} else { + # Default rules for deployment. + !android: target.path = $${PREFIX}/bin + !isEmpty(target.path): INSTALLS += target +} + +OTHER_FILES += \ + CMakeLists.txt \ + AppIcon.rc + +include(../pri/Translations.pri) + +isEmpty(RabbitCommon_DIR): RabbitCommon_DIR=$$(RabbitCommon_DIR) +!isEmpty(RabbitCommon_DIR): exists("$${RabbitCommon_DIR}/Src/RabbitCommon.pri"){ + DEFINES += RABBITCOMMON + include("$${RabbitCommon_DIR}/Src/RabbitCommon.pri") +} else{ + message("RabbitCommon_DIR:$$RabbitCommon_DIR") + message("1. Please download RabbitCommon source code from https://github.com/KangLin/RabbitCommon ag:") + message(" git clone https://github.com/KangLin/RabbitCommon.git") + error ("2. Then set value RabbitCommon_DIR to download root dirctory") +} diff --git a/App/MainWindow.cpp b/App/MainWindow.cpp index 44993e3f..a958dcdf 100644 --- a/App/MainWindow.cpp +++ b/App/MainWindow.cpp @@ -50,7 +50,7 @@ MainWindow::MainWindow(QWidget *parent) : // m_pLunarCalendar->SetShowTools(false); // m_pLunarCalendar->SetSelectedDate(QDate::currentDate()); // m_pLunarCalendar->SetShowGrid(true); - m_pLunarCalendar->SetDateRange(QDate(2002, 12, 30), QDate(2003, 2, 1)); + //m_pLunarCalendar->SetDateRange(QDate(2002, 12, 30), QDate(2003, 2, 1)); // m_pLunarCalendar->GenerateCalendarTable(qApp->applicationDirPath() + QDir::separator() + "cache.dat"); // m_pLunarCalendar->LoadCalendarTable(qApp->applicationDirPath() + QDir::separator() + "cache.dat"); // m_pLunarCalendar->SetShowWeekHead(false); diff --git a/CMakeLists.txt b/CMakeLists.txt index ddc8a7d3..21034aa3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ CONFIGURE_FILE( ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake") -SET(BUILD_VERSION "v0.0.2-8-gc84abd9") +SET(BUILD_VERSION "v0.0.3") # Find Git Version Patch IF(EXISTS "${CMAKE_SOURCE_DIR}/.git") if(NOT GIT) diff --git a/Install/Install.nsi b/Install/Install.nsi index be972b50..3bad66d8 100644 --- a/Install/Install.nsi +++ b/Install/Install.nsi @@ -3,7 +3,7 @@ ; HM NIS Edit Wizard helper defines !define PRODUCT_NAME "LunarCalendar" !define PRODUCT_APP_NAME "LunarCalendarApp" -!define PRODUCT_VERSION "v0.0.2-8-gc84abd9" +!define PRODUCT_VERSION "v0.0.3" !define PRODUCT_PUBLISHER "KangLin studio" !define PRODUCT_WEB_SITE "https://github.com/KangLin/${PRODUCT_NAME}" !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_NAME}.exe" diff --git a/appveyor.yml b/appveyor.yml index 3c25db4b..0eba0a1b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ #TODO: Change version -version: 'v0.0.2-8-gc84abd9.{build}' +version: 'v0.0.3.{build}' environment: matrix: diff --git a/tag.sh b/tag.sh index fe72d50f..8a21438b 100644 --- a/tag.sh +++ b/tag.sh @@ -30,6 +30,7 @@ sed -i "s/^\SET(BUILD_VERSION.*/\SET(BUILD_VERSION \"${VERSION}\")/g" ${SOURCE_D sed -i "s/^\!define PRODUCT_VERSION.*/\!define PRODUCT_VERSION \"${VERSION}\"/g" ${SOURCE_DIR}/Install/Install.nsi APPVERYOR_VERSION="version: '${VERSION}.{build}'" sed -i "s/^version: '.*{build}'/${APPVERYOR_VERSION}/g" ${SOURCE_DIR}/appveyor.yml +sed -i "s/^\ BUILD_VERSION=.*/\ BUILD_VERSION=\"${VERSION}\"/g" ${SOURCE_DIR}/App/App.pro if [ -n "$1" ]; then git add .