-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from MarcinOrlowski/dev
Release 1.1.0
- Loading branch information
Showing
15 changed files
with
298 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,46 @@ | ||
#!/bin/bash | ||
|
||
ACTVATED=0 | ||
if [[ -n "{$VIRTUAL_ENV}" ]]; then | ||
source venv/bin/activate | ||
ACTIVATED=1 | ||
################################################################################## | ||
# | ||
# Website As App | ||
# Run any website as standalone desktop application | ||
# | ||
# @author Marcin Orlowski <mail (#) marcinOrlowski (.) com> | ||
# @copyright 2023-2024 Marcin Orlowski | ||
# @license https://www.opensource.org/licenses/mit-license.php MIT | ||
# @link https://github.com/MarcinOrlowski/website-as-app | ||
# | ||
################################################################################## | ||
|
||
# Function to extract version components from const.py | ||
extract_version() { | ||
local const_file="websiteapp/const.py" | ||
local major=$(sed -n 's/.*MAJOR *= *\([0-9]\+\).*/\1/p' "$const_file") | ||
local minor=$(sed -n 's/.*MINOR *= *\([0-9]\+\).*/\1/p' "$const_file") | ||
local patch=$(sed -n 's/.*PATCH *= *\([0-9]\+\).*/\1/p' "$const_file") | ||
echo "${major}.${minor}.${patch}" | ||
} | ||
|
||
# Extract version | ||
VERSION=$(extract_version) | ||
echo "Current version: ${VERSION}" | ||
|
||
# Check if version was successfully extracted | ||
if [ -z "$VERSION" ]; then | ||
echo "Error: Failed to extract version from const source file." | ||
exit 1 | ||
fi | ||
|
||
ACTIVATED=0 | ||
if [[ -n "${VIRTUAL_ENV}" ]]; then | ||
source venv/bin/activate | ||
ACTIVATED=1 | ||
fi | ||
|
||
python3 -m build && | ||
pip uninstall --yes dist/website_as_app-1.0.0-py3-none-any.whl && | ||
pip install dist/website_as_app-1.0.0-py3-none-any.whl | ||
pip uninstall --yes "dist/website_as_app-${VERSION}-py3-none-any.whl" && | ||
pip install "dist/website_as_app-${VERSION}-py3-none-any.whl" | ||
|
||
if [[ ${ACTIVATED} -eq 1 ]]; then | ||
deactivate | ||
deactivate | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ twine | |
wheel | ||
build | ||
wemake-python-styleguide | ||
pyinstaller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
PySide6>=6.6.1 | ||
PyQtWebEngine>=5.15.6 | ||
fasteners>=0.19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# -*- mode: python ; coding: utf-8 -*- | ||
|
||
################################################################################## | ||
# | ||
# Website As App | ||
# Run any website as standalone desktop application | ||
# | ||
# @author Marcin Orlowski <mail (#) marcinOrlowski (.) com> | ||
# @copyright 2023-2024 Marcin Orlowski | ||
# @license https://www.opensource.org/licenses/mit-license.php MIT | ||
# @link https://github.com/MarcinOrlowski/website-as-app | ||
# | ||
##### | ||
# | ||
# python -m venv venv | ||
# source venv/bin/activate | ||
# pip install -r requirements-dev.txt | ||
# | ||
# On Windows: | ||
# pyinstaller webapp.spec | ||
# | ||
# On Ubuntu: | ||
# apt install -y wine32:i386 libgd3:i386 | ||
# # install python under wine: | ||
# wget https://www.python.org/ftp/python/3.12.4/python-3.12.4.exe | ||
# wine python-3.12.4.exe | ||
# | ||
# | ||
|
||
|
||
block_cipher = None | ||
|
||
a = Analysis( | ||
['websiteapp/webapp.py'], | ||
pathex=[], | ||
binaries=[], | ||
datas=[ | ||
('websiteapp/icons/default.png', 'websiteapp/icons'), | ||
('websiteapp/icons/logo.png', 'websiteapp/icons'), | ||
], | ||
hiddenimports=['websiteapp.const', 'PySide6', 'PyQtWebEngine'], | ||
hookspath=[], | ||
hooksconfig={}, | ||
runtime_hooks=[], | ||
excludes=[], | ||
noarchive=False, | ||
optimize=0, | ||
|
||
win_no_prefer_redirects=False, | ||
win_private_assemblies=False, | ||
cipher=block_cipher, | ||
) | ||
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) | ||
|
||
exe = EXE( | ||
pyz, | ||
a.scripts, | ||
[], | ||
exclude_binaries=True, | ||
name='webapp', | ||
debug=False, | ||
bootloader_ignore_signals=False, | ||
strip=False, | ||
upx=True, | ||
upx_exclude=[], | ||
runtime_tmpdir=None, | ||
console=True, | ||
) | ||
|
||
coll = COLLECT( | ||
exe, | ||
a.binaries, | ||
a.zipfiles, | ||
a.datas, | ||
strip=False, | ||
upx=True, | ||
upx_exclude=[], | ||
name='webapp', | ||
) |
Empty file.
Oops, something went wrong.