Skip to content

Commit

Permalink
Release v0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Apr 18, 2019
1 parent 163a291 commit 660174e
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 106 deletions.
204 changes: 102 additions & 102 deletions App/App.pro
Original file line number Diff line number Diff line change
@@ -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")
}
2 changes: 1 addition & 1 deletion App/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Install/Install.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#TODO: Change version
version: 'v0.0.2-8-gc84abd9.{build}'
version: 'v0.0.3.{build}'

environment:
matrix:
Expand Down
1 change: 1 addition & 0 deletions tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down

0 comments on commit 660174e

Please sign in to comment.