diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 72ac6690..c49cf921 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,7 +1,7 @@ # This workflow will build a .NET project # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net -name: .NET +name: .NET Test on: push: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 00000000..d8747b9e --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,87 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: Build Linux + +on: + workflow_dispatch: + inputs: + VERSION: + description: 'version' + required: true + NEED_NUPKG: + description: 'Use self nupkg' + type: boolean + required: true + default: false + +jobs: + linux-deb: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Download NuGet package + if: ${{ inputs.NEED_NUPKG }} + run: | + wget https://github.com/Uotan-Dev/SukiUI-Uotan/releases/download/v6.0.0/SukiUI.6.0.0.nupkg + dotnet nuget add source "/home/runner/work/UotanToolboxNT" + nuget add SukiUI.6.0.0.nupkg -Source /home/runner/work/UotanToolboxNT + + - name: Build + run: | + dotnet publish -r linux-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ./publish-x64 + dotnet publish -r linux-arm64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ./publish-arm64 + + - name: Make deb-x64 + run: | + mkdir staging_folder + mkdir ./staging_folder/DEBIAN + cp /home/runner/work/UotanToolboxNT/UotanToolbox/Assets/Linux/control-x64" ./staging_folder/DEBIAN/control + mkdir ./staging_folder/usr + mkdir ./staging_folder/usr/bin + cp /home/runner/work/UotanToolboxNT/UotanToolbox/Assets/Linux/UotanToolbox ./staging_folder/usr/bin/UotanToolbox + chmod +x ./staging_folder/usr/bin/UotanToolbox + mkdir ./staging_folder/usr/lib + mkdir ./staging_folder/usr/lib/UotanToolbox + cp -f -a ./publish-x64. ./staging_folder/usr/lib/UotanToolbox/ + chmod -R a+rX ./staging_folder/usr/lib/UotanToolbox/ + chmod +x ./staging_folder/usr/lib/UotanToolbox/UotanToolbox + mkdir ./staging_folder/usr/share + mkdir ./staging_folder/usr/share/applications + cp /home/runner/work/UotanToolboxNT/UotanToolbox/Assets/Linux/UotanToolbox.desktop ./staging_folder/usr/share/applications/UotanToolbox.desktop + mkdir ./staging_folder/usr/share/pixmaps + cp /home/runner/work/UotanToolboxNT/UotanToolbox/Assets/Linux/UotanToolbox.png ./staging_folder/usr/share/pixmaps/UotanToolbox.png + dpkg-deb --root-owner-group --build ./staging_folder/ ./UotanToolbox_Linux_x64_${{ inputs.VERSION }}.deb + rm -rf ./staging_folder/* + + - name: Make deb-arm64 + run: | + mkdir ./staging_folder/DEBIAN + cp /home/runner/work/UotanToolboxNT/UotanToolbox/Assets/Linux/control-arm64" ./staging_folder/DEBIAN/control + mkdir ./staging_folder/usr + mkdir ./staging_folder/usr/bin + cp /home/runner/work/UotanToolboxNT/UotanToolbox/Assets/Linux/UotanToolbox ./staging_folder/usr/bin/UotanToolbox + chmod +x ./staging_folder/usr/bin/UotanToolbox + mkdir ./staging_folder/usr/lib + mkdir ./staging_folder/usr/lib/UotanToolbox + cp -f -a ./publish-arm64. ./staging_folder/usr/lib/UotanToolbox/ + chmod -R a+rX ./staging_folder/usr/lib/UotanToolbox/ + chmod +x ./staging_folder/usr/lib/UotanToolbox/UotanToolbox + mkdir ./staging_folder/usr/share + mkdir ./staging_folder/usr/share/applications + cp /home/runner/work/UotanToolboxNT/UotanToolbox/Assets/Linux/UotanToolbox.desktop ./staging_folder/usr/share/applications/UotanToolbox.desktop + mkdir ./staging_folder/usr/share/pixmaps + cp /home/runner/work/UotanToolboxNT/UotanToolbox/Assets/Linux/UotanToolbox.png ./staging_folder/usr/share/pixmaps/UotanToolbox.png + dpkg-deb --root-owner-group --build ./staging_folder/ ./UotanToolbox_Linux_arm64_${{ inputs.VERSION }}.deb + rm -rf ./staging_folder/* + + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: Linux-Package + path: ./UotanToolbox_Linux* diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 00000000..e69de29b diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 00000000..e69de29b diff --git a/UotanToolbox/Assets/Linux/UotanToolbox b/UotanToolbox/Assets/Linux/UotanToolbox new file mode 100644 index 00000000..eef60ab8 --- /dev/null +++ b/UotanToolbox/Assets/Linux/UotanToolbox @@ -0,0 +1,3 @@ +#!/bin/bash + +exec /usr/lib/UotanToolbox/UotanToolbox diff --git a/UotanToolbox/Assets/Linux/UotanToolbox.desktop b/UotanToolbox/Assets/Linux/UotanToolbox.desktop new file mode 100644 index 00000000..a876ab5f --- /dev/null +++ b/UotanToolbox/Assets/Linux/UotanToolbox.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Version=3.0.0 +Name=UotanToolbox +GenericName=UotanToolbox +Icon=UotanToolbox +Exec=UotanToolbox %F +StartupWMClass=UotanToolbox +Terminal=false +Categories=Development +Keywords=UotanToolbox; Uotan; diff --git a/UotanToolbox/Assets/Linux/UotanToolbox.png b/UotanToolbox/Assets/Linux/UotanToolbox.png new file mode 100644 index 00000000..f9604359 Binary files /dev/null and b/UotanToolbox/Assets/Linux/UotanToolbox.png differ diff --git a/UotanToolbox/Assets/Linux/control-arm64 b/UotanToolbox/Assets/Linux/control-arm64 new file mode 100644 index 00000000..abb794cc --- /dev/null +++ b/UotanToolbox/Assets/Linux/control-arm64 @@ -0,0 +1,11 @@ +Maintainer: mujianwu +Package: UotanToolbox +Version: 3.0.0 +Section: devel +Priority: optional +Architecture: arm64 +Essential: no +Installed-Size: 268000 +Depends: usbutils, android-tools-adb, gnome-terminal +Description: Advanced, Modern Toolbox for Geeks. +Copyright: 2020-2024 UOTAN diff --git a/UotanToolbox/Assets/Linux/control-loong64 b/UotanToolbox/Assets/Linux/control-loong64 new file mode 100644 index 00000000..189fd52c --- /dev/null +++ b/UotanToolbox/Assets/Linux/control-loong64 @@ -0,0 +1,11 @@ +Maintainer: mujianwu +Package: UotanToolbox +Version: 3.0.0 +Section: devel +Priority: optional +Architecture: loong64 +Essential: no +Installed-Size: 268000 +Depends: usbutils, android-tools-adb, gnome-terminal +Description: Advanced, Modern Toolbox for Geeks. +Copyright: 2020-2024 UOTAN diff --git a/UotanToolbox/Assets/Linux/control-x64 b/UotanToolbox/Assets/Linux/control-x64 new file mode 100644 index 00000000..07ebcbea --- /dev/null +++ b/UotanToolbox/Assets/Linux/control-x64 @@ -0,0 +1,11 @@ +Maintainer: mujianwu +Package: UotanToolbox +Version: 3.0.0 +Section: devel +Priority: optional +Architecture: amd64 +Essential: no +Installed-Size: 268000 +Depends: usbutils, android-tools-adb, gnome-terminal +Description: Advanced, Modern Toolbox for Geeks. +Copyright: 2020-2024 UOTAN diff --git a/UotanToolbox/Assets/Icon.icns b/UotanToolbox/Assets/macOS/Icon.icns similarity index 100% rename from UotanToolbox/Assets/Icon.icns rename to UotanToolbox/Assets/macOS/Icon.icns diff --git a/UotanToolbox/Assets/macOS/Info.plist b/UotanToolbox/Assets/macOS/Info.plist new file mode 100644 index 00000000..e87e8c67 --- /dev/null +++ b/UotanToolbox/Assets/macOS/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleExecutable + UotanToolbox + CFBundleIconFile + Icon + CFBundleIdentifier + com.uotan.toolbox + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + UotanToolbox + CFBundleDisplayName + UotanToolbox + CFBundlePackageType + APPL + NSHumanReadableCopyright + Copyright © 2020-2024 UOTAN All rights reserved. + CFBundleShortVersionString + 3.0.0 + CFBundleVersion + 3.0.0 + CFBundleSupportedPlatforms + + MacOSX + + + diff --git a/UotanToolbox/Assets/macOS/PkgInfo b/UotanToolbox/Assets/macOS/PkgInfo new file mode 100644 index 00000000..bd04210f --- /dev/null +++ b/UotanToolbox/Assets/macOS/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file