Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tonquer committed Oct 18, 2024
1 parent af97ea5 commit 77b1f88
Show file tree
Hide file tree
Showing 38 changed files with 443,646 additions and 299,437 deletions.
96 changes: 0 additions & 96 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,100 +79,4 @@ jobs:
with:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}
retention-days: 7

ubuntu:
runs-on: ubuntu-20.04
env:
PACKAGENAME: jmcomic_py37_linux
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/sr_ncnn_vulkan-1.2.0-cp37-cp37m-linux_x86_64.whl
pip install -r src/requirements.txt
- name: Build
run: |
cd src
pyinstaller --hidden-import=_cffi_backend --collect-data curl_cffi --add-data "../lib/linux/*:." -w start.py
cd dist
mkdir -p jmcomic.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/* jmcomic.AppRun/
cp -r ../../res/icon/logo_round.png jmcomic.AppRun/JMComic.png
cp -r start/* jmcomic.AppRun/usr/bin/
mv jmcomic.AppRun/usr/bin/start jmcomic.AppRun/usr/bin/JMComic
chmod +x jmcomic.AppRun/AppRun
chmod +x jmcomic.AppRun/usr/bin/JMComic
./appimagetool-x86_64.AppImage jmcomic.AppRun
mv JMComic-x86_64.AppImage ../../${{ env.PACKAGENAME }}-x86_64.AppImage
cd ../..
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}-x86_64.AppImage
retention-days: 7

macos:
runs-on: macos-13
env:
PACKAGENAME: jmcomic_py37_macos
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: |
python3.7 -m pip install --upgrade pip
pip3.7 install pyinstaller==4.8
pip3.7 install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/sr_ncnn_vulkan-1.2.0-cp37-cp37m-macosx_11_0_x86_64.whl
pip3.7 install -r src/requirements_macos.txt
brew install create-dmg
- name: Build
run: |
cd src
cp ../res/icon/Icon.icns ./
pyinstaller --clean --onedir --name JMComic \
--hidden-import sr_ncnn_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 \
--hidden-import=_cffi_backend --collect-data curl_cffi \
--add-data "../lib/macos/*:." \
--strip --windowed -i Icon.icns \
start.py
xattr -cr dist/JMComic.app
create-dmg --volname "JMComic" --volicon "Icon.icns" --icon "JMComic.app" 200 190 \
--window-pos 200 120 \
--window-size 800 400 \
--icon-size 100 \
--hide-extension "JMComic.app" --app-drop-link 600 185 \
${{ env.PACKAGENAME }}.dmg dist/JMComic.app
zip -9 jmcomic.zip ${{ env.PACKAGENAME }}.dmg
mv ${{ env.PACKAGENAME }}.dmg ..
mv jmcomic.zip ..
cd ..
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}.dmg
retention-days: 7
114 changes: 0 additions & 114 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,69 +41,6 @@ jobs:
draft: true
prerelease: true

macos:
needs: [setup, release]
runs-on: macos-13
env:
PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_macos_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: |
python3.7 -m pip install --upgrade pip
pip3.7 install pyinstaller==4.8
pip3.7 install https://github.com/tonquer/waifu2x-vulkan/releases/download/v1.1.6/sr_ncnn_vulkan-1.2.0-cp37-cp37m-macosx_11_0_x86_64.whl
pip3.7 install -r src/requirements_macos.txt
brew install create-dmg
- name: Build
run: |
cd src
cp ../res/icon/Icon.icns ./
pyinstaller --clean --onedir --name JMComic \
--hidden-import sr_ncnn_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 \
--hidden-import=_cffi_backend --collect-data curl_cffi \
--add-data "../lib/macos/*:." \
--strip --windowed -i Icon.icns \
start.py
xattr -cr dist/JMComic.app
create-dmg --volname "JMComic" --volicon "Icon.icns" --icon "JMComic.app" 200 190 \
--window-pos 200 120 \
--window-size 800 400 \
--icon-size 100 \
--hide-extension "JMComic.app" --app-drop-link 600 185 \
${{ env.PACKAGENAME }}.dmg dist/JMComic.app
zip -9 jmcomic.zip ${{ env.PACKAGENAME }}.dmg
mv ${{ env.PACKAGENAME }}.dmg ..
mv jmcomic.zip ..
cd ..
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: jmcomic.zip
- name: upload-macos
uses: actions/upload-release-asset@v1
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

windows:
needs: [setup, release]
runs-on: windows-latest
Expand Down Expand Up @@ -183,54 +120,3 @@ jobs:
asset_path: ${{ env.PACKAGENAME }}.zip
asset_name: ${{ env.PACKAGENAME }}.zip
asset_content_type: application/zip

ubuntu:
needs: [setup, release]
runs-on: ubuntu-20.04
env:
PACKAGENAME: ${{ needs.setup.outputs.PACKAGE_PREFIX }}_linux_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/sr_ncnn_vulkan-1.2.0-cp37-cp37m-linux_x86_64.whl
pip install -r src/requirements.txt
- name: Build
run: |
cd src
pyinstaller --hidden-import=_cffi_backend --collect-data curl_cffi --add-data "../lib/linux/*:." -w start.py
cd dist
mkdir -p jmcomic.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/* jmcomic.AppRun/
cp -r ../../res/icon/logo_round.png jmcomic.AppRun/JMComic.png
cp -r start/* jmcomic.AppRun/usr/bin/
mv jmcomic.AppRun/usr/bin/start jmcomic.AppRun/usr/bin/JMComic
chmod +x jmcomic.AppRun/AppRun
chmod +x jmcomic.AppRun/usr/bin/JMComic
./appimagetool-x86_64.AppImage jmcomic.AppRun
mv JMComic-x86_64.AppImage ../../${{ env.PACKAGENAME }}-x86_64.AppImage
cd ../..
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}-x86_64.AppImage
- 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
Binary file modified res/icon/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/icon/loading/loading_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/icon/loading/loading_10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/icon/loading/loading_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/icon/loading/loading_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/icon/loading/loading_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/icon/loading/loading_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/icon/loading/loading_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/icon/loading/loading_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/icon/loading/loading_8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/icon/loading/loading_9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/component/widget/navigation_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def Logout(self):

def LoginSucBack(self):
self.UpdateProxyName()
QtOwner().owner.LoginSucBack()
# QtOwner().owner.LoginSucBack()
if not QtOwner().user.isLogin:
return
# self.pushButton.hide()
Expand Down
8 changes: 4 additions & 4 deletions src/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
UpdateUrl2Back = "https://hub.ggo.icu/tonquer/JMComic-qt/"
UpdateUrl3Back = "https://hub.fastgit.xyz/tonquer/JMComic-qt"

UpdateVersion = "v1.2.3"
RealVersion = "v1.2.3"
VersionTime = "2024-6-30"
UpdateVersion = "v1.2.5"
RealVersion = "v1.2.5"
VersionTime = "2024-10-15"

Waifu2xVersion = "1.1.6"
Waifu2xVersion = "1.2.0"
LoginUserName = ""


Expand Down
16 changes: 12 additions & 4 deletions src/config/global_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ def set_value(self, value):

class GlobalConfig:
Ver = GlobalItem(22)
VerTime = GlobalItem("2024-10-15")

# web url
WebDnsList = GlobalItem([])
Url = GlobalItem("https://18-comicblade.art")
UrlList = GlobalItem(["https://18-comicblade.art","https://18comic.vip","https://jmcomic.me","https://18-comicstellar.club","https://18comic.tw","https://18-comicstellar.me"])
UrlList = GlobalItem(["https://18comic-hok.vip","https://18comic.vip","https://jmcomic.me","https://18comic-16promax.club","https://18comic.tw","https://18comic-doa.xyz"])

# mobile url

Expand Down Expand Up @@ -78,11 +79,18 @@ def GetImgUrl2(index):
@staticmethod
def LoadSetting():
try:
newKv = {}
for k, v in dict(Setting.GlobalConfig.value).items():
Log.Debug("load global setting, k={}, v={}".format(k, v))
value = getattr(GlobalConfig, k, "")
if isinstance(value, GlobalItem) :
value.set_value(v)
newKv[k] = v
oldV = newKv.get("Ver", 0)
if GlobalConfig.Ver.value > oldV:
Log.Debug("can not load old config, ver:{}->{}".format(oldV, GlobalConfig.Ver.value))
else:
for k, v in newKv.items():
value = getattr(GlobalConfig, k, "")
if isinstance(value, GlobalItem):
value.set_value(v)
except Exception as es:
Log.Error(es)
pass
Expand Down
Loading

0 comments on commit 77b1f88

Please sign in to comment.