diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 0000000..551083a --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,15 @@ +name: build-release +run-name: build-release +on: [push] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.12 + - name: install dependancies + run: pip install -r requirements.txt + - name: build package + run: pyinstaller builder.py modules/*.py -n StaticGalleryBuilder diff --git a/builder.py b/builder.py index 58760f4..33938f6 100755 --- a/builder.py +++ b/builder.py @@ -4,7 +4,7 @@ import re import shutil import fnmatch import urllib.parse -from multiprocessing import Pool +from multiprocessing import Pool, freeze_support from pathlib import Path from typing import Dict, List, Tuple @@ -19,7 +19,7 @@ from modules.generate_html import list_folder, EXCLUDES # Constants STATIC_FILES_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), "files") SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) -VERSION = "2.2.4" +VERSION = "2.2.5" RAW_EXTENSIONS = [ ".3fr", ".ari", ".arw", ".bay", ".braw", ".crw", ".cr2", ".cr3", ".cap", ".data", ".dcs", ".dcr", ".dng", ".drf", ".eip", ".erf", ".fff", ".gpr", ".iiq", ".k25", ".kdc", ".mdc", ".mef", ".mos", @@ -221,4 +221,5 @@ def main() -> None: if __name__ == "__main__": + freeze_support() main() diff --git a/requirements.txt b/requirements.txt index 6b41c3e..c47f7c6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,6 @@ CairoSVG==2.7.1 Jinja2==3.1.4 numpy==2.0.0 pillow==10.4.0 +pyinstaller==6.9.0 rich-argparse==1.5.2 tqdm==4.66.4 \ No newline at end of file