Rename app from ScreenLockDemo to ScreenLockDetector
This commit is contained in:
parent
bca2b3d908
commit
9248f3945d
14
make_deb.sh
14
make_deb.sh
|
|
@ -10,8 +10,8 @@ BLUE='\033[0;34m'
|
|||
NC='\033[0m' # No Color
|
||||
|
||||
# 配置变量
|
||||
APP_NAME="ScreenLockDemo"
|
||||
PACKAGE_NAME="screenlockdemo"
|
||||
APP_NAME="ScreenLockDetector"
|
||||
PACKAGE_NAME="ScreenLockDetector"
|
||||
VERSION="1.0.0"
|
||||
ARCH="amd64"
|
||||
QT_DIR="$HOME/sdk/qt-5.15.2"
|
||||
|
|
@ -80,7 +80,7 @@ else
|
|||
fi
|
||||
|
||||
# 复制 desktop 文件
|
||||
cp screenlockdemo.desktop "${APPDIR}/usr/share/applications/"
|
||||
cp screenlockdetector.desktop "${APPDIR}/usr/share/applications/"
|
||||
|
||||
echo -e "${GREEN}✓ AppDir 结构创建完成${NC}"
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||
APP_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
export LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib64:${APP_DIR}/lib:$LD_LIBRARY_PATH"
|
||||
export QT_PLUGIN_PATH="${APP_DIR}/plugins"
|
||||
exec "${SCRIPT_DIR}/ScreenLockDemo" "$@"
|
||||
exec "${SCRIPT_DIR}/ScreenLockDetector" "$@"
|
||||
EOF
|
||||
|
||||
chmod +x "${DEB_DIR}/opt/${PACKAGE_NAME}/bin/${APP_NAME}.sh"
|
||||
|
|
@ -138,13 +138,13 @@ chmod +x "${DEB_DIR}/opt/${PACKAGE_NAME}/bin/${APP_NAME}.sh"
|
|||
# 创建 /usr/bin 软链接
|
||||
cat > "${DEB_DIR}/usr/bin/${PACKAGE_NAME}" << 'EOF'
|
||||
#!/bin/bash
|
||||
exec /opt/screenlockdemo/bin/ScreenLockDemo.sh "$@"
|
||||
exec /opt/ScreenLockDetector/bin/ScreenLockDetector.sh "$@"
|
||||
EOF
|
||||
|
||||
chmod +x "${DEB_DIR}/usr/bin/${PACKAGE_NAME}"
|
||||
|
||||
# 复制 desktop 文件和图标
|
||||
sed "s|Exec=.*|Exec=/usr/bin/${PACKAGE_NAME}|g" screenlockdemo.desktop > "${DEB_DIR}/usr/share/applications/${PACKAGE_NAME}.desktop"
|
||||
sed "s|Exec=.*|Exec=/usr/bin/${PACKAGE_NAME}|g" screenlockdetector.desktop > "${DEB_DIR}/usr/share/applications/${PACKAGE_NAME}.desktop"
|
||||
sed -i "s|Icon=.*|Icon=${PACKAGE_NAME}|g" "${DEB_DIR}/usr/share/applications/${PACKAGE_NAME}.desktop"
|
||||
|
||||
if [ -f "${APPDIR}/usr/share/icons/hicolor/256x256/apps/${PACKAGE_NAME}.png" ]; then
|
||||
|
|
@ -203,7 +203,7 @@ if [ -x /usr/bin/gtk-update-icon-cache ]; then
|
|||
fi
|
||||
|
||||
echo "Screen Lock Demo 安装完成!"
|
||||
echo "可以通过命令 'screenlockdemo' 启动,或在应用程序菜单中找到它。"
|
||||
echo "可以通过命令 'ScreenLockDetector' 启动,或在应用程序菜单中找到它。"
|
||||
|
||||
exit 0
|
||||
EOF
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
usr/bin/ScreenLockDemo
|
||||
usr/bin/ScreenLockDetector
|
||||
4
run.sh
4
run.sh
|
|
@ -25,7 +25,7 @@ if [ ! -d "$BUILD_DIR" ]; then
|
|||
fi
|
||||
|
||||
# Check if executable exists
|
||||
EXECUTABLE="$BUILD_DIR/bin/ScreenLockDemo"
|
||||
EXECUTABLE="$BUILD_DIR/bin/ScreenLockDetector"
|
||||
if [ ! -f "$EXECUTABLE" ]; then
|
||||
echo -e "${RED}Error: Executable not found at $EXECUTABLE${NC}"
|
||||
echo "Please run ./build.sh first to compile the application"
|
||||
|
|
@ -52,7 +52,7 @@ export LD_LIBRARY_PATH="$QT5_DIR/lib:/usr/local/lib64:/usr/local/lib:$LD_LIBRARY
|
|||
|
||||
# Run the application
|
||||
cd "$BUILD_DIR/bin"
|
||||
./ScreenLockDemo
|
||||
./ScreenLockDetector
|
||||
|
||||
echo ""
|
||||
echo "========================================"
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=Screen Lock Demo
|
||||
Comment=Qt Screen Lock Detection Demo Application
|
||||
Exec=/opt/screenlockdemo/bin/ScreenLockDemo
|
||||
Icon=/opt/screenlockdemo/share/icons/screenlockdemo.png
|
||||
Terminal=false
|
||||
Categories=Utility;Qt;
|
||||
Keywords=screen;lock;detection;qt;demo;
|
||||
StartupNotify=true
|
||||
|
|
@ -3,8 +3,8 @@ Version=1.0
|
|||
Type=Application
|
||||
Name=Screen Lock Demo
|
||||
Comment=Qt Screen Lock Detection Demo Application
|
||||
Exec=/opt/screenlockdemo/bin/ScreenLockDemo
|
||||
Icon=/opt/screenlockdemo/share/icons/screenlockdemo.png
|
||||
Exec=/opt/screenlockdetector/bin/ScreenLockDetector
|
||||
Icon=/opt/screenlockdetector/share/icons/screenlockdetector.png
|
||||
Terminal=false
|
||||
Categories=Utility;Qt;
|
||||
Keywords=screen;lock;detection;qt;demo;
|
||||
Loading…
Reference in New Issue