Skip to content

Commit

Permalink
bump version to 6.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
leovan committed May 25, 2023
1 parent c298fc1 commit 33b89c0
Show file tree
Hide file tree
Showing 53 changed files with 954 additions and 636 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'

- name: Install create-dmg
run: brew install create-dmg
Expand All @@ -36,7 +36,7 @@ jobs:
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'

- name: Build and package
run: ./building/build_windows_x64.ps1
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## [6.1.0](https://github.com/leovan/SciHubEVA/compare/v6.1.0...v6.0.0) (2023-05-25)

### Bug Fixes

- Optimize fetching PDF URL when link is a relative path.

### Features

- Change to Material 3 theme.

## [6.0.0](https://github.com/leovan/SciHubEVA/compare/v5.1.2...v6.0.0) (2022-10-02)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018-2022 Leo Van
Copyright (c) 2018-2023 范叶亮 Leo Van

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sci-Hub EVA <img src="images/SciHubEVA-icon.png" align="right" alt="logo" width="100" height = "100" style = "border: none; float: right;">
# Sci-Hub EVA <img src="images/SciHubEVA-icon.png" align="right" alt="logo" width="100" height="100" style="border: none; float: right;">
![Release](https://img.shields.io/github/release/leovan/SciHubEVA.svg)
![License](https://img.shields.io/github/license/leovan/SciHubEVA.svg)
![Issues](https://img.shields.io/github/issues/leovan/SciHubEVA.svg)
Expand All @@ -12,7 +12,7 @@

## Usage

![Application macOS EN](docs/scihub-eva-application-macos-en.png)
![Application macOS EN](docs/scihub-eva-application-macos-en-light-theme.png)

Click `OPEN` button to choose where to save the downloaded files. Click `SHOW` button will open the directory where you set.

Expand Down
4 changes: 3 additions & 1 deletion SciHubEVA.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@
<file>ui/Preferences.qml</file>
<file>ui/SciHubEVA.qml</file>
<file>ui/elements/IconButton.qml</file>
<file>ui/elements/ItemDelegate.qml</file>
<file>ui/elements/Message.qml</file>
<file>ui/elements/ScrollBar.qml</file>
<file>images/SciHubEVA-background-dark.png</file>
<file>images/SciHubEVA-background-light.png</file>
<file>images/SciHubEVA-icon.png</file>
<file>images/icons/box_important.svg</file>
<file>images/icons/cancel.svg</file>
<file>images/icons/edit_file.svg</file>
<file>images/icons/ethernet_on.svg</file>
<file>images/icons/help.svg</file>
<file>images/icons/info.svg</file>
<file>images/icons/monitor.svg</file>
<file>images/icons/settings.svg</file>
<file>images/icons/edit_file.svg</file>
</qresource>
</RCC>
28 changes: 23 additions & 5 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os
import sys
import multiprocessing

import scihub_eva.resources

Expand All @@ -16,21 +17,34 @@
from scihub_eva.ui.scihub_eva import UISciHubEVA


if __name__ == '__main__':
def main():
multiprocessing.freeze_support()

app_path = os.path.abspath(os.path.dirname(sys.argv[0]))
os.environ['QT_QUICK_CONTROLS_CONF'] = (PREFERENCES_DIR / 'qtquickcontrols2.conf').resolve().as_posix()
os.environ['QT_QUICK_CONTROLS_CONF'] = (
PREFERENCES_DIR / 'qtquickcontrols2.conf').resolve().as_posix()

if is_windows():
os.environ['QSG_RHI_BACKEND'] = 'opengl'

os.environ['QT_ENABLE_GLYPH_CACHE_WORKAROUND'] = '1'
os.environ['QML_USE_GLYPHCACHE_WORKAROUND'] = '1'

if is_app_dark_theme():
os.environ['QT_QUICK_CONTROLS_MATERIAL_BACKGROUND'] = '#3F3F3F'
else:
os.environ['QT_QUICK_CONTROLS_MATERIAL_BACKGROUND'] = '#FFFFFF'

QCoreApplication.setOrganizationName(ORGANIZATION_NAME)
QCoreApplication.setOrganizationDomain(ORGANIZATION_DOMAIN)
QCoreApplication.setApplicationName(APPLICATION_NAME)

app = QGuiApplication(sys.argv)
argv = [app_path, '--ignore-gpu-blacklist', '--enable-gpu-rasterization']
app = QGuiApplication(argv)

lang = Preferences.get_or_default(SYSTEM_LANGUAGE_KEY, SYSTEM_LANGUAGE)
lang_file_path = (I18N_DIR / 'SciHubEVA_{lang}.qm'.format(lang=lang)).resolve().as_posix()
lang_file_path = (I18N_DIR / 'SciHubEVA_{lang}.qm'.format(
lang=lang)).resolve().as_posix()

if os.path.exists(lang_file_path):
translator = QTranslator()
Expand All @@ -40,5 +54,9 @@
icon_file_path = (IMAGES_DIR / 'SciHubEVA-icon.png').resolve().as_posix()
app.setWindowIcon(QIcon(icon_file_path))

eva = UISciHubEVA()
UISciHubEVA()
sys.exit(app.exec())


if __name__ == '__main__':
main()
2 changes: 1 addition & 1 deletion building/Windows/SciHubEVA-x64.iss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define MyAppName "Sci-Hub EVA"
#define MyAppVersion "6.0.0"
#define MyAppVersion "6.1.0"
#define MyAppPublisher "Leo Van"
#define MyAppURL "https://github.com/leovan/SciHubEVA"
#define MyAppExeName "SciHubEVA.exe"
Expand Down
8 changes: 4 additions & 4 deletions building/Windows/SciHubEVA.win.version
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VSVersionInfo(
ffi=FixedFileInfo(
filevers=(6, 0, 0, 0),
prodvers=(6, 0, 0, 0),
filevers=(6, 1, 0, 0),
prodvers=(6, 1, 0, 0),
mask=0x3f,
flags=0x0,
OS=0x4,
Expand All @@ -16,12 +16,12 @@ VSVersionInfo(
u'040904B0',
[StringStruct(u'CompanyName', u'Leo Van'),
StringStruct(u'FileDescription', u'Sci-Hub EVA'),
StringStruct(u'FileVersion', u'6.0.0.0'),
StringStruct(u'FileVersion', u'6.1.0.0'),
StringStruct(u'InternalName', u'SciHubEVA'),
StringStruct(u'LegalCopyright', u'\xa9 2018-2020 Leo Van.'),
StringStruct(u'OriginalFilename', u'SciHubEVA.Exe'),
StringStruct(u'ProductName', u'Sci-Hub EVA'),
StringStruct(u'ProductVersion', u'6.0.0.0')])
StringStruct(u'ProductVersion', u'6.1.0.0')])
]),
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
]
Expand Down
4 changes: 2 additions & 2 deletions building/build_macos_x64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ pyinstaller app.py \

cp building/macOS/Info.plist dist-macOS-x64/SciHubEVA.app/Contents

echo "Post process"
python building/post_process.py dist-macOS-x64

echo "Package with create-dmg"

create-dmg \
--volname "Sci-Hub EVA" \
--volicon "building/macOS/SciHubEVA-dmg.icns" \
Expand All @@ -49,6 +49,6 @@ create-dmg \
--hide-extension "SciHubEVA.app" \
--app-drop-link 300 150 \
--eula "LICENSE" \
--format "UDBZ" \
--format "ULFO" \
"dist-macOS-x64/SciHubEVA-x64-latest.dmg" \
"dist-macOS-x64/SciHubEVA.app"
3 changes: 1 addition & 2 deletions building/build_windows_x64.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ pyinstaller app.py `
--clean `
--noupx

Write-Output "Post process"
python building/post_process.py dist-Windows-x64

Write-Output "Package with Inno Setup"

Invoke-WebRequest -Uri "https://github.com/jrsoftware/issrc/raw/main/Files/Languages/Unofficial/ChineseSimplified.isl" -OutFile "building\\Windows\\ChineseSimplified.isl"
Invoke-WebRequest -Uri "https://github.com/jrsoftware/issrc/raw/main/Files/Languages/Unofficial/ChineseTraditional.isl" -OutFile "building\\Windows\\ChineseTraditional.isl"

& "${Env:ProgramFiles(x86)}\\Inno Setup 6\\ISCC.exe" "building\\Windows\\SciHubEVA-x64.iss"
13 changes: 8 additions & 5 deletions building/convert_i18n_zh.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@


if __name__ == '__main__':
tw_converter = opencc.OpenCC('s2twp.json')
hk_converter = opencc.OpenCC('s2hk.json')
tw_converter = opencc.OpenCC('s2twp')
hk_converter = opencc.OpenCC('s2hk')

i18n_directory = Path(os.path.dirname(__file__)) / '..' / 'i18n'

with open(i18n_directory / 'SciHubEVA_zh_CN.ts', 'r', encoding='utf-8') as zh_i18n_f:
with open(i18n_directory / 'SciHubEVA_zh_CN.ts', 'r',
encoding='utf-8') as zh_i18n_f:
zh_i18n_str = zh_i18n_f.read()

hk_i18n_str = hk_converter.convert(zh_i18n_str)
with open(i18n_directory / 'SciHubEVA_zh_HK.ts', 'w', encoding='utf-8') as hk_i18n_f:
with open(i18n_directory / 'SciHubEVA_zh_HK.ts', 'w',
encoding='utf-8') as hk_i18n_f:
hk_i18n_f.write(hk_i18n_str)

tw_i18n_str = tw_converter.convert(zh_i18n_str)
with open(i18n_directory / 'SciHubEVA_zh_TW.ts', 'w', encoding='utf-8') as tw_i18n_f:
with open(i18n_directory / 'SciHubEVA_zh_TW.ts', 'w',
encoding='utf-8') as tw_i18n_f:
tw_i18n_f.write(tw_i18n_str)
2 changes: 1 addition & 1 deletion building/macOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>MacOS/SciHubEVA</string>
<key>CFBundleShortVersionString</key>
<string>6.0.0</string>
<string>6.1.0</string>
<key>LSBackgroundOnly</key>
<string>0</string>
<key>CFBundleName</key>
Expand Down
Loading

0 comments on commit 33b89c0

Please sign in to comment.