diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e7fb9c7..e48c752e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,144 +5,6 @@ on: - 'v*' jobs: - build-macos: - runs-on: macos-11 - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup FFMPEG - uses: FedericoCarboni/setup-ffmpeg@v1.1.0 - id: setup_ffmpeg - with: - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: 3.9 - - - name: Install mkdocs-material - run: python3 -m pip install mkdocs-material - - - name: Build docs to /help - run: mkdocs build -d help - - - name: Install PyOxidizer - run: python3 -m pip install pyoxidizer - - - name: Build Hydrus - run: | - cd $GITHUB_WORKSPACE - cp ${{ steps.setup_ffmpeg.outputs.ffmpeg-path }} bin/ - cp static/build_files/macos/pyoxidizer.bzl pyoxidizer.bzl - cp static/build_files/macos/requirements.txt requirements.txt - basename $(rustc --print sysroot) | sed -e "s/^stable-//" > triple.txt - pyoxidizer build --release - cd build/$(head -n 1 triple.txt)/release - mkdir -p "Hydrus Network.app/Contents/MacOS" - mkdir -p "Hydrus Network.app/Contents/Resources" - mkdir -p "Hydrus Network.app/Contents/Frameworks" - mv install/static/icon.icns "Hydrus Network.app/Contents/Resources/icon.icns" - cp install/static/build_files/macos/Info.plist "Hydrus Network.app/Contents/Info.plist" - cp install/static/build_files/macos/ReadMeFirst.rtf ./ReadMeFirst.rtf - cp install/static/build_files/macos/running_from_app "install/running_from_app" - ln -s /Applications ./Applications - mv install/* "Hydrus Network.app/Contents/MacOS/" - rm -rf install - - - name: Build DMG - run: | - cd $GITHUB_WORKSPACE - temp_dmg="$(mktemp).dmg" - hdiutil create "$temp_dmg" -ov -volname "HydrusNetwork" -fs HFS+ -format UDZO -srcfolder "$GITHUB_WORKSPACE/build/$(head -n 1 triple.txt)/release" - mv "$temp_dmg" HydrusNetwork.dmg - - - name: Upload a Build Artifact - uses: actions/upload-artifact@v3 - with: - name: MacOS-DMG - path: HydrusNetwork.dmg - if-no-files-found: error - retention-days: 2 - - build-ubuntu: - runs-on: ubuntu-20.04 - steps: - - - name: Checkout - uses: actions/checkout@v3 - with: - path: hydrus - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: 3.9 - architecture: x64 - - - name: APT Install - run: | - sudo apt-get update - sudo apt-get install -y libmpv1 - - - name: Pip Install - run: python3 -m pip install -r hydrus/static/build_files/linux/requirements.txt - - - name: Build docs to /help - run: mkdocs build -d help - working-directory: hydrus - #- name: Cache Qt - # id: cache-qt - # uses: actions/cache@v1 - # with: - # path: Qt - # key: ${{ runner.os }}-QtCache - #- - # name: Install Qt - # uses: jurplel/install-qt-action@v2 - # with: - # install-deps: true - # setup-python: 'false' - # modules: qtcharts qtwidgets qtgui qtcore - # cached: ${{ steps.cache-qt.outputs.cache-hit }} - - - name: Build Hydrus - run: | - cp hydrus/static/build_files/linux/client.spec client.spec - cp hydrus/static/build_files/linux/server.spec server.spec - pyinstaller server.spec - pyinstaller client.spec - - - name: Remove Chonk - run: | - find dist/client/ -type f -name "*.pyc" -delete - while read line; do find dist/client/ -type f -name "${line}" -delete ; done < hydrus/static/build_files/linux/files_to_delete.txt - - - name: Remove Surplus File - run: | - rm -f dist/client/libxkbcommon.so* - - - name: Set Permissions - run: | - sudo chown --recursive 1000:1000 dist/client - sudo find dist/client -type d -exec chmod 0755 {} \; - sudo chmod +x dist/client/client dist/client/server dist/client/bin/swfrender_linux - - - name: Compress Client - run: | - mv dist/client "dist/Hydrus Network" - tar -czvf Ubuntu-Extract.tar.gz -C dist "Hydrus Network" - - - name: Upload a Build Artifact - uses: actions/upload-artifact@v3 - with: - name: Ubuntu-Extract - path: Ubuntu-Extract.tar.gz - if-no-files-found: error - retention-days: 2 - build-windows: runs-on: windows-2019 steps: @@ -242,7 +104,7 @@ jobs: create-release: name: Create Release Entry runs-on: ubuntu-20.04 - needs: [build-windows, build-ubuntu, build-macos] + needs: [build-windows] steps: - name: Checkout code @@ -262,8 +124,6 @@ jobs: mkdir ubuntu windows mv Windows-Install/HydrusInstaller.exe Hydrus.Network.${{ env.version_short }}.-.Windows.-.Installer.exe mv Windows-Extract/Windows-Extract.zip Hydrus.Network.${{ env.version_short }}.-.Windows.-.Extract.only.zip - mv Ubuntu-Extract/Ubuntu-Extract.tar.gz Hydrus.Network.${{ env.version_short }}.-.Linux.-.Executable.tar.gz - mv MacOS-DMG/HydrusNetwork.dmg Hydrus.Network.${{ env.version_short }}.-.macOS.-.App.dmg - name: Release new uses: softprops/action-gh-release@v1 @@ -272,7 +132,4 @@ jobs: files: | Hydrus.Network.${{ env.version_short }}.-.Windows.-.Installer.exe Hydrus.Network.${{ env.version_short }}.-.Windows.-.Extract.only.zip - Hydrus.Network.${{ env.version_short }}.-.Linux.-.Executable.tar.gz - Hydrus.Network.${{ env.version_short }}.-.macOS.-.App.dmg - env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/hydrus/hydrus_client.py b/hydrus/hydrus_client.py index a32a9c71..9b4aa541 100644 --- a/hydrus/hydrus_client.py +++ b/hydrus/hydrus_client.py @@ -27,7 +27,7 @@ try: if HC.PLATFORM_WINDOWS: - QtInit.DoWinDarkMode() + pass #QtInit.DoWinDarkMode() from hydrus.core import HydrusData