Skip to content

Commit

Permalink
src:Add version.txt and update build scripts to use
Browse files Browse the repository at this point in the history
version number

Signed-off-by: xiaoming <[email protected]>
  • Loading branch information
QQxiaoming committed Nov 7, 2023
1 parent 3334e1d commit f7856b6
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 26 deletions.
8 changes: 2 additions & 6 deletions QFSViewer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
# QFSViewer 工程文件 #
# #
###############################################################################
win32:{
include(partform_win32.pri)
}

unix:{
include(partform_unix.pri)
}
# 定义版本号路径
QFSVIEWER_VERSION="$$cat(./version.txt)"

###############################################################################
# 定义需要的Qt组件
Expand Down
9 changes: 4 additions & 5 deletions build_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
###############################################################################
# 定义Qt目录
QT_DIR=/opt/Qt6.2.0/6.2.0/gcc_64

# 定义版本号
QFSVIEWER_MAJARVERSION="0"
QFSVIEWER_SUBVERSION="1"
QFSVIEWER_REVISION="2"
###############################################################################


###############################################################################
# 定义版本号
QFSVIEWER_MAJARVERSION=$(< ./version.txt cut -d '.' -f 1)
QFSVIEWER_SUBVERSION=$(< ./version.txt cut -d '.' -f 2)
QFSVIEWER_REVISION=$(< ./version.txt cut -d '.' -f 3)
export PATH=$QT_DIR/bin:$PATH
export LD_LIBRARY_PATH=$QT_DIR/lib:$LD_LIBRARY_PATH
export QT_PLUGIN_PATH=$QT_DIR/plugins
Expand Down
9 changes: 4 additions & 5 deletions build_dmg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
###############################################################################
# 定义Qt目录
QT_DIR=/opt/Qt6.2.0/6.2.0/gcc_64

# 定义版本号
QFSVIEWER_MAJARVERSION="0"
QFSVIEWER_SUBVERSION="1"
QFSVIEWER_REVISION="2"
###############################################################################


###############################################################################
# 定义版本号
QFSVIEWER_MAJARVERSION=$(< ./version.txt cut -d '.' -f 1)
QFSVIEWER_SUBVERSION=$(< ./version.txt cut -d '.' -f 2)
QFSVIEWER_REVISION=$(< ./version.txt cut -d '.' -f 3)
export PATH=$QT_DIR/bin:$PATH
export LD_LIBRARY_PATH=$QT_DIR/lib:$LD_LIBRARY_PATH
export QT_PLUGIN_PATH=$QT_DIR/plugins
Expand Down
4 changes: 2 additions & 2 deletions build_setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ set "QT_DIR=C:/Qt/Qt6.2.0/6.2.0/mingw81_32/bin"
set "QT_TOOLS_DIR=C:/Qt/Qt6.2.0/Tools/mingw810_32/bin"
:: 定义Inno Setup目录
set "INNO_SETUP_DIR=C:/Program Files (x86)/Inno Setup 6"
:: 定义版本号
set "QFSVIEWER_VERSION=0.1.2"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: 定义版本号
set /p QFSVIEWER_VERSION=<version.txt
:: 设置环境变量
set "PATH=%QT_DIR%;%QT_TOOLS_DIR%;%INNO_SETUP_DIR%;%PATH%"
:: 编译
Expand Down
4 changes: 0 additions & 4 deletions partform_unix.pri

This file was deleted.

4 changes: 0 additions & 4 deletions partform_win32.pri

This file was deleted.

1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.2

0 comments on commit f7856b6

Please sign in to comment.