Skip to content

Commit bf45248

Browse files
committed
v1.1.1.2:optimize cmake scripts for linux
1 parent 643feab commit bf45248

File tree

10 files changed

+31
-13
lines changed

10 files changed

+31
-13
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## [2025.04.06] - v1.1.1.2
2+
### [Optimize] cmake scripts for linux
13

24
## [2025.04.05] - v1.1.1.1
35
### [Optimize] windows package section and doc

app/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ message("CMAKE_TOOLCHAIN_ROOT = ${CMAKE_TOOLCHAIN_ROOT} ")
2323
message("include(${CMAKE_TOOLCHAIN_ROOT}/cmake-core/global.cmake) ")
2424

2525

26-
project(${PROJECT_NAME} VERSION 1.1.1.1)
26+
project(${PROJECT_NAME} VERSION 1.1.1.2)
2727
# set(CMAKE_DEBUG_POSTFIX d)
2828
set(LIB_TYPE SHARED) # SHARED STATIC
2929
# set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

app/doc/build.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* build osx lib: `sh $HOME/Desktop/DevAssistant/app/run_unix.sh build`
3131
- 2-Linux:
3232
* Setup-env:
33-
* Ubuntu/Debian: `bash /opt/shared_dir/DevAssistant/tools/env-apt.sh`
33+
* Ubuntu/OpenKylin2.0: `bash /opt/shared_dir/DevAssistant/tools/env-apt.sh`
3434
* Run way1:
3535
* `sed -i 's/\r//' /opt/shared_dir/DevAssistant/app/run_unix.sh && bash /opt/shared_dir/DevAssistant/app/run_unix.sh`
3636
* Run way2:
@@ -65,7 +65,7 @@
6565
* `sh $HOME/Desktop/DevAssistant/app/run_android.sh`
6666
- 2-Linux:
6767
* Setup-env:
68-
* Ubuntu/Debian: `bash /opt/shared_dir/DevAssistant/tools/env-apt.sh`
68+
* Ubuntu/OpenKylin2.0: `bash /opt/shared_dir/DevAssistant/tools/env-apt.sh`
6969
* Run way1:
7070
* `sed -i 's/\r//' /opt/shared_dir/DevAssistant/app/run_android.sh && bash /opt/shared_dir/DevAssistant/app/run_android.sh`
7171
* Run way2:

app/pkg-win-nsis.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ start /wait %QT_HOME%\bin\windeployqt.exe -qmldir %QT_HOME%/qml %BIN_DIR%\%PROJ_
2121

2222
call %SCRIPT_DIR%\vs-env.bat
2323

24-
set VERSION="1.1.1.1"
24+
set VERSION="1.1.1.2"
2525
echo packaging %VERSION% for "x64"
2626
makensis /INPUTCHARSET UTF8 /DPRODUCT_NAME=%PROJ_NAME% /DPRODUCT_VERSION=%VERSION% /DOS_ARCH="x64" %SCRIPT_DIR%/pkg-win-nsis.nsi
2727
echo packaging %VERSION% for "x86"

app/run_unix.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ else # Linux
4646
if [[ `uname` == "Linux" ]]; then
4747
if [[ -f "/etc/redhat-release" ]]; then # Redhat / CentOS
4848
LINUX_OS="CentOS"
49-
elif [[ -f "/etc/lsb-release" ]]; then # Ubuntu / Debian
49+
elif [[ -f "/etc/lsb-release" ]]; then # Ubuntu / OpenKylin2.0
5050
LINUX_OS="Ubuntu"
5151
fi
5252
fi

app/scripts/cmake/cmake-qt/qt_libs.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ if(WITH_QT)
8585
# CentOS
8686
SET(QT_INC_HOME /usr/include/qt5)
8787
SET(QT_LIB_HOME /usr/lib64)
88-
# Ubuntu
88+
# Ubuntu / OpenKylin2.0
8989
if("${LINUX_OS}" STREQUAL "Ubuntu")
9090
SET(QT_INC_HOME /usr/include/x86_64-linux-gnu/qt5)
9191
SET(QT_LIB_HOME /usr/lib/x86_64-linux-gnu)

app/src/qtmodules/QtHelp/QDAHelpDialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ void QDAHelpDialog::OnHelpShow()
3030
void QDAHelpDialog::OnShowVersion()
3131
{
3232
std::string version = u8R"(
33-
版本号(Version) : v1.1.1.1
33+
版本号(Version) : v1.1.1.2
3434
35-
日期(Date) : 2025/03/27
35+
日期(Date) : 2025/04/06
3636
)";
3737
QMessageBox::information(NULL, QStringLiteral("Version"), QString::fromStdString(version));
3838
}

plugins/project/project/build/run_unix.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ else # Linux
4646
if [[ `uname` == "Linux" ]]; then
4747
if [[ -f "/etc/redhat-release" ]]; then # Redhat / CentOS
4848
LINUX_OS="CentOS"
49-
elif [[ -f "/etc/lsb-release" ]]; then # Ubuntu / Debian
49+
elif [[ -f "/etc/lsb-release" ]]; then # Ubuntu / OpenKylin2.0
5050
LINUX_OS="Ubuntu"
5151
fi
5252
fi

plugins/project/project/template/CMakeLists.txt.PROJ

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,17 @@ if(WIN)
5454
elseif(LINUX)
5555
set(OS_TYPE "linux")
5656
add_definitions(-DLINUX)
57-
set(CMAKE_PREFIX_PATH "/usr/lib64/cmake/Qt5")
57+
58+
if("${LINUX_OS}" STREQUAL "CentOS")
59+
set(CMAKE_PREFIX_PATH "/usr/lib64/cmake/Qt5")
60+
elseif("${LINUX_OS}" STREQUAL "Ubuntu")
61+
set(CMAKE_PREFIX_PATH "/usr/lib/x86_64-linux-gnu/cmake")
62+
endif(LINUX_OS)
63+
message("CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
64+
65+
if(WITH_QT)
66+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
67+
endif(WITH_QT)
5868

5969
elseif(OSX)
6070
set(APPLE ON)

tools/env-apt.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
2-
# satrt docker:
2+
# Support OS: ubuntu/OpenKylin2.0
3+
# start docker:
34
# Windows: docker run -it -d --shm-size=2g --network=host -v D:\Research:/opt/shared_dir ubuntu2204:v1.0 /bin/bash
45
# Linux: docker run -it -d --shm-size=2g --network=host -v $HOME/dockers/shared_dir:/opt/shared_dir ubuntu2204-dev-v1.0 --privileged ubuntu2204:v1.0 /bin/bash
56
# docker exec -it a3822da6accba9625129bc63c9fe0001367a7282a7eda0d50783ab90e75c7513 /bin/bash
@@ -11,6 +12,11 @@
1112

1213
# echo color: https://www.cnblogs.com/unclemac/p/12783387.html
1314

15+
# vmware load shared dir:
16+
# temp: sudo mkdir /mnt/hgfs && sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
17+
# forever: vim /etc/fstab
18+
# add info: .host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other, defaults 0 0
19+
1420
OS=`uname`
1521
ANDROID_SDK_HOME="/usr/lib/android-sdk"
1622
ANDROID_NDK_HOME="$ANDROID_SDK_HOME/ndk"
@@ -107,7 +113,7 @@ function android_ndk() {
107113
setup_source
108114
setup_cert
109115
setup_soft
110-
setup_pip
116+
# setup_pip
111117
java_env
112118
android_sdk
113-
android_ndk
119+
android_ndk

0 commit comments

Comments
 (0)