Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tonquer committed Oct 27, 2024
1 parent a673267 commit 13d1df6
Show file tree
Hide file tree
Showing 45 changed files with 1,925 additions and 1,952 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install pyinstaller==4.6
pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/waifu2x_vulkan-1.1.6-cp37-cp37m-macosx_10_15_x86_64.whl
pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/sr_ncnn_vulkan-1.2.0-cp39-cp39-macosx_10_9_universal2.whl
pip install -r src/requirements_macos.txt
brew install create-dmg
- name: Build
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
mv bika.zip ..
cd ..
- name: Upload
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: bika.zip
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
mv src\bika ${{ env.PACKAGENAME }}
7z a -r "$($Env:PACKAGENAME + '.zip')" "bika"
- name: Upload
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
mv src\bika ${{ env.PACKAGENAME }}
7z a -r "$($Env:PACKAGENAME + '.zip')" "bika"
- name: Upload
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}
Expand All @@ -154,7 +154,7 @@ jobs:
sudo apt-get install -y fuse libfuse2
python -m pip install --upgrade pip
pip install pyinstaller==4.8
pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/waifu2x_vulkan-1.1.6-cp37-cp37m-linux_x86_64.whl
pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/sr_ncnn_vulkan-1.2.0-cp37-cp37m-linux_x86_64.whl
pip install -r src/requirements.txt
- name: Build
run: |
Expand All @@ -176,7 +176,7 @@ jobs:
mv PicACG-x86_64.AppImage ../../${{ env.PACKAGENAME }}-x86_64.AppImage
cd ../..
- name: Upload
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}-x86_64.AppImage
Expand Down
150 changes: 62 additions & 88 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,24 @@ jobs:
draft: true
prerelease: true

macos:
macos-arm:
needs: [setup, release]
runs-on: macos-12
runs-on: macos-latest
env:
PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_macos_x64
PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_macos_arm64
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller==4.6
pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/waifu2x_vulkan-1.1.6-cp37-cp37m-macosx_10_15_x86_64.whl
pip install -r src/requirements_macos.txt
pip install pyinstaller
# pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/sr_ncnn_vulkan-1.2.0-cp39-cp39-macosx_10_9_universal2.whl
pip install -r src/requirements_macos_arm.txt
brew install create-dmg
- name: Build
run: |
Expand All @@ -76,9 +76,6 @@ jobs:
--hidden-import view \
--strip --windowed -i Icon.icns \
start.py
# rm -rf dist/PicACG
# cp Icon.icns dist/
# ln -s /Applications/ dist/Applications
cp -avf db dist/PicACG.app/Contents/MacOS
xattr -cr dist/PicACG.app
create-dmg --volname "PicACG" --volicon "Icon.icns" --icon "PicACG.app" 200 190 \
Expand All @@ -93,84 +90,68 @@ jobs:
mv bika.zip ..
cd ..
- name: Upload
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: bika.zip
- name: upload-macos
uses: actions/upload-release-asset@v1
- name: upload-macos-arm
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.Up_Url }}
asset_path: ${{ env.PACKAGENAME }}.dmg
asset_name: ${{ env.PACKAGENAME }}.dmg
asset_content_type: application/gzip
files: ${{ env.PACKAGENAME }}.dmg

macos-arm:
windows:
needs: [setup, release]
runs-on: macos-latest
runs-on: windows-latest
env:
PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_macos_arm64
PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_windows_x64
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
- name: Set up Python 3.7
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.7

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
# pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.1/waifu2x_vulkan-1.1.1-cp39-cp39-macosx_10_9_universal2.whl
pip install -r src/requirements_macos_arm.txt
brew install create-dmg
pip install pyinstaller==4.8
pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/sr_ncnn_vulkan-1.2.0-cp36.cp37.cp38.cp39.cp310.cp311-none-win_amd64.whl
pip install -r src\requirements.txt
- name: Build
run: |
cd src
cp ../res/icon/Icon.icns ./
pyinstaller --clean --onedir --name PicACG \
--hidden-import waifu2x_vulkan --hidden-import PySide6 --hidden-import requests \
--hidden-import urllib3 --hidden-import websocket-client --hidden-import pillow \
--hidden-import config \
--hidden-import component \
--hidden-import server \
--hidden-import task \
--hidden-import tools \
--hidden-import view \
--strip --windowed -i Icon.icns \
start.py
cp -avf db dist/PicACG.app/Contents/MacOS
xattr -cr dist/PicACG.app
create-dmg --volname "PicACG" --volicon "Icon.icns" --icon "PicACG.app" 200 190 \
--window-pos 200 120 \
--window-size 800 400 \
--icon-size 100 \
--hide-extension "PicACG.app" --app-drop-link 600 185 \
${{ env.PACKAGENAME }}.dmg dist/PicACG.app
zip -9 bika.zip ${{ env.PACKAGENAME }}.dmg
mv ${{ env.PACKAGENAME }}.dmg ..
mv bika.zip ..
cp ..\res\icon\icon.ico .\
pyinstaller -F -w -i icon.ico start.py
mv dist bika
Copy-Item -Verbose -Recurse -Path db -Destination bika/
cp ..\LICENSE bika\
cp ..\CHANGELOG bika\
cd ..
mkdir ${{ env.PACKAGENAME }}
mv src\bika ${{ env.PACKAGENAME }}
7z a -t7z -r "$($Env:PACKAGENAME + '.7z')" "bika"
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: bika.zip
- name: upload-macos-arm
uses: softprops/action-gh-release@v2
path: bika
- name: upload-win
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ${{ env.PACKAGENAME }}.dmg
upload_url: ${{ needs.release.outputs.Up_Url }}
asset_path: ${{ env.PACKAGENAME }}.7z
asset_name: ${{ env.PACKAGENAME }}.7z
asset_content_type: application/zip

windows:
windows-nosr:
needs: [setup, release]
runs-on: windows-latest
env:
PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_windows_x64
PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_windows_nosr_x64
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.7
Expand All @@ -182,7 +163,6 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install pyinstaller==4.8
pip install pywin32==302
pip install -r src\requirements.txt
- name: Build
run: |
Expand All @@ -198,7 +178,7 @@ jobs:
mv src\bika ${{ env.PACKAGENAME }}
7z a -t7z -r "$($Env:PACKAGENAME + '.7z')" "bika"
- name: Upload
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: bika
Expand Down Expand Up @@ -228,7 +208,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install pyinstaller==4.6
pip install pywin32==302
pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/sr_ncnn_vulkan-1.2.0-cp36.cp37.cp38.cp39.cp310.cp311-none-win_amd64.whl
pip install -r src\requirements_win7.txt
- name: Build
run: |
Expand All @@ -244,7 +224,7 @@ jobs:
mv src\bika ${{ env.PACKAGENAME }}
7z a -t7z -r "$($Env:PACKAGENAME + '.7z')" "bika"
- name: Upload
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: bika
Expand All @@ -258,54 +238,48 @@ jobs:
asset_name: ${{ env.PACKAGENAME }}.7z
asset_content_type: application/zip

ubuntu:
windows7-nosr:
needs: [setup, release]
runs-on: ubuntu-latest
runs-on: windows-latest
env:
PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_linux_x64
PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_windows7_nosr_x64
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v5
with:
python-version: 3.7

- name: Install dependencies
run: |
sudo apt-get install -y fuse libfuse2
python -m pip install --upgrade pip
pip install pyinstaller==4.8
pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/waifu2x_vulkan-1.1.6-cp37-cp37m-linux_x86_64.whl
pip install -r src/requirements.txt
pip install pyinstaller==4.6
pip install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/sr_ncnn_vulkan-1.2.0-cp36.cp37.cp38.cp39.cp310.cp311-none-win_amd64.whl
pip install -r src\requirements_win7.txt
- name: Build
run: |
cd src
pyinstaller -w start.py
cd dist
mkdir -p picacg.AppRun/usr/bin
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
cp -r ../../res/appimage/* picacg.AppRun/
cp -r ../../res/icon/logo_round.png picacg.AppRun/PicACG.png
cp -r start/* picacg.AppRun/usr/bin/
cp -r ../db picacg.AppRun/
mv picacg.AppRun/usr/bin/start picacg.AppRun/usr/bin/PicACG
chmod +x picacg.AppRun/AppRun
chmod +x picacg.AppRun/usr/bin/PicACG
./appimagetool-x86_64.AppImage picacg.AppRun
mv PicACG-x86_64.AppImage ../../${{ env.PACKAGENAME }}-x86_64.AppImage
cd ../..
cp ..\res\icon\icon.ico .\
pyinstaller -F -w -i icon.ico start.py
mv dist bika
Copy-Item -Verbose -Recurse -Path db -Destination bika/
cp ..\LICENSE bika\
cp ..\CHANGELOG bika\
cd ..
mkdir ${{ env.PACKAGENAME }}
mv src\bika ${{ env.PACKAGENAME }}
7z a -t7z -r "$($Env:PACKAGENAME + '.7z')" "bika"
- name: Upload
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}-x86_64.AppImage
path: bika
- name: upload-win
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.Up_Url }}
asset_path: ${{ env.PACKAGENAME }}-x86_64.AppImage
asset_name: ${{ env.PACKAGENAME }}-x86_64.AppImage
asset_path: ${{ env.PACKAGENAME }}.7z
asset_name: ${{ env.PACKAGENAME }}.7z
asset_content_type: application/zip
2 changes: 1 addition & 1 deletion src/component/list/comic_list_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def Waifu2xPicture(self, index, isIfSize=False):
if widget and widget.picData:
w, h, mat,_ = ToolUtil.GetPictureSize(widget.picData)
if max(w, h) <= Setting.CoverMaxNum.value or not isIfSize:
model = ToolUtil.GetModelByIndex(Setting.CoverLookNoise.value, Setting.CoverLookScale.value, Setting.CoverLookModel.value, mat)
model = ToolUtil.GetModelByIndex(Setting.CoverLookModelName.value, Setting.CoverLookScale.value, mat)
widget.isWaifu2xLoading = True
if self.isLocal:
self.AddConvertTask(widget.path, widget.picData, model, self.Waifu2xPictureBack, index, noSaveCache=True)
Expand Down
2 changes: 1 addition & 1 deletion src/component/widget/main_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Main = None

if Setting.IsUseTitleBar.value:
if False:
try:
from interface.ui_main_windows import Ui_MainWindows
# from .windows.frame_less_widget import FrameLessWidget
Expand Down
4 changes: 2 additions & 2 deletions src/component/widget/navigation_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def __init__(self, parent=None):
QtTaskBase.__init__(self)
self.allFilterStr = set()
self.setupUi(self)
if Setting.IsUseTitleBar.value:
self.scrollArea.setFixedHeight(380)
# if Setting.IsUseTitleBar.value:
# self.scrollArea.setFixedHeight(380)
# self.resize(260, 800)
self.__ani = QPropertyAnimation(self, b"geometry")
self.__connect = None
Expand Down
9 changes: 5 additions & 4 deletions src/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,16 @@
Issues2 = "https://hub.ggo.icu/tonquer/picacg-qt/issues"
Issues3 = "https://hub.fastgit.xyz/tonquer/picacg-qt/issues"

UpdateVersion = "v1.5.0"
RealVersion = "v1.5.0"
TimeVersion = "2024-4-6"
UpdateVersion = "v1.5.1"
RealVersion = "v1.5.1"
TimeVersion = "2024-10-27"
DbVersion = ""

Waifu2xVersion = "1.1.6"
Waifu2xVersion = "1.2.0"


# waifu2x
CloseWaifu2x = False
CanWaifu2x = True
ErrorMsg = ""

Expand Down
Loading

0 comments on commit 13d1df6

Please sign in to comment.