Skip to content

Commit

Permalink
update v1.4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
tonquer committed Nov 19, 2023
1 parent 3e9c17a commit 27d9bda
Show file tree
Hide file tree
Showing 55 changed files with 4,483 additions and 841 deletions.
48 changes: 47 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
# cp Icon.icns dist/
# ln -s /Applications/ dist/Applications
cp -avf data dist/PicACG.app/Contents/MacOS
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 \
Expand Down Expand Up @@ -96,6 +97,7 @@ jobs:
pyinstaller -F -w -i icon.ico start.py
mv dist bika
Copy-Item -Verbose -Recurse -Path data -Destination bika/
Copy-Item -Verbose -Recurse -Path db -Destination bika/
cp ..\LICENSE bika\
cp ..\CHANGELOG bika\
cd ..
Expand Down Expand Up @@ -139,6 +141,7 @@ jobs:
pyinstaller -F -w -i icon.ico start.py
mv dist bika
Copy-Item -Verbose -Recurse -Path data -Destination bika/
Copy-Item -Verbose -Recurse -Path db -Destination bika/
cp ..\LICENSE bika\
cp ..\CHANGELOG bika\
cd ..
Expand All @@ -151,4 +154,47 @@ jobs:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}
retention-days: 7


ubuntu:
runs-on: ubuntu-18.04
env:
PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_linux
PACKAGENAME: bika_py37_linux
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
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
- 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 ../data picacg.AppRun/
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 ../..
- name: Upload
uses: actions/upload-artifact@v2
with:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}-x86_64.AppImage
retention-days: 7
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ jobs:
# rm -rf dist/PicACG
# cp Icon.icns dist/
# ln -s /Applications/ dist/Applications
cp -avf db dist/PicACG.app/Contents/MacOS
cp -avf data dist/PicACG.app/Contents/MacOS
xattr -cr dist/PicACG.app
create-dmg --volname "PicACG" --volicon "Icon.icns" --icon "PicACG.app" 200 190 \
Expand Down Expand Up @@ -137,6 +138,7 @@ jobs:
pyinstaller -F -w -i icon.ico start.py
mv dist bika
Copy-Item -Verbose -Recurse -Path data -Destination bika/
Copy-Item -Verbose -Recurse -Path db -Destination bika/
cp ..\LICENSE bika\
cp ..\CHANGELOG bika\
cd ..
Expand Down Expand Up @@ -190,6 +192,7 @@ jobs:
pyinstaller -F -w -i icon.ico start.py
mv dist bika
Copy-Item -Verbose -Recurse -Path data -Destination bika/
Copy-Item -Verbose -Recurse -Path db -Destination bika/
cp ..\LICENSE bika\
cp ..\CHANGELOG bika\
cd ..
Expand All @@ -210,3 +213,55 @@ jobs:
asset_path: ${{ env.PACKAGENAME }}.7z
asset_name: ${{ env.PACKAGENAME }}.7z
asset_content_type: application/zip

ubuntu:
runs-on: ubuntu-18.04
env:
PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_linux
PACKAGENAME: bika_py37_linux
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
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
- 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 ../..
- name: Upload
uses: actions/upload-artifact@v2
with:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}-x86_64.AppImage
retention-days: 7
- 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_content_type: application/zip
17 changes: 11 additions & 6 deletions res/appimage/AppRun
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,25 @@ export GSETTINGS_SCHEMA_DIR="${HERE}/usr/share/glib-2.0/schemas/${GSETTINGS_SCHE
export QT_PLUGIN_PATH="${HERE}/usr/lib/qt4/plugins/:${HERE}/usr/lib/i386-linux-gnu/qt4/plugins/:${HERE}/usr/lib/x86_64-linux-gnu/qt4/plugins/:${HERE}/usr/lib32/qt4/plugins/:${HERE}/usr/lib64/qt4/plugins/:${HERE}/usr/lib/qt5/plugins/:${HERE}/usr/lib/i386-linux-gnu/qt5/plugins/:${HERE}/usr/lib/x86_64-linux-gnu/qt5/plugins/:${HERE}/usr/lib32/qt5/plugins/:${HERE}/usr/lib64/qt5/plugins/${QT_PLUGIN_PATH:+:$QT_PLUGIN_PATH}"
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2 | cut -d " " -f 1)
echo $EXEC
if [ ! -d ~/.picacg/db ];then
mkdir -p ~/.picacg/db
echo "mkdir db"
fi

if [ ! -d ~/.picacg/data ];then
mkdir -p ~/.picacg/data
echo "mkdir data"
fi

if [ ! -f ~/.picacg/data/version ];then
touch ~/.picacg/data/version
if [ ! -f ~/.picacg/db/version ];then
touch ~/.picacg/db/version
echo "mkdir version"
fi

if [ ! -f ~/.picacg/data/book.db ] || [ "`cat ~/.picacg/data/version`" != "v1.3.1" ] ; then
cp ${HERE}/data/book.db ~/.picacg/data/
echo "v1.3.1" > ~/.picacg/data/version
echo "copy data"
if [ ! -f ~/.picacg/db/book.db ] || [ "`cat ~/.picacg/db/version`" != "v1.4.7" ] ; then
cp ${HERE}/db/book.db ~/.picacg/db/
echo "v1.4.7" > ~/.picacg/db/version
echo "copy db"
fi

exec "${EXEC}" "$@"
1 change: 1 addition & 0 deletions res/theme/dark_pink.qss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
/* Basic widgets */

QWidget {
/*replace*/
background-color: #31363b;
}

Expand Down
1 change: 1 addition & 0 deletions res/theme/light_pink.qss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
/* Basic widgets */

QWidget {
/*replace*/
background-color: #f3f3f3;
}

Expand Down
8 changes: 8 additions & 0 deletions src/component/list/comic_list_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,14 @@ def AddBookItem(self, _id, title, categoryStr="", url="", path="", likesCount=""
# self.AddDownloadTask(url, path, completeCallBack=self.LoadingPictureComplete, backParam=index)
# pass

def DelBookID(self, bookID):
for row in range(0, self.count()):
item = self.item(row)
w = self.itemWidget(item)
if w.id == bookID:
item.setHidden(True)
break

def LoadingPicture(self, index):
item = self.item(index)
widget = self.itemWidget(item)
Expand Down
3 changes: 2 additions & 1 deletion src/component/system_tray_icon/my_system_tray_icon.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from PySide6.QtGui import QIcon, QAction
from PySide6.QtWidgets import QSystemTrayIcon, QMenu, QApplication

from config import config
from qt_owner import QtOwner
from tools.str import Str

Expand All @@ -10,7 +11,7 @@ def __init__(self, parent=None):
super().__init__(parent)
self.count = 0
self.setIcon(QIcon(":/png/icon/logo_round.png"))
self.setToolTip("PicACG")
self.setToolTip(config.ProjectName)
self.menu = QMenu()
mainUi = QAction(Str.GetStr(Str.MainUi), self)
mainUi.triggered.connect(self.ShowMainUi)
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 sys.platform == "win32" and not Setting.IsNotUseTitleBar.value:
if sys.platform == "win32" and not Setting.IsUseTitleBar.value:
try:
from interface.ui_main_windows import Ui_MainWindows
from .windows.frame_less_widget import FrameLessWidget
Expand Down
7 changes: 4 additions & 3 deletions src/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
Uuid = "defaultUuid"


ProjectName = "PicACG"
ThreadNum = 10 # 线程
DownloadThreadNum = 5 # 下载线程
ConvertThreadNum = 3 # 同时转换数量
Expand Down Expand Up @@ -52,9 +53,9 @@
Issues2 = "https://hub.ggo.icu/tonquer/picacg-qt/issues"
Issues3 = "https://hub.fastgit.xyz/tonquer/picacg-qt/issues"

UpdateVersion = "v1.4.6"
RealVersion = "v1.4.6"
TimeVersion = "2023-8-13"
UpdateVersion = "v1.4.7"
RealVersion = "v1.4.7"
TimeVersion = "2023-11-19"

Waifu2xVersion = "1.1.6"

Expand Down
Loading

0 comments on commit 27d9bda

Please sign in to comment.