Skip to content

Commit

Permalink
Merge pull request #285 from Z-fly/main
Browse files Browse the repository at this point in the history
移植到Linux Arm上
  • Loading branch information
tonquer committed Apr 2, 2024
2 parents 4ac9a8b + abbf384 commit d5b7a5f
Show file tree
Hide file tree
Showing 15 changed files with 71 additions and 69 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

## 如何使用
### Windows (测试使用win10)
1. 下载最新的版本 https://github.com/tonquer/picacg-windows/releases
1. 下载最新的版本 https://github.com/tonquer/picacg-qt/releases
2. 解压zip
3. 打开start.exe
4. 后续有更新,只需要下载最新版本覆盖原目录即可
5. 如果无法初始化Waifu2x, DLL错误, 请安装 [Vs运行库](https://download.visualstudio.microsoft.com/download/pr/366c0fb9-fe05-4b58-949a-5bc36e50e370/015EDD4E5D36E053B23A01ADB77A2B12444D3FB6ECCEFE23E3A8CD6388616A16/VC_redist.x64.exe), [Vulkan运行库](https://sdk.lunarg.com/sdk/download/1.3.239.0/windows/VulkanRT-1.3.239.0-Installer.exe)

### macOS (测试使用 macOS 10.15.7)
1. 下载最新的版本 https://github.com/tonquer/picacg-windows/releases
1. 下载最新的版本 https://github.com/tonquer/picacg-qt/releases
2. 解压 7z
3. 将解压出的 PicACG 拖入访达 (Finder) 左侧侧栏的应用程序 (Applications) 文件夹中
4. 从启动台 (Launchpad) 中找到并打开 PicACG
Expand All @@ -37,18 +37,18 @@
### Linux (测试使用deepin 20.2)
1. 下载qt依赖, http://ftp.br.debian.org/debian/pool/main/x/xcb-util/libxcb-util1_0.4.0-1+b1_amd64.deb
2. 安装依赖,sudo dpkg -i ./libxcb-util1_0.4.0-1+b1_amd64.deb
3. 下载最新的版本 https://github.com/tonquer/picacg-windows/releases
3. 下载最新的版本 https://github.com/tonquer/picacg-qt/releases
4. 解压tar -zxvf bika.tar.gz
5. cd bika && chmod +x start
6. ./start
7. 要想使用waifu2x请确定你的设备支持vulkan,然后安装vulkan驱动包,sudo apt install mesa-vulkan-drivers

## 关于代理问题
请看说明 https://github.com/tonquer/picacg-windows/discussions/48
请看说明 https://github.com/tonquer/picacg-qt/discussions/48

## 如何编译
### 使用Git Actions编译
1. 查看编译结果[Git Actions编译](https://github.com/tonquer/picacg-windows/actions)
1. 查看编译结果[Git Actions编译](https://github.com/tonquer/picacg-qt/actions)

## 我的其他项目
[![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=tonquer&repo=JMComic-qt)](https://github.com/tonquer/JMComic-qt)
Expand Down
18 changes: 9 additions & 9 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

## [简体中文](README.md) | English

[![GitHub](https://img.shields.io/github/license/tonquer/picacg-windows)](https://raw.githubusercontent.com/tonquer/picacg-windows/master/LICENSE.txt)
[![GitHub](https://img.shields.io/github/workflow/status/tonquer/picacg-windows/CI?label=CI)](https://github.com/tonquer/picacg-windows/actions)
[![GitHub](https://img.shields.io/github/license/tonquer/picacg-qt)](https://raw.githubusercontent.com/tonquer/picacg-qt/master/LICENSE.txt)
[![GitHub](https://img.shields.io/github/workflow/status/tonquer/picacg-qt/CI?label=CI)](https://github.com/tonquer/picacg-qt/actions)
![Relese](https://img.shields.io/badge/Python-3.7.9%2B-brightgreen)
[![Relese](https://img.shields.io/github/v/release/tonquer/picacg-windows)](https://github.com/tonquer/picacg-windows/releases)
[![Relese](https://img.shields.io/github/v/release/tonquer/picacg-qt)](https://github.com/tonquer/picacg-qt/releases)

- PicACG PC Client (Support Windows, Linux and macOS), using QT as interface.
- This project is only for technical references, please do not use it for other purposes.
Expand All @@ -22,14 +22,14 @@

## How to use
### Windows (tested on Win10)
1. Download the latest version at https://github.com/tonquer/picacg-windows/releases
1. Download the latest version at https://github.com/tonquer/picacg-qt/releases
2. Unzip
3. Run start.exe
4. Updates can be installed by downloading the latest version and overwrite the original directory.
5. If waifu2x cannot be initialized, please update the graphics driver and install [VS Library](https://download.visualstudio.microsoft.com/download/pr/366c0fb9-fe05-4b58-949a-5bc36e50e370/015EDD4E5D36E053B23A01ADB77A2B12444D3FB6ECCEFE23E3A8CD6388616A16/VC_redist.x64.exe). If waifu2x still cannot be enabled, your computer does not support Vulkan and cannot use waifu2x.

### macOS (tested on macOS 10.15.7)
1. Download the latest version at https://github.com/tonquer/picacg-windows/releases
1. Download the latest version at https://github.com/tonquer/picacg-qt/releases
2. Unzip
3. Drag PicACG into the Applications folder on the left sidebar of the Finder.
4. Find and run PicACG from the Launchpad.
Expand All @@ -40,21 +40,21 @@
### Linux (tested on deepin 20.2)
1. Download qt dependencies at http://ftp.br.debian.org/debian/pool/main/x/xcb-util/libxcb-util1_0.4.0-1+b1_amd64.deb
2. Install the dependencies (sudo dpkg -i ./libxcb-util1_0.4.0-1+b1_amd64.deb)
3. Download the latest version at https://github.com/tonquer/picacg-windows/releases
3. Download the latest version at https://github.com/tonquer/picacg-qt/releases
4. tar -zxvf bika.tar.gz
5. cd bika && chmod +x start
6. ./start
7. If you want to use waifu2x, please make sure your device supports vulkan, and then install the vulkan driver package (sudo apt install mesa-vulkan-drivers)

## waifu2x settings
Pleasse see https://github.com/tonquer/picacg-windows/discussions/76
Pleasse see https://github.com/tonquer/picacg-qt/discussions/76

## Proxy issues
Please see https://github.com/tonquer/picacg-windows/discussions/48
Please see https://github.com/tonquer/picacg-qt/discussions/48

## How to build
### Use Git Actions
1. Check the result in [Git Actions](https://github.com/tonquer/picacg-windows/actions)
1. Check the result in [Git Actions](https://github.com/tonquer/picacg-qt/actions)

## Interface

Expand Down
8 changes: 4 additions & 4 deletions src/component/list/category_list_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from PySide6.QtCore import Qt
from PySide6.QtGui import QColor, QCursor
from PySide6.QtWidgets import QListWidgetItem, QMenu
from PySide6.QtWidgets import QListWidgetItem, QMenu, QListView

from component.list.base_list_widget import BaseListWidget
from component.widget.comic_item_widget import ComicItemWidget
Expand All @@ -19,10 +19,10 @@ def __init__(self, parent):
BaseListWidget.__init__(self, parent)
self.resize(800, 600)
# self.setMinimumHeight(400)
self.setFrameShape(self.NoFrame) # 无边框
self.setFlow(self.LeftToRight) # 从左到右
self.setFrameShape(QListView.NoFrame) # 无边框
self.setFlow(QListView.LeftToRight) # 从左到右
self.setWrapping(True)
self.setResizeMode(self.Adjust)
self.setResizeMode(QListView.Adjust)
self.setContextMenuPolicy(Qt.CustomContextMenu)
self.customContextMenuRequested.connect(self.SelectMenuBook)
# self.doubleClicked.connect(self.OpenBookInfo)
Expand Down
8 changes: 4 additions & 4 deletions src/component/list/comic_list_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from PySide6.QtCore import Qt
from PySide6.QtGui import QCursor
from PySide6.QtWidgets import QListWidgetItem, QMenu, QApplication
from PySide6.QtWidgets import QListWidgetItem, QMenu, QApplication,QListView

from component.list.base_list_widget import BaseListWidget
from component.widget.comic_item_widget import ComicItemWidget
Expand All @@ -19,10 +19,10 @@ def __init__(self, parent):
BaseListWidget.__init__(self, parent)
self.resize(800, 600)
# self.setMinimumHeight(400)
self.setFrameShape(self.NoFrame) # 无边框
self.setFlow(self.LeftToRight) # 从左到右
self.setFrameShape(QListView.NoFrame) # 无边框
self.setFlow(QListView.LeftToRight) # 从左到右
self.setWrapping(True)
self.setResizeMode(self.Adjust)
self.setResizeMode(QListView.Adjust)
self.setContextMenuPolicy(Qt.CustomContextMenu)
self.customContextMenuRequested.connect(self.SelectMenuBook)
# self.doubleClicked.connect(self.OpenBookInfo)
Expand Down
6 changes: 3 additions & 3 deletions src/component/list/tag_list_widget.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from PySide6.QtCore import Qt, QSize
from PySide6.QtGui import QFont, QFontMetrics
from PySide6.QtWidgets import QListWidgetItem, QLabel, QAbstractItemView
from PySide6.QtWidgets import QListWidgetItem, QLabel, QAbstractItemView, QListView

from component.list.base_list_widget import BaseListWidget
from component.scroll.smooth_scroll_bar import SmoothScrollBar
Expand All @@ -9,8 +9,8 @@
class TagListWidget(BaseListWidget):
def __init__(self, parent):
BaseListWidget.__init__(self, parent)
self.setViewMode(self.ListMode)
self.setFlow(self.LeftToRight)
self.setViewMode(QListView.ListMode)
self.setFlow(QListView.LeftToRight)
self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.setMaximumHeight(30)
Expand Down
4 changes: 3 additions & 1 deletion src/component/list/user_list_widget.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from functools import partial

from PySide6.QtCore import Qt
from PySide6.QtWidgets import QListWidgetItem
from PySide6.QtWidgets import QListWidgetItem, QListView

from component.list.base_list_widget import BaseListWidget
from component.widget.comment_item_widget import CommentItemWidget
Expand All @@ -14,6 +14,8 @@
class UserListWidget(BaseListWidget):
def __init__(self, parent):
BaseListWidget.__init__(self, parent)
self.NoFrame = QListView.NoFrame
self.TopToBottom = QListView.TopToBottom
self.resize(800, 600)
# self.setMinimumHeight(400)
# self.setFrameShape(self.NoFrame) # 无边框
Expand Down
17 changes: 8 additions & 9 deletions src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
PySide6==6.2.4
websocket-client==0.59.0
requests==2.26.0
urllib3==1.25.11

pillow==8.3.2
PySide6>=6.1,<6.5
Pillow>=9.5
PySocks>=1.7
natsort>=8.2
requests>=2.26
urllib3>=2
waifu2x-vulkan==1.1.6
Pysocks==1.7.1
natsort==8.2.0
# pywin32==302
websocket-client>=1.6
# pywin32>=302
8 changes: 4 additions & 4 deletions src/view/chat/chat_room_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from PySide6.QtCore import Signal, QTimer, Qt, QEvent, QSize
from PySide6.QtGui import QFont, QTextCursor, QAction, QGuiApplication, QIcon
from PySide6.QtWidgets import QMenu, QWidget, QLabel, QListWidgetItem, QScroller
from PySide6.QtWidgets import QMenu, QWidget, QLabel, QListWidgetItem, QScroller, QListView

from component.dialog.loading_dialog import LoadingDialog
from component.label.msg_label import MsgLabel
Expand Down Expand Up @@ -69,10 +69,10 @@ def __init__(self):
self.reply = ""
self.atName = ""
self.atUserId = ""
self.listWidget.setFrameShape(self.listWidget.NoFrame) # 无边框
self.listWidget.setFlow(self.listWidget.LeftToRight) # 从左到右
self.listWidget.setFrameShape(QListView.NoFrame) # 无边框
self.listWidget.setFlow(QListView.LeftToRight) # 从左到右
self.listWidget.setWrapping(True)
self.listWidget.setResizeMode(self.listWidget.Adjust)
self.listWidget.setResizeMode(QListView.Adjust)
self.listWidget.itemClicked.connect(self.IconSelect)
# self.listWidget.setMinimumHeight(200)
self.cachePath = "."
Expand Down
8 changes: 4 additions & 4 deletions src/view/chat_new/chat_new_room_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from PySide6.QtCore import Signal, QTimer, Qt, QEvent, QSize
from PySide6.QtGui import QFont, QTextCursor, QAction, QGuiApplication, QIcon
from PySide6.QtWidgets import QMenu, QWidget, QLabel, QListWidgetItem, QScroller, QFileDialog
from PySide6.QtWidgets import QMenu, QWidget, QLabel, QListWidgetItem, QScroller, QFileDialog, QFrame, QListView

from component.dialog.loading_dialog import LoadingDialog
from component.label.msg_label import MsgLabel
Expand Down Expand Up @@ -86,10 +86,10 @@ def __init__(self):
self.atRoleId = ""
self.atRoleName = ""

self.listWidget.setFrameShape(self.listWidget.NoFrame) # 无边框
self.listWidget.setFlow(self.listWidget.LeftToRight) # 从左到右
self.listWidget.setFrameShape(QListView.NoFrame) # 无边框
self.listWidget.setFlow(QListView.LeftToRight) # 从左到右
self.listWidget.setWrapping(True)
self.listWidget.setResizeMode(self.listWidget.Adjust)
self.listWidget.setResizeMode(QListView.Adjust)
self.listWidget.itemClicked.connect(self.IconSelect)
# self.listWidget.setMinimumHeight(200)
self.cachePath = "."
Expand Down
10 changes: 5 additions & 5 deletions src/view/info/book_eps_view.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from PySide6 import QtWidgets
from PySide6.QtCore import QSize
from PySide6.QtGui import Qt, QFont
from PySide6.QtWidgets import QLabel, QListWidgetItem
from PySide6.QtWidgets import QLabel, QListWidgetItem, QListView

from interface.ui_book_eps import Ui_BookEps
from qt_owner import QtOwner
Expand All @@ -19,11 +19,11 @@ def __init__(self):
Ui_BookEps.__init__(self)
QtTaskBase.__init__(self)
self.setupUi(self)
self.listWidget.setFlow(self.listWidget.LeftToRight)
self.listWidget.setFlow(QListView.LeftToRight)
self.listWidget.setWrapping(True)
self.listWidget.setFrameShape(self.listWidget.NoFrame)
self.listWidget.setResizeMode(self.listWidget.Adjust)
self.listWidget.setSelectionMode(self.listWidget.MultiSelection)
self.listWidget.setFrameShape(QListView.NoFrame)
self.listWidget.setResizeMode(QListView.Adjust)
self.listWidget.setSelectionMode(QListView.MultiSelection)
self.listWidget.setSpacing(6)
self.bookId = ""
self.selectButton.clicked.connect(self.SelectAll)
Expand Down
15 changes: 8 additions & 7 deletions src/view/info/book_info_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
from PySide6 import QtWidgets, QtCore, QtGui
from PySide6.QtCore import Qt, QSize, QEvent, Signal
from PySide6.QtGui import QColor, QFont, QPixmap, QIcon
from PySide6.QtWidgets import QListWidgetItem, QLabel, QApplication, QScroller, QPushButton, QButtonGroup, QMessageBox
from PySide6.QtWidgets import QListWidgetItem, QLabel, QApplication, QScroller, QPushButton, QButtonGroup, QMessageBox, \
QListView

from component.layout.flow_layout import FlowLayout
from config.setting import Setting
Expand Down Expand Up @@ -65,17 +66,17 @@ def __init__(self):
# self.tagsList.setContextMenuPolicy(Qt.CustomContextMenu)
# self.tagsList.customContextMenuRequested.connect(self.CopyClickTagsItem)

self.epsListWidget.setFlow(self.epsListWidget.LeftToRight)
self.epsListWidget.setFlow(QListView.LeftToRight)
self.epsListWidget.setWrapping(True)
self.epsListWidget.setFrameShape(self.epsListWidget.NoFrame)
self.epsListWidget.setResizeMode(self.epsListWidget.Adjust)
self.epsListWidget.setFrameShape(QListView.NoFrame)
self.epsListWidget.setResizeMode(QListView.Adjust)

self.epsListWidget.clicked.connect(self.OpenReadImg)

self.listWidget.setFlow(self.listWidget.LeftToRight)
self.listWidget.setFlow(QListView.LeftToRight)
self.listWidget.setWrapping(True)
self.listWidget.setFrameShape(self.listWidget.NoFrame)
self.listWidget.setResizeMode(self.listWidget.Adjust)
self.listWidget.setFrameShape(QListView.NoFrame)
self.listWidget.setResizeMode(QListView.Adjust)

self.listWidget.clicked.connect(self.OpenReadImg2)

Expand Down
8 changes: 4 additions & 4 deletions src/view/info/game_info_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from PySide6 import QtWidgets, QtCore, QtGui
from PySide6.QtCore import Qt, QSize, QEvent
from PySide6.QtGui import QFont
from PySide6.QtWidgets import QListWidgetItem, QLabel, QApplication, QScroller
from PySide6.QtWidgets import QListWidgetItem, QLabel, QApplication, QScroller, QListView

from config.setting import Setting
from interface.ui_game_info import Ui_GameInfo
Expand Down Expand Up @@ -35,9 +35,9 @@ def __init__(self):
self.description.adjustSize()
self.title.adjustSize()

self.epsListWidget.setFlow(self.epsListWidget.TopToBottom)
self.epsListWidget.setFrameShape(self.epsListWidget.NoFrame)
self.epsListWidget.setResizeMode(self.epsListWidget.Adjust)
self.epsListWidget.setFlow(QListView.TopToBottom)
self.epsListWidget.setFrameShape(QListView.NoFrame)
self.epsListWidget.setResizeMode(QListView.Adjust)
# self.epsListWidget.doubleClicked.connect(self.OpenListPicture)
if Setting.IsGrabGesture.value:
QScroller.grabGesture(self.epsListWidget, QScroller.LeftMouseButtonGesture)
Expand Down
6 changes: 3 additions & 3 deletions src/view/read/read_graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ def __init__(self, parent=None):
self.changeScale.connect(self.ChangeScale)

# self.setInteractive(False)
self.setTransformationAnchor(self.NoAnchor)
self.setResizeAnchor(self.NoAnchor)
self.setDragMode(self.NoDrag)
self.setTransformationAnchor(QGraphicsView.NoAnchor)
self.setResizeAnchor(QGraphicsView.NoAnchor)
self.setDragMode(QGraphicsView.NoDrag)
self.setFrameStyle(QFrame.NoFrame)
self.setObjectName("graphicsView")
# self.graphicsView.setBackgroundBrush(QColor(Qt.white))
Expand Down
4 changes: 2 additions & 2 deletions src/view/search/search_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from PySide6.QtCore import Qt, QEvent, QPoint
from PySide6.QtGui import QHelpEvent
from PySide6.QtWidgets import QWidget, QCheckBox
from PySide6.QtWidgets import QWidget, QCheckBox, QListView

from component.layout.flow_layout import FlowLayout
from interface.ui_search import Ui_Search
Expand Down Expand Up @@ -36,7 +36,7 @@ def __init__(self, parent=None):
self.bookList.LoadCallBack = self.LoadNextPage
self.categoryList.itemClicked.connect(self.ClickCategoryListItem)
self.InitCategoryList()
self.categoryList.setSelectionMode(self.categoryList.MultiSelection)
self.categoryList.setSelectionMode(QListView.MultiSelection)
self.categoryList.setSpacing(1)
self.comboBox.currentIndexChanged.connect(self.ChangeSort)
self.sortKey.currentIndexChanged.connect(self.ChangeSort)
Expand Down
10 changes: 5 additions & 5 deletions src/view/tool/waifu2x_tool_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from PySide6.QtCore import Qt, QRectF, QPointF, QSizeF, QEvent
from PySide6.QtGui import QPainter, QPixmap, QDoubleValidator, \
QIntValidator, QMouseEvent, QImage
from PySide6.QtWidgets import QFrame, QGraphicsPixmapItem, QGraphicsScene, QApplication, QFileDialog, QLabel
from PySide6.QtWidgets import QFrame, QGraphicsPixmapItem, QGraphicsScene, QApplication, QFileDialog, QLabel, QGraphicsView

from config import config
from interface.ui_waifu2x_tool import Ui_Waifu2xTool
Expand Down Expand Up @@ -34,7 +34,7 @@ def __init__(self):
self.heighEdit.setValidator(validator)
self.widthEdit.setValidator(validator)
exp = QDoubleValidator(0.1, 64, 1)
exp.setNotation(exp.StandardNotation)
# exp.setNotation(exp.StandardNotation)
self.scaleEdit.setValidator(exp)
# self.setWindowFlags(Qt.FramelessWindowHint)

Expand All @@ -47,8 +47,8 @@ def __init__(self):
self.graphicsView.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.graphicsView.setRenderHints(QPainter.Antialiasing |
QPainter.SmoothPixmapTransform)
self.graphicsView.setCacheMode(self.graphicsView.CacheBackground)
self.graphicsView.setViewportUpdateMode(self.graphicsView.SmartViewportUpdate)
self.graphicsView.setCacheMode(QGraphicsView.CacheBackground)
self.graphicsView.setViewportUpdateMode(QGraphicsView.SmartViewportUpdate)

self.graphicsItem = ReadQGraphicsProxyWidget()
self.graphicsItem.setFlags(QGraphicsPixmapItem.ItemIsFocusable |
Expand All @@ -58,7 +58,7 @@ def __init__(self):

self.graphicsScene = QGraphicsScene(self) # 场景
self.graphicsView.setScene(self.graphicsScene)
self.graphicsView.setDragMode(self.graphicsView.ScrollHandDrag)
self.graphicsView.setDragMode(QGraphicsView.ScrollHandDrag)
self.graphicsItem.setWidget(QLabel())
# self.graphicsItem.setPixmap(QPixmap())
# self.graphicsItem.setTransformationMode(Qt.SmoothTransformation)
Expand Down

0 comments on commit d5b7a5f

Please sign in to comment.