From 3c2c5ae9d9e9abe4fc24e6dd0e2a89304eea7f0b Mon Sep 17 00:00:00 2001 From: xiaoming <2014500726@smail.xtu.edu.cn> Date: Wed, 8 Nov 2023 01:50:02 +0800 Subject: [PATCH] release: update V0.2.7 Signed-off-by: xiaoming <2014500726@smail.xtu.edu.cn> --- TTFviewer.pro | 3 +++ build_deb.sh | 9 ++++----- build_dmg.sh | 9 ++++----- build_setup.bat | 4 ++-- lang/ttfviewer_en_US.ts | 8 ++++++++ lang/ttfviewer_ja_JP.ts | 8 ++++++++ lang/ttfviewer_zh_CN.ts | 8 ++++++++ partform_unix.pri | 2 -- partform_win32.pri | 2 -- src/ImgViewer.cpp | 2 +- version.txt | 1 + 11 files changed, 39 insertions(+), 17 deletions(-) create mode 100644 version.txt diff --git a/TTFviewer.pro b/TTFviewer.pro index 3c66cca..e75345b 100644 --- a/TTFviewer.pro +++ b/TTFviewer.pro @@ -11,6 +11,9 @@ unix:{ include(partform_unix.pri) } +# 定义版本号路径 +TTFVIEWER_VERSION="$$cat(./version.txt)" + ############################################################################### # 定义需要的Qt组件 QT += core gui diff --git a/build_deb.sh b/build_deb.sh index 9e8028a..90f07a5 100755 --- a/build_deb.sh +++ b/build_deb.sh @@ -3,15 +3,14 @@ ############################################################################### # 定义Qt目录 QT_DIR=/opt/Qt6.2.0/6.2.0/gcc_64 - -# 定义版本号 -TTFVIEWER_MAJARVERSION="0" -TTFVIEWER_SUBVERSION="2" -TTFVIEWER_REVISION="6" ############################################################################### ############################################################################### +# 定义版本号 +TTFVIEWER_MAJARVERSION=$(< ./version.txt cut -d '.' -f 1) +TTFVIEWER_SUBVERSION=$(< ./version.txt cut -d '.' -f 2) +TTFVIEWER_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 diff --git a/build_dmg.sh b/build_dmg.sh index 71ba542..75ea880 100755 --- a/build_dmg.sh +++ b/build_dmg.sh @@ -3,15 +3,14 @@ ############################################################################### # 定义Qt目录 QT_DIR=/opt/Qt6.2.0/6.2.0/gcc_64 - -# 定义版本号 -TTFVIEWER_MAJARVERSION="0" -TTFVIEWER_SUBVERSION="2" -TTFVIEWER_REVISION="6" ############################################################################### ############################################################################### +# 定义版本号 +TTFVIEWER_MAJARVERSION=$(< ./version.txt cut -d '.' -f 1) +TTFVIEWER_SUBVERSION=$(< ./version.txt cut -d '.' -f 2) +TTFVIEWER_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 diff --git a/build_setup.bat b/build_setup.bat index 0bcd840..50963fc 100644 --- a/build_setup.bat +++ b/build_setup.bat @@ -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 "TTFVIEWER_VERSION=0.2.6" ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: 定义版本号 +set /p TTFVIEWER_VERSION= + + ImgViewer + + + Save File + + + ImgViewerWindow diff --git a/lang/ttfviewer_ja_JP.ts b/lang/ttfviewer_ja_JP.ts index 94caefe..f639220 100644 --- a/lang/ttfviewer_ja_JP.ts +++ b/lang/ttfviewer_ja_JP.ts @@ -1,6 +1,14 @@ + + ImgViewer + + + Save File + ファイルを保存する + + ImgViewerWindow diff --git a/lang/ttfviewer_zh_CN.ts b/lang/ttfviewer_zh_CN.ts index 47c580c..c620ed0 100644 --- a/lang/ttfviewer_zh_CN.ts +++ b/lang/ttfviewer_zh_CN.ts @@ -1,6 +1,14 @@ + + ImgViewer + + + Save File + 保存文件 + + ImgViewerWindow diff --git a/partform_unix.pri b/partform_unix.pri index 97202dd..9a73d9e 100644 --- a/partform_unix.pri +++ b/partform_unix.pri @@ -1,6 +1,4 @@ ############################################################################### # 定义freetype2 lib路径 FREETPE2_DIR=/home/qqm/Desktop/ttfviewer/depend/freetype -# 定义版本号路径 -TTFVIEWER_VERSION=0.2.6 ############################################################################### diff --git a/partform_win32.pri b/partform_win32.pri index 7b3ae5d..13279e5 100644 --- a/partform_win32.pri +++ b/partform_win32.pri @@ -1,6 +1,4 @@ ############################################################################### # 定义freetype2 lib路径 FREETPE2_DIR=D:\ttfviewer\depend\freetype -# 定义版本号路径 -TTFVIEWER_VERSION=0.2.6 ############################################################################### diff --git a/src/ImgViewer.cpp b/src/ImgViewer.cpp index df12bc1..1d6e439 100644 --- a/src/ImgViewer.cpp +++ b/src/ImgViewer.cpp @@ -245,7 +245,7 @@ void ImgViewer::mouseDoubleClickEvent(QMouseEvent *event) { int list_index = this->img_list.indexOf(this->currentImg_RGB_list); QList img_RGB_list = this->img_list[list_index]; int img_index = img_RGB_list.indexOf(this->currentImg); - QString savefile_name = FileDialog::getSaveFileName( this, "保存文件", + QString savefile_name = FileDialog::getSaveFileName( this, tr("Save File"), this->filelist[list_index].replace(".ttf","-") + "0x" + QString::number(this->currentImg.codepoint, 16) + "-" + QString::number(img_index) + ".svg", diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..967b33f --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +0.2.7 \ No newline at end of file