Skip to content

Commit

Permalink
chore: update pyside, briefcase, mkdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
dynobo committed Nov 12, 2024
1 parent 762bb26 commit e8f33a1
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 13 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ take a look at the [FAQs](https://dynobo.github.io/normcap/#faqs) or
#### Linux
- [NormCap-0.5.9-x86_64.AppImage](https://github.com/dynobo/normcap/releases/download/v0.5.9/NormCap-0.5.9-x86_64.AppImage)
(Binary, requires [fuse](https://dynobo.github.io/normcap/faqs/#linux-appimage-error-appimages-require-fuse-to-run) & [libcrypt](https://dynobo.github.io/normcap/faqs/#linux-appimage-error-while-loading-shared-libraries-libcryptso1))

TODO: Verify that AppImage does not require libcrypt anymore. Then remove from FAQ and here.

- [com.github.dynobo.normcap @ FlatHub](https://flathub.org/apps/details/com.github.dynobo.normcap)
(FlatPak)
- [`normcap` @ AUR](https://aur.archlinux.org/packages/normcap) (Arch/Manjaro)
Expand Down
3 changes: 2 additions & 1 deletion bundle/platforms/linux_briefcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _add_metainfo_to_appimage(self) -> None:
shutil.copy(metainfo, target_path / "metainfo")

def _patch_briefcase_appimage_to_include_deps(self) -> None:
"""Insert code into briefcase appimage code to add additional deps.
"""Insert code into briefcase appimage to add additional deps.
Currently adds:
- tesseract
Expand All @@ -55,6 +55,7 @@ def _patch_briefcase_appimage_to_include_deps(self) -> None:

def _patch_briefcase_appimage_to_run_cmd(self) -> None:
"""Execute _before_ linuxdeploy."""
# TODO: check if still necessary
file_path = (
Path(briefcase.__file__).parent / "platforms" / "linux" / "appimage.py"
)
Expand Down
1 change: 1 addition & 0 deletions bundle/platforms/macos_briefcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def _patch_info_plist_for_proper_fullscreen(self) -> None:
See details:
https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/20001431-113616
"""
# TODO: Replace by briefcase config
file_path = Path("macOS/app/NormCap/NormCap.app/Contents") / "Info.plist"
patch = """
<key>LSUIPresentationMode</key>
Expand Down
2 changes: 2 additions & 0 deletions bundle/platforms/windows_briefcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def _download_openssl(self) -> None:
# For mirrors see: https://wiki.openssl.org/index.php/Binaries
# openssl_url = "http://mirror.firedaemon.com/OpenSSL/openssl-1.1.1q.zip"
# openssl_url = "http://wiki.overbyte.eu/arch/openssl-1.1.1q-win64.zip"
# TODO: Update openssl
openssl_url = "https://indy.fulgan.com/SSL/openssl-1.0.2u-x64_86-win64.zip"
target_path = self.PROJECT_PATH / "normcap" / "resources" / "openssl"
target_path.mkdir(exist_ok=True)
Expand All @@ -35,6 +36,7 @@ def _download_openssl(self) -> None:
zip_path.unlink()

def _patch_main_cpp(self) -> None:
# TODO: Test if still needed
main_cpp = (
self.PROJECT_PATH
/ "build"
Expand Down
26 changes: 14 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ classifiers = [
"Operating System :: MacOS",
]
dependencies = [
"shiboken6==6.7.1",
"PySide6-Essentials==6.7.1",
"shiboken6==6.8.0.2",
"PySide6-Essentials==6.8.0.2",
"jeepney==0.8.0",
]

Expand All @@ -53,14 +53,14 @@ artifacts = ["*.mo"]
[dependency-groups]
dev = [
"babel>=2.12.1",
"briefcase==0.3.16", # pinned because building relies on it!
"briefcase==0.3.20", # pinned because building relies on it!
"coverage[toml]>=6.5",
"coveralls>=3.3.1",
"mdformat-gfm>=0.3.6",
"mdformat-simple-breaks>=0.0.1",
"mdformat-mkdocs>=2.0.1",
"mdformat-frontmatter>=2.0.1",
"mkdocs-material==9.5.19", # pinned because docs rely on it!
"mkdocs-material==9.5.44", # pinned because docs rely on it!
"mkdocs-glightbox>=0.3.5",
"mypy>=1.3.0",
"pip-audit>=2.5.5",
Expand Down Expand Up @@ -253,20 +253,15 @@ max_cluster_size = 1
[tool.briefcase]
project_name = "NormCap"
bundle = "eu.dynobo"
version = "0.5.9"
url = "https://github.com/dynobo/normcap"
license = "GPLv3"
author = 'dynobo'
author_email = "[email protected]"

# TODO: wix was updated. Check compatibility. Run briefcase upgrade wix

[tool.briefcase.app.normcap]
formal_name = "NormCap"
description = "OCR-powered screen-capture tool to capture information instead of images"
sources = ["normcap"]
icon = "bundle/imgs/normcap"
installer_icon = "bundle/imgs/normcap_install"
installer_background = "bundle/imgs/normcap_install_bg"
requires = ["PySide6-Essentials==6.7.1", "shiboken6==6.7.1", "jeepney==0.8.0"]
cleanup_paths = [
# Globs
"**/[pP]y[sS]ide6/*[qQ]t*[oO]pen[gG][lL]*",
Expand Down Expand Up @@ -311,8 +306,13 @@ cleanup_paths = [
"**/NormCap.pdb",
]

[tool.briefcase.app.normcap.macOS]
[tool.briefcase.app.normcap.macOS.Xcode]
requires = ["std-nslog==1.0.0"]
universal_build = true
# TODO: Configure Entitlements.plist ? For screenshot and notify permissions?
# TODO: Info.plist?
# TODO: Remove build for x64 (not needed anymore). Also from docs.


[tool.briefcase.app.normcap.linux.appimage]
template = "https://github.com/beeware/briefcase-linux-appimage-template"
Expand Down Expand Up @@ -363,6 +363,8 @@ ENV LD_LIBRARY_PATH "$LD_LIBRARY_PATH:/app/NormCap.AppDir/usr/app_packages/shibo
USER brutus
"""

# TODO: Use briefcase --Xdocker-build for docker build args (if applicable)

[tool.briefcase.app.normcap.windows]
use_full_install_path = false

Expand Down

0 comments on commit e8f33a1

Please sign in to comment.