-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[更新安装程序和打包脚本]: 主要更新了CMake的workflow,改进了macOS和Ubuntu的打包过程,增加了Windows平台的…
…打包支持。 - 更新了`.github/workflows/cmake.yml`文件,移除了7z打包步骤,改为检查包内容并上传。 - 修改了`.gitignore`文件,增加了对打包目录的忽略。 - 新增了macOS打包相关的`distribution.xml`,提供了安装向导的配置。 - 更新了macOS的`package.sh`脚本,增加了7z和pkg打包方式,并删除了排除文件的处理。 - 新增了macOS安装完成和欢迎页面的HTML文件。 - 新增了macOS的`preinstall`和`postinstall`脚本,处理应用的启动和结束。 - 新增了macOS的`utils.sh`脚本,提供了文件删除和Plist处理功能。 - 新增了Ubuntu的`DEBIAN`控制文件,配置了包信息和依赖。 - 更新了Ubuntu的`postinst`、`postrm`、`preinst`和`prerm`脚本,处理了应用权限和删除操作。 - 更新了Ubuntu的`Qt-App.desktop`和`Qt-App.sh`文件,配置了桌面条目和启动脚本。 - 新增了Windows平台的Inno Setup语言文件`ChineseSimplified.isl`,提供了简体中文翻译。 - 新增了Windows平台的安装脚本`app.iss`,配置了安装过程和参数。 - 更新了Windows平台的打包PowerShell脚本`package.ps1`,增加了7z打包和Inno Setup编译命令。
- Loading branch information
Showing
21 changed files
with
772 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,3 +92,5 @@ tags | |
.vscode | ||
bin-* | ||
build | ||
packet | ||
releases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="no"?> | ||
<installer-gui-script minSpecVersion="1"> | ||
<title>Qt-App</title> | ||
<organization>org.youth</organization> | ||
<domains enable_localSystem="true"/> | ||
<options customize="never" require-scripts="true" rootVolumeOnly="true" /> | ||
<!-- Define documents displayed at various steps --> | ||
<welcome file="welcome.html" mime-type="text/html" /> | ||
<conclusion file="conclusion.html" mime-type="text/html" /> | ||
<!-- List all component packages --> | ||
<pkg-ref id="org.qt-app.client" | ||
version="0" | ||
auth="root">tmp.pkg</pkg-ref> | ||
<!-- List them again here. They can now be organized | ||
as a hierarchy if you want. --> | ||
<choices-outline> | ||
<line choice="default"> | ||
<line choice="org.qt-app.client"/> | ||
</line> | ||
</choices-outline> | ||
<!-- Define each choice above --> | ||
<choice id="default"/> | ||
<choice | ||
id="org.qt-app.client" | ||
visible="true" | ||
title="Qt-App" | ||
description="A qt Application template" | ||
start_selected="true"> | ||
<pkg-ref id="org.qt-app.client"/> | ||
</choice> | ||
</installer-gui-script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The Qt-App has been successfully installed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Welcome to the installation of Qt-App 0.1.1. Please press continue to proceed with the installation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh -ex | ||
|
||
echo "Postinstall script is not implemented for macOS." | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh -ex | ||
|
||
echo "Preinstall script is not implemented for macOS." | ||
|
||
sudo killall -9 Qt-App || true | ||
sudo killall -9 CrashReport || true | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash -ex | ||
|
||
delete_file_or_dir() { | ||
local target=$1 | ||
|
||
if [ -e "$target" ]; then | ||
if [ -d "$target" ]; then | ||
rm -rf "$target" | ||
echo "Directory deleted: $target" | ||
else | ||
rm -f "$target" | ||
echo "File deleted: $target" | ||
fi | ||
else | ||
echo "Error: $target does not exist." | ||
fi | ||
} | ||
|
||
process_plist() { | ||
local plist_path="$1" | ||
|
||
if [ -z "$plist_path" ]; then | ||
echo "Error: Plist file path is not provided." | ||
return 1 | ||
fi | ||
|
||
if [ ! -f "$plist_path" ]; then | ||
echo "Error: Plist file does not exist at path: $plist_path" | ||
return 1 | ||
fi | ||
|
||
echo "Converting plist to XML format..." | ||
plutil -convert xml1 "$plist_path" 2>/dev/null | ||
|
||
echo "Linting plist file..." | ||
plutil -lint "$plist_path" 2>/dev/null | ||
|
||
if [ $? -eq 0 ]; then | ||
echo "Plist file processed successfully." | ||
else | ||
echo "Error occurred while processing plist file." | ||
return 2 | ||
fi | ||
} | ||
|
||
notarize_app() { | ||
local target=$1 | ||
if [ ! -f "$target" ]; then | ||
echo "Error: $target does not exist." | ||
exit 1 | ||
fi | ||
|
||
xcrun notarytool submit $target --apple-id "******" \ | ||
--team-id "******" --password "******" --wait | ||
xcrun stapler staple $target | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Package: qt-app | ||
Version: 0.1.1 | ||
Architecture: amd64 | ||
Description: qt-app | ||
Section: admin | ||
Priority: optional | ||
Maintainer: https://github.com/RealChuan | ||
Homepage: https://github.com/RealChuan/Qt-App | ||
Depends: libc6 (>= 2.35) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh -e | ||
|
||
chmod +x /opt/Qt-App/Qt-App | ||
chmod +x /opt/Qt-App/Qt-App.sh | ||
chmod 777 /opt/Qt-App/app.png | ||
chmod 744 /usr/share/applications/Qt-App.desktop | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh -e | ||
|
||
delete_file_or_dir() { | ||
local target=$1 | ||
|
||
if [ -e "$target" ]; then | ||
if [ -d "$target" ]; then | ||
rm -rf "$target" | ||
else | ||
rm "$target" | ||
fi | ||
fi | ||
} | ||
|
||
if [ "$1" = "remove" -o "$1" = "purge" ]; then | ||
delete_file_or_dir ~/.config/Youth/Qt-App | ||
delete_file_or_dir ~/.config/Youth/CrashReport | ||
fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh -e | ||
|
||
killall -q -9 Qt-App || true | ||
killall -q -9 CrashReport || true | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh -e | ||
|
||
killall -q -9 Qt-App || true | ||
killall -q -9 CrashReport || true | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
[Desktop Entry] | ||
Type=Application | ||
Name=Qt-App | ||
Comment=A qt Application template | ||
GenericName=Qt-App | ||
Exec=AppRun %F | ||
Icon=app | ||
Comment=Edit this default file | ||
Terminal=true | ||
Type=Application | ||
StartupNotify=false | ||
StartupWMClass=Qt-App | ||
Categories=Utility; | ||
X-AppImage-Version=9e82467 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY /opt/Qt-App/Qt-App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Desktop Entry] | ||
Name=Qt-App | ||
Comment=A qt Application template | ||
GenericName=Qt-App | ||
Exec=/opt/Qt-App/Qt-App | ||
Icon=/opt/Qt-App/app.png | ||
Type=Application | ||
StartupNotify=false | ||
StartupWMClass=Qt-App | ||
Categories=Utility; |
Oops, something went wrong.