From 814ea150df3f1c48a9a82440dd16fec91357c441 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 16:14:30 -0300 Subject: [PATCH 01/30] build(deps): create setup.py --- setup.py | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..d91daa0 --- /dev/null +++ b/setup.py @@ -0,0 +1,45 @@ +from setuptools import setup, find_packages +import pathlib +from vne import __version__ as version + + +here = pathlib.Path(__file__).parent.resolve() +long_description = (here / "README.md").read_text(encoding="utf-8") if (here / "README.md").exists() else "Visual Novel Engine." + +# Solo dependencias esenciales del motor +engine_requirements = [ + "pygame-ce", + "pyinstaller", + "pyzipper", + "cryptography", + "Pillow", + "PyQt6" +] + +setup( + name="vne", + version=version, + description="Visual Novel Engine", + long_description=long_description, + long_description_content_type="text/markdown", + author="Neyunse", + url="https://github.com/Neyunse/vne", + packages=find_packages(), + install_requires=engine_requirements, + python_requires='>=3.8', + include_package_data=True, + entry_points={ + "console_scripts": [ + "vne=main:main" + ] + }, + keywords=["visual novel", "engine", "pygame", "pyinstaller"], + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Intended Audience :: Developers", + "Topic :: Games/Entertainment", + "Topic :: Software Development :: Libraries :: Application Frameworks" + ], +) From edbb57733e0a322a1a46d61713ee0fe2bf962fe4 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 18:13:52 -0300 Subject: [PATCH 02/30] build(deps): update build.py and setup.py --- build.py | 143 ++++++++++++++++++++++++++++++++++++++++++------------- setup.py | 31 +++++++----- 2 files changed, 129 insertions(+), 45 deletions(-) diff --git a/build.py b/build.py index fdf92b4..cf91f1f 100644 --- a/build.py +++ b/build.py @@ -6,7 +6,6 @@ def zip_folders_and_files(folders, files, zip_path): with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zipf: - if folders: for folder_path in folders: if folder_path and os.path.isdir(folder_path): @@ -15,30 +14,56 @@ def zip_folders_and_files(folders, files, zip_path): full_path = os.path.join(root, file) arcname = os.path.relpath(full_path, start=os.path.dirname(folder_path)) zipf.write(full_path, arcname) - - if files: for file_path in files: if file_path and os.path.isfile(file_path): zipf.write(file_path, os.path.basename(file_path)) -def build(spec="engine"): - if spec == "bootstrapper": - return [ +def package_platform(platform_name, bin_path, extra_files=None, extra_folders=None, is_engine=False): + dist_dir = f'./dist/{platform_name}' + os.makedirs(dist_dir, exist_ok=True) + import shutil + # Si es el engine, va directo en dist/ + if is_engine and os.path.isfile(bin_path): + dest_bin = os.path.join(dist_dir, os.path.basename(bin_path)) + if os.path.abspath(bin_path) != os.path.abspath(dest_bin): + shutil.copy2(bin_path, dest_bin) + # Si es bootstrapper, va en dist/lib/ + elif not is_engine and os.path.isfile(bin_path): + lib_dir = os.path.join(dist_dir, "lib") + plat_lib_dir = os.path.join(lib_dir, platform_name) + os.makedirs(plat_lib_dir, exist_ok=True) + dest_bin = os.path.join(plat_lib_dir, os.path.basename(bin_path)) + if os.path.abspath(bin_path) != os.path.abspath(dest_bin): + shutil.copy2(bin_path, dest_bin) + # Copia archivos extra + if extra_files: + for f in extra_files: + if os.path.isfile(f): + shutil.copy2(f, dist_dir) + # Copia carpetas extra + if extra_folders: + for folder in extra_folders: + if os.path.isdir(folder): + dest_folder = os.path.join(dist_dir, os.path.basename(folder)) + if os.path.abspath(folder) != os.path.abspath(dest_folder): + shutil.copytree(folder, dest_folder, dirs_exist_ok=True) + # Empaqueta en zip + zip_folders_and_files([dist_dir], [], f'./dist/{platform_name}.zip') + +def build(spec="engine", platform_name=None): + # Permite especificar distpath por plataforma + distpath = f"./dist/lib/{platform_name}" if platform_name else "./dist/lib/win" + args = [ "pyinstaller", "--clean", "--distpath", - "./dist/lib/win", + distpath, "--workpath", "./build", f"{spec}.spec" ] - - return [ - "pyinstaller", - "--clean", - f"{spec}.spec" - ] + return args def buildDoc(): return [ @@ -52,30 +77,84 @@ def buildDoc(): ] def build_engine(): - # Verify that main.py exists in the current directory. + # Verifica main.py y bootstrapper.py if not os.path.exists("main.py"): - print("[build.py] Error: main.py was not found in the current directory.") + print("[build.py] Error: main.py was not found in el directorio actual.") + sys.exit(1) + if not os.path.exists("bootstrapper.py"): + print("[build.py] Error: bootstrapper.py was not found in el directorio actual.") sys.exit(1) - try: - engine = build() - bootstrapper = build("bootstrapper") - doc = buildDoc() - - - print("[build.py] Compiling the engine with PyInstaller...") - subprocess.check_call(engine) - print("[build.py] Engine compiled successfully in the 'dist' folder.") - - print("[build.py] Compiling the bootstrapper with PyInstaller...") - subprocess.check_call(bootstrapper) - print("[build.py] Engine compiled successfully in the 'dist' folder.") - + # Documentación print("[build.py] Building local documentation") - subprocess.check_call(doc) + subprocess.check_call(buildDoc()) print("[build.py] The documentation was correctly constructed") - - zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine.exe'], './dist/vne.zip') + # Compilación por plataforma + platforms = { + "win": { + "main": { + "spec": "engine", + "bin": "./dist/lib/win/engine.exe", + "extra_files": [], + "extra_folders": ["./dist/docs"] + }, + "bootstrapper": { + "spec": "bootstrapper", + "bin": "./dist/lib/win/bootstrapper.exe", + "extra_files": [], + "extra_folders": ["./dist/docs"] + } + }, + "linux": { + "main": { + "spec": "engine", + "bin": "./dist/lib/linux/engine", + "extra_files": [], + "extra_folders": ["./dist/docs"] + }, + "bootstrapper": { + "spec": "bootstrapper", + "bin": "./dist/lib/linux/bootstrapper", + "extra_files": [], + "extra_folders": ["./dist/docs"] + } + }, + "mac": { + "main": { + "spec": "engine", + "bin": "./dist/lib/mac/engine", + "extra_files": [], + "extra_folders": ["./dist/docs"] + }, + "bootstrapper": { + "spec": "bootstrapper", + "bin": "./dist/lib/mac/bootstrapper", + "extra_files": [], + "extra_folders": ["./dist/docs"] + } + } + } + # Compila y empaqueta para cada plataforma y ejecutable + for plat, infos in platforms.items(): + # Primero engine + info_engine = infos.get("main") + if info_engine: + print(f"[build.py] Compiling engine for {plat}...") + args = build(info_engine["spec"], plat) + subprocess.check_call(args) + print(f"[build.py] Engine for {plat} compiled successfully.") + package_platform(plat, info_engine["bin"], info_engine["extra_files"], info_engine["extra_folders"], is_engine=True) + print(f"[build.py] Distribution for {plat} (engine) packaged.") + # Luego bootstrapper + info_boot = infos.get("bootstrapper") + if info_boot: + print(f"[build.py] Compiling bootstrapper for {plat}...") + args = build(info_boot["spec"], plat) + subprocess.check_call(args) + print(f"[build.py] Bootstrapper for {plat} compiled successfully.") + package_platform(plat, info_boot["bin"], info_boot["extra_files"], info_boot["extra_folders"], is_engine=False) + print(f"[build.py] Distribution for {plat} (bootstrapper) packaged.") + except subprocess.CalledProcessError as e: print(f"[build.py] Error during compilation: {e}") sys.exit(1) diff --git a/setup.py b/setup.py index d91daa0..21d7833 100644 --- a/setup.py +++ b/setup.py @@ -1,31 +1,36 @@ from setuptools import setup, find_packages import pathlib -from vne import __version__ as version - +from vne._version import __version__ here = pathlib.Path(__file__).parent.resolve() long_description = (here / "README.md").read_text(encoding="utf-8") if (here / "README.md").exists() else "Visual Novel Engine." +requirements = [] -# Solo dependencias esenciales del motor -engine_requirements = [ - "pygame-ce", - "pyinstaller", - "pyzipper", - "cryptography", - "Pillow", - "PyQt6" -] +import re +with open("requirements.txt", "rb") as f: + requirements = [] + for line in f: + try: + decoded = line.decode("utf-8").strip() + except UnicodeDecodeError: + decoded = line.decode("utf-8", errors="ignore").strip() + # Solo líneas válidas: letras, números, guiones, puntos, >=, <=, ==, etc. + if decoded and not decoded.startswith('#'): + cleaned = re.sub(r'[^a-zA-Z0-9_\-.>=<, ]', '', decoded) + if cleaned: + requirements.append(cleaned) setup( name="vne", - version=version, + version=__version__, + license="MIT", description="Visual Novel Engine", long_description=long_description, long_description_content_type="text/markdown", author="Neyunse", url="https://github.com/Neyunse/vne", packages=find_packages(), - install_requires=engine_requirements, + install_requires=requirements, python_requires='>=3.8', include_package_data=True, entry_points={ From 66ccb2e868ddc56d3e3689071e527a8b97d72af9 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 18:17:51 -0300 Subject: [PATCH 03/30] create 1 file and delete 1 file --- .github/workflows/build-multiplatform.yml | 71 +++++++++++++++++++++++ setup.py | 50 ---------------- 2 files changed, 71 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/build-multiplatform.yml delete mode 100644 setup.py diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml new file mode 100644 index 0000000..f0d90ce --- /dev/null +++ b/.github/workflows/build-multiplatform.yml @@ -0,0 +1,71 @@ +name: Build Multiplatform Engine + +on: + push: + branches: [gh/neyunse/test] + pull_request: + branches: [gh/neyunse/test] + +jobs: + build-windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Build engine and bootstrapper + run: | + python build.py + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: dist-windows + path: dist/win*.zip + + build-linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Build engine and bootstrapper + run: | + python build.py + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: dist-linux + path: dist/linux*.zip + + build-mac: + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Build engine and bootstrapper + run: | + python build.py + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: dist-mac + path: dist/mac*.zip diff --git a/setup.py b/setup.py deleted file mode 100644 index 21d7833..0000000 --- a/setup.py +++ /dev/null @@ -1,50 +0,0 @@ -from setuptools import setup, find_packages -import pathlib -from vne._version import __version__ - -here = pathlib.Path(__file__).parent.resolve() -long_description = (here / "README.md").read_text(encoding="utf-8") if (here / "README.md").exists() else "Visual Novel Engine." -requirements = [] - -import re -with open("requirements.txt", "rb") as f: - requirements = [] - for line in f: - try: - decoded = line.decode("utf-8").strip() - except UnicodeDecodeError: - decoded = line.decode("utf-8", errors="ignore").strip() - # Solo líneas válidas: letras, números, guiones, puntos, >=, <=, ==, etc. - if decoded and not decoded.startswith('#'): - cleaned = re.sub(r'[^a-zA-Z0-9_\-.>=<, ]', '', decoded) - if cleaned: - requirements.append(cleaned) - -setup( - name="vne", - version=__version__, - license="MIT", - description="Visual Novel Engine", - long_description=long_description, - long_description_content_type="text/markdown", - author="Neyunse", - url="https://github.com/Neyunse/vne", - packages=find_packages(), - install_requires=requirements, - python_requires='>=3.8', - include_package_data=True, - entry_points={ - "console_scripts": [ - "vne=main:main" - ] - }, - keywords=["visual novel", "engine", "pygame", "pyinstaller"], - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Intended Audience :: Developers", - "Topic :: Games/Entertainment", - "Topic :: Software Development :: Libraries :: Application Frameworks" - ], -) From 17b343e520f1b25ffa0f9cb12be7118e8e5705ad Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 18:19:54 -0300 Subject: [PATCH 04/30] ci: update build-multiplatform.yml --- .github/workflows/build-multiplatform.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index f0d90ce..5aa9ad3 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -23,7 +23,7 @@ jobs: run: | python build.py - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: dist-windows path: dist/win*.zip @@ -44,7 +44,7 @@ jobs: run: | python build.py - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: dist-linux path: dist/linux*.zip @@ -65,7 +65,7 @@ jobs: run: | python build.py - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: dist-mac path: dist/mac*.zip From cb3db06f045338bc0abe33b74ab61896ef9d1778 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 18:45:18 -0300 Subject: [PATCH 05/30] update build-multiplatform.yml, bootstrapper.spec and engine.spec --- .github/workflows/build-multiplatform.yml | 6 +++--- bootstrapper.spec | 4 +++- engine.spec | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index 5aa9ad3..204dfb3 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -8,7 +8,7 @@ on: jobs: build-windows: - runs-on: windows-latest + runs-on: windows-2022 steps: - uses: actions/checkout@v3 - name: Set up Python @@ -29,7 +29,7 @@ jobs: path: dist/win*.zip build-linux: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: Set up Python @@ -50,7 +50,7 @@ jobs: path: dist/linux*.zip build-mac: - runs-on: macos-latest + runs-on: macos-14 steps: - uses: actions/checkout@v3 - name: Set up Python diff --git a/bootstrapper.spec b/bootstrapper.spec index 6677d12..7effa9b 100644 --- a/bootstrapper.spec +++ b/bootstrapper.spec @@ -1,4 +1,6 @@ # -*- mode: python ; coding: utf-8 -*- +import os +env_hook = os.path.abspath(os.path.join(os.path.dirname(__file__), "env.py")) a = Analysis( @@ -9,7 +11,7 @@ a = Analysis( hiddenimports=["pyzipper", "cryptography"], hookspath=[], hooksconfig={}, - runtime_hooks=["env.py"], + runtime_hooks=[env_hook], excludes=[], noarchive=False, optimize=0, diff --git a/engine.spec b/engine.spec index 01a7710..d16d2e8 100644 --- a/engine.spec +++ b/engine.spec @@ -1,5 +1,6 @@ # -*- mode: python ; coding: utf-8 -*- - +import os +env_hook = os.path.abspath(os.path.join(os.path.dirname(__file__), "env.py")) a = Analysis( ['main.py'], @@ -9,7 +10,7 @@ a = Analysis( hiddenimports=["pyzipper", "cryptography"], hookspath=[], hooksconfig={}, - runtime_hooks=["env.py"], + runtime_hooks=[env_hook], excludes=[], noarchive=False, optimize=0, From 0db0478153496ec72b59e3a7e74bf875b7f11050 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 18:47:43 -0300 Subject: [PATCH 06/30] update bootstrapper.spec and engine.spec --- bootstrapper.spec | 3 +-- engine.spec | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/bootstrapper.spec b/bootstrapper.spec index 7effa9b..25ba6e7 100644 --- a/bootstrapper.spec +++ b/bootstrapper.spec @@ -1,7 +1,6 @@ # -*- mode: python ; coding: utf-8 -*- import os -env_hook = os.path.abspath(os.path.join(os.path.dirname(__file__), "env.py")) - +env_hook = os.path.abspath("env.py") a = Analysis( ['bootstrapper.py'], diff --git a/engine.spec b/engine.spec index d16d2e8..09d1d32 100644 --- a/engine.spec +++ b/engine.spec @@ -1,7 +1,6 @@ # -*- mode: python ; coding: utf-8 -*- import os -env_hook = os.path.abspath(os.path.join(os.path.dirname(__file__), "env.py")) - +env_hook = os.path.abspath("env.py") a = Analysis( ['main.py'], pathex=[], From 18a6fb0c555655d7d34dea3bc2e489888fb9a247 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 19:03:35 -0300 Subject: [PATCH 07/30] ci: update build-multiplatform.yml --- .github/workflows/build-multiplatform.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index 204dfb3..6f522b0 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -7,6 +7,14 @@ on: branches: [gh/neyunse/test] jobs: + generate-env: + runs-on: ubuntu-latest + steps: + - name: Generar env.py con VNE_KEY + run: | + echo "import os" > env.py + echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> env.py + build-windows: runs-on: windows-2022 steps: From eb5b0bcb4b87a83effeb253b27289e0975fd6018 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 19:38:51 -0300 Subject: [PATCH 08/30] update bootstrapper.spec, build.py and engine.spec --- bootstrapper.spec | 2 +- build.py | 152 ++++++++++++---------------------------------- engine.spec | 5 +- 3 files changed, 43 insertions(+), 116 deletions(-) diff --git a/bootstrapper.spec b/bootstrapper.spec index 25ba6e7..63badb1 100644 --- a/bootstrapper.spec +++ b/bootstrapper.spec @@ -10,7 +10,7 @@ a = Analysis( hiddenimports=["pyzipper", "cryptography"], hookspath=[], hooksconfig={}, - runtime_hooks=[env_hook], + runtime_hooks=["./env.py"], excludes=[], noarchive=False, optimize=0, diff --git a/build.py b/build.py index cf91f1f..8b169a9 100644 --- a/build.py +++ b/build.py @@ -3,9 +3,11 @@ import sys import subprocess import zipfile +import platform def zip_folders_and_files(folders, files, zip_path): with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zipf: + if folders: for folder_path in folders: if folder_path and os.path.isdir(folder_path): @@ -14,56 +16,30 @@ def zip_folders_and_files(folders, files, zip_path): full_path = os.path.join(root, file) arcname = os.path.relpath(full_path, start=os.path.dirname(folder_path)) zipf.write(full_path, arcname) + + if files: for file_path in files: if file_path and os.path.isfile(file_path): zipf.write(file_path, os.path.basename(file_path)) -def package_platform(platform_name, bin_path, extra_files=None, extra_folders=None, is_engine=False): - dist_dir = f'./dist/{platform_name}' - os.makedirs(dist_dir, exist_ok=True) - import shutil - # Si es el engine, va directo en dist/ - if is_engine and os.path.isfile(bin_path): - dest_bin = os.path.join(dist_dir, os.path.basename(bin_path)) - if os.path.abspath(bin_path) != os.path.abspath(dest_bin): - shutil.copy2(bin_path, dest_bin) - # Si es bootstrapper, va en dist/lib/ - elif not is_engine and os.path.isfile(bin_path): - lib_dir = os.path.join(dist_dir, "lib") - plat_lib_dir = os.path.join(lib_dir, platform_name) - os.makedirs(plat_lib_dir, exist_ok=True) - dest_bin = os.path.join(plat_lib_dir, os.path.basename(bin_path)) - if os.path.abspath(bin_path) != os.path.abspath(dest_bin): - shutil.copy2(bin_path, dest_bin) - # Copia archivos extra - if extra_files: - for f in extra_files: - if os.path.isfile(f): - shutil.copy2(f, dist_dir) - # Copia carpetas extra - if extra_folders: - for folder in extra_folders: - if os.path.isdir(folder): - dest_folder = os.path.join(dist_dir, os.path.basename(folder)) - if os.path.abspath(folder) != os.path.abspath(dest_folder): - shutil.copytree(folder, dest_folder, dirs_exist_ok=True) - # Empaqueta en zip - zip_folders_and_files([dist_dir], [], f'./dist/{platform_name}.zip') - -def build(spec="engine", platform_name=None): - # Permite especificar distpath por plataforma - distpath = f"./dist/lib/{platform_name}" if platform_name else "./dist/lib/win" - args = [ +def build(spec="engine"): + if spec == "bootstrapper": + return [ "pyinstaller", "--clean", "--distpath", - distpath, + "./dist/lib/win", "--workpath", "./build", f"{spec}.spec" ] - return args + + return [ + "pyinstaller", + "--clean", + f"{spec}.spec" + ] def buildDoc(): return [ @@ -77,87 +53,39 @@ def buildDoc(): ] def build_engine(): - # Verifica main.py y bootstrapper.py + # Verify that main.py exists in the current directory. if not os.path.exists("main.py"): - print("[build.py] Error: main.py was not found in el directorio actual.") - sys.exit(1) - if not os.path.exists("bootstrapper.py"): - print("[build.py] Error: bootstrapper.py was not found in el directorio actual.") + print("[build.py] Error: main.py was not found in the current directory.") sys.exit(1) + try: - # Documentación + engine = build() + bootstrapper = build("bootstrapper") + doc = buildDoc() + + + print("[build.py] Compiling the engine with PyInstaller...") + subprocess.check_call(engine) + print("[build.py] Engine compiled successfully in the 'dist' folder.") + + print("[build.py] Compiling the bootstrapper with PyInstaller...") + subprocess.check_call(bootstrapper) + print("[build.py] Engine compiled successfully in the 'dist' folder.") + print("[build.py] Building local documentation") - subprocess.check_call(buildDoc()) + subprocess.check_call(doc) print("[build.py] The documentation was correctly constructed") - # Compilación por plataforma - platforms = { - "win": { - "main": { - "spec": "engine", - "bin": "./dist/lib/win/engine.exe", - "extra_files": [], - "extra_folders": ["./dist/docs"] - }, - "bootstrapper": { - "spec": "bootstrapper", - "bin": "./dist/lib/win/bootstrapper.exe", - "extra_files": [], - "extra_folders": ["./dist/docs"] - } - }, - "linux": { - "main": { - "spec": "engine", - "bin": "./dist/lib/linux/engine", - "extra_files": [], - "extra_folders": ["./dist/docs"] - }, - "bootstrapper": { - "spec": "bootstrapper", - "bin": "./dist/lib/linux/bootstrapper", - "extra_files": [], - "extra_folders": ["./dist/docs"] - } - }, - "mac": { - "main": { - "spec": "engine", - "bin": "./dist/lib/mac/engine", - "extra_files": [], - "extra_folders": ["./dist/docs"] - }, - "bootstrapper": { - "spec": "bootstrapper", - "bin": "./dist/lib/mac/bootstrapper", - "extra_files": [], - "extra_folders": ["./dist/docs"] - } - } - } - # Compila y empaqueta para cada plataforma y ejecutable - for plat, infos in platforms.items(): - # Primero engine - info_engine = infos.get("main") - if info_engine: - print(f"[build.py] Compiling engine for {plat}...") - args = build(info_engine["spec"], plat) - subprocess.check_call(args) - print(f"[build.py] Engine for {plat} compiled successfully.") - package_platform(plat, info_engine["bin"], info_engine["extra_files"], info_engine["extra_folders"], is_engine=True) - print(f"[build.py] Distribution for {plat} (engine) packaged.") - # Luego bootstrapper - info_boot = infos.get("bootstrapper") - if info_boot: - print(f"[build.py] Compiling bootstrapper for {plat}...") - args = build(info_boot["spec"], plat) - subprocess.check_call(args) - print(f"[build.py] Bootstrapper for {plat} compiled successfully.") - package_platform(plat, info_boot["bin"], info_boot["extra_files"], info_boot["extra_folders"], is_engine=False) - print(f"[build.py] Distribution for {plat} (bootstrapper) packaged.") - + + if platform.system() == "Windows": + print("[build.py] Zipping the engine and documentation...") + zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine.exe'], f'./dist/vne-{platform.architecture()[0]}-{platform.system()}.zip') + else: + print("[build.py] Zipping the engine and documentation for non-Windows platforms...") + zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine'], f'./dist/vne-{platform.architecture()[0]}-{platform.system()}.zip') + except subprocess.CalledProcessError as e: print(f"[build.py] Error during compilation: {e}") sys.exit(1) if __name__ == "__main__": - build_engine() + build_engine() \ No newline at end of file diff --git a/engine.spec b/engine.spec index 09d1d32..b506d22 100644 --- a/engine.spec +++ b/engine.spec @@ -1,6 +1,5 @@ # -*- mode: python ; coding: utf-8 -*- -import os -env_hook = os.path.abspath("env.py") + a = Analysis( ['main.py'], pathex=[], @@ -9,7 +8,7 @@ a = Analysis( hiddenimports=["pyzipper", "cryptography"], hookspath=[], hooksconfig={}, - runtime_hooks=[env_hook], + runtime_hooks=["./env.py"], excludes=[], noarchive=False, optimize=0, From 6e0f6d1ae88b61e0afddea7aca33cd8d456a8bbc Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 19:43:16 -0300 Subject: [PATCH 09/30] ci: update build-multiplatform.yml --- .github/workflows/build-multiplatform.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index 6f522b0..c8ef20c 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -6,18 +6,15 @@ on: pull_request: branches: [gh/neyunse/test] + jobs: - generate-env: - runs-on: ubuntu-latest + build-windows: + runs-on: windows-2022 steps: - name: Generar env.py con VNE_KEY run: | echo "import os" > env.py echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> env.py - - build-windows: - runs-on: windows-2022 - steps: - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 @@ -38,7 +35,12 @@ jobs: build-linux: runs-on: ubuntu-22.04 + needs: build-windows steps: + - name: Generar env.py con VNE_KEY + run: | + echo "import os" > env.py + echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> env.py - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 @@ -59,7 +61,12 @@ jobs: build-mac: runs-on: macos-14 + needs: build-linux steps: + - name: Generar env.py con VNE_KEY + run: | + echo "import os" > env.py + echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> env.py - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 From 9ef868a4a3173f768247dd94553042e58963dfe0 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 19:48:58 -0300 Subject: [PATCH 10/30] update bootstrapper.spec, build.py, engine.spec and main.py --- bootstrapper.spec | 2 +- build.py | 4 ++-- engine.spec | 2 +- main.py | 12 +++++++++++- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/bootstrapper.spec b/bootstrapper.spec index 63badb1..bac6514 100644 --- a/bootstrapper.spec +++ b/bootstrapper.spec @@ -10,7 +10,7 @@ a = Analysis( hiddenimports=["pyzipper", "cryptography"], hookspath=[], hooksconfig={}, - runtime_hooks=["./env.py"], + runtime_hooks=["env.py"], excludes=[], noarchive=False, optimize=0, diff --git a/build.py b/build.py index 8b169a9..29b14df 100644 --- a/build.py +++ b/build.py @@ -78,10 +78,10 @@ def build_engine(): if platform.system() == "Windows": print("[build.py] Zipping the engine and documentation...") - zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine.exe'], f'./dist/vne-{platform.architecture()[0]}-{platform.system()}.zip') + zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine.exe'], f'./dist/vne.zip') else: print("[build.py] Zipping the engine and documentation for non-Windows platforms...") - zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine'], f'./dist/vne-{platform.architecture()[0]}-{platform.system()}.zip') + zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine'], f'./dist/vne.zip') except subprocess.CalledProcessError as e: print(f"[build.py] Error during compilation: {e}") diff --git a/engine.spec b/engine.spec index b506d22..0414ad7 100644 --- a/engine.spec +++ b/engine.spec @@ -8,7 +8,7 @@ a = Analysis( hiddenimports=["pyzipper", "cryptography"], hookspath=[], hooksconfig={}, - runtime_hooks=["./env.py"], + runtime_hooks=["env.py"], excludes=[], noarchive=False, optimize=0, diff --git a/main.py b/main.py index d048f91..9ae1921 100644 --- a/main.py +++ b/main.py @@ -202,7 +202,17 @@ def distribute_game(game_path): os.unlink(pkg_path) - exe_source = os.path.join(os.path.dirname(sys.executable),"lib", "win", "bootstrapper.exe") + exe_source = None + + if platform.system() == "Windows": + exe_source = os.path.join(os.path.dirname(sys.executable), "lib", "win", "bootstrapper.exe") + elif platform.system() == "Linux": + exe_source = os.path.join(os.path.dirname(sys.executable), "lib", "linux", "bootstrapper") + elif platform.system() == "Darwin": + exe_source = os.path.join(os.path.dirname(sys.executable), "lib", "mac", "bootstrapper") + else: + raise Exception("Unsupported platform") + exe_source = os.path.abspath(exe_source) exe_dest = os.path.join(dest_folder, "game.exe") From 764e8aa4e51f0912b0b84227f261a5057f36939c Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 19:53:10 -0300 Subject: [PATCH 11/30] ci: update build-multiplatform.yml --- .github/workflows/build-multiplatform.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index c8ef20c..9339e02 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -15,6 +15,7 @@ jobs: run: | echo "import os" > env.py echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> env.py + working-directory: . - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 @@ -24,9 +25,11 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt + working-directory: . - name: Build engine and bootstrapper run: | python build.py + working-directory: . - name: Upload Artifacts uses: actions/upload-artifact@v4 with: @@ -41,6 +44,7 @@ jobs: run: | echo "import os" > env.py echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> env.py + working-directory: . - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 @@ -50,9 +54,11 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt + working-directory: . - name: Build engine and bootstrapper run: | python build.py + working-directory: . - name: Upload Artifacts uses: actions/upload-artifact@v4 with: @@ -67,6 +73,7 @@ jobs: run: | echo "import os" > env.py echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> env.py + working-directory: . - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 @@ -76,9 +83,11 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt + working-directory: . - name: Build engine and bootstrapper run: | python build.py + working-directory: . - name: Upload Artifacts uses: actions/upload-artifact@v4 with: From 9bbc1f1c0ac094a50dcc8842e6d500cd9f04e0bf Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 19:57:01 -0300 Subject: [PATCH 12/30] ci: update build-multiplatform.yml --- .github/workflows/build-multiplatform.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index 9339e02..a081588 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -11,25 +11,22 @@ jobs: build-windows: runs-on: windows-2022 steps: - - name: Generar env.py con VNE_KEY - run: | - echo "import os" > env.py - echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> env.py - working-directory: . - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: "3.10" + - name: Generar env.py con VNE_KEY + run: | + echo "import os" > env.py + echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> ./vne/env.py - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - working-directory: . - name: Build engine and bootstrapper run: | python build.py - working-directory: . - name: Upload Artifacts uses: actions/upload-artifact@v4 with: @@ -44,7 +41,6 @@ jobs: run: | echo "import os" > env.py echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> env.py - working-directory: . - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 @@ -54,11 +50,9 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt - working-directory: . - name: Build engine and bootstrapper run: | python build.py - working-directory: . - name: Upload Artifacts uses: actions/upload-artifact@v4 with: @@ -73,7 +67,6 @@ jobs: run: | echo "import os" > env.py echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> env.py - working-directory: . - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 @@ -83,11 +76,9 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt - working-directory: . - name: Build engine and bootstrapper run: | python build.py - working-directory: . - name: Upload Artifacts uses: actions/upload-artifact@v4 with: From e8ec6c0ee623a251949ce65feb3b0aeb674cdcf6 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 20:01:58 -0300 Subject: [PATCH 13/30] chore: update .gitignore --- .gitignore | 18 +++++++++--------- sdk_icon.png | Bin 0 -> 7587 bytes 2 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 sdk_icon.png diff --git a/.gitignore b/.gitignore index b9a5a58..ad063d1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,12 +2,12 @@ build dist .venv __pycache__ -*.png -*.jpg -*.mp3 -*.mp4 -*.ogg -*.sav +projects/**/*.png +projects/**/*.jpg +projects/**/*.mp3 +projects/**/*.mp4 +projects/**/*.ogg +projects/**/*.sav compile_sdk.py build_sdk.py engine.onefile-build @@ -25,9 +25,9 @@ build traceback.txt log.txt docs -*.wav -*.mp3 -*.ogg +projects/**/*.wav +projects/**/*.mp3 +projects/**/*.ogg engine-error.txt env.py *.vsix diff --git a/sdk_icon.png b/sdk_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..d7c9dc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nxCSR!A=F1!|fAZ8lX+IK|HyKPbuZm8W4+8E0o)?MBE zpxFGlkdF5OMKY<(;-PjT!O(Al?Js)s1!uspuk%MqHow6 zA`F>&3BIq4OURwC12T*(q5vyiau9^z0S?!#vR^feUpr8z1u=Qr!LWfY zo|e228rRgd`?VAfmnu)k=QZ(mJPb03*fZ-PI0mF-Y)>Y|cGEcWH=0X!&01W_mAn@Q-yec8zDfz5WfgkS=yg*UxcM3-8rq(5WEDT9|jPllPoTRYRT&<$YIvvfrnNX~IGWdvyA+It} zp-mEE^nK>UMwk0XOQGD)&g%`GePtXj8ti2Pz8QBTTM*GAGdRX8ON^}r7C24C{$8H% z_{$o0A%hflG#{!CI;rW*ta!x1r8K7Ck#VNyAm9~-s<*QG9HlZ{7R3?C%=nzjFW*NrbvYMxRF}G zMM-PM8Z06RD5@nu^y6tU3mxE^VvO>}%Ej#3XvxbW(psV`D4bI9wK@zAJJ^r^ER;uo zqW^Kd2vF>2tJ2Kb9KklJs?sCU!ZR@M zi7@-pwQ3*FP&Zc`%sCmr=n+>`8;tdPI0O3}bL$_%iDKHU{CL`hCvq>aTQ|3;P%jE33NW(%4aO3_#&A_X< zY{zR?C%)>OXt)U9HOyP)soGY$XaoEPhz&@*xG4D-|4IQS#{E?^SX%-fV%IXfL4|{U z3Vz)a!h+b*DP#cqlDnBz6c(~eE66)VDdyE-hcyaH)o(lijLQG z2iFvKaCIz&O*L6y)exopb3kC6lgSl8(^m9DQeuFNQcGom>#$?m@EymLsEkPJU_ZSOXe=#=VQsXQ$LG|S!e)~WEmOQN<`7?X|WJ4M8$I|N^%^p)IK Date: Sun, 3 Aug 2025 20:28:20 -0300 Subject: [PATCH 14/30] ci: update build-multiplatform.yml --- .github/workflows/build-multiplatform.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index a081588..a070b76 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -31,21 +31,21 @@ jobs: uses: actions/upload-artifact@v4 with: name: dist-windows - path: dist/win*.zip + path: dist/vne.zip build-linux: runs-on: ubuntu-22.04 needs: build-windows steps: - - name: Generar env.py con VNE_KEY - run: | - echo "import os" > env.py - echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> env.py - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: "3.10" + - name: Generar env.py con VNE_KEY + run: | + echo "import os" > env.py + echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> ./vne/env.py - name: Install dependencies run: | python -m pip install --upgrade pip @@ -57,21 +57,21 @@ jobs: uses: actions/upload-artifact@v4 with: name: dist-linux - path: dist/linux*.zip + path: dist/vne.zip build-mac: runs-on: macos-14 needs: build-linux steps: - - name: Generar env.py con VNE_KEY - run: | - echo "import os" > env.py - echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> env.py - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: "3.10" + - name: Generar env.py con VNE_KEY + run: | + echo "import os" > env.py + echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> ./vne/env.py - name: Install dependencies run: | python -m pip install --upgrade pip @@ -83,4 +83,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: dist-mac - path: dist/mac*.zip + path: dist/vne.zip From 4bbd6e94fa338b622e0babf9a151492213222ec6 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 21:14:23 -0300 Subject: [PATCH 15/30] update build-multiplatform.yml, bootstrapper.spec, build.py and engine.spec --- .github/workflows/build-multiplatform.yml | 38 ++++++++++++++++++++--- bootstrapper.spec | 2 +- engine.spec | 2 +- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index a070b76..7de8478 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -6,7 +6,6 @@ on: pull_request: branches: [gh/neyunse/test] - jobs: build-windows: runs-on: windows-2022 @@ -16,7 +15,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: "3.10" - - name: Generar env.py con VNE_KEY + - name: Generate env.py with VNE_KEY run: | echo "import os" > env.py echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> ./vne/env.py @@ -42,7 +41,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: "3.10" - - name: Generar env.py con VNE_KEY + - name: Generate env.py with VNE_KEY run: | echo "import os" > env.py echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> ./vne/env.py @@ -68,7 +67,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: "3.10" - - name: Generar env.py con VNE_KEY + - name: Generate env.py with VNE_KEY run: | echo "import os" > env.py echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> ./vne/env.py @@ -84,3 +83,34 @@ jobs: with: name: dist-mac path: dist/vne.zip + + create-release: + runs-on: ubuntu-22.04 + needs: [build-windows, build-linux, build-mac] + steps: + - uses: actions/checkout@v3 + - name: Extract engine version + id: get_version + run: | + VERSION=$(python -c "import re; f=open('vne/_version.py').read(); print(re.search(r'__version__\s*=\s*[\'\"]([^\'\"]+)[\'\"]', f).group(1))") + echo "version=$VERSION" >> $GITHUB_OUTPUT + - name: Crear Release + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ steps.get_version.outputs.version }} + name: ${{ steps.get_version.outputs.version }} + body: "Automatic release generated by CI." + draft: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Adjuntar artefactos + uses: actions/download-artifact@v4 + with: + path: ./artifacts + - name: Upload artifacts to the release + run: | + for file in ./artifacts/*/*; do + gh release upload "${{ steps.get_version.outputs.version }}" "$file" --repo "$GITHUB_REPOSITORY" + done + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/bootstrapper.spec b/bootstrapper.spec index bac6514..2d75198 100644 --- a/bootstrapper.spec +++ b/bootstrapper.spec @@ -28,7 +28,7 @@ exe = EXE( debug=False, bootloader_ignore_signals=False, strip=False, - upx=True, + upx=False, upx_exclude=[], runtime_tmpdir=None, console=False, diff --git a/engine.spec b/engine.spec index 0414ad7..b3a3588 100644 --- a/engine.spec +++ b/engine.spec @@ -26,7 +26,7 @@ exe = EXE( debug=False, bootloader_ignore_signals=False, strip=False, - upx=True, + upx=False, upx_exclude=[], runtime_tmpdir=None, console=False, From c5bee96af9699d6deff202088738da0c254a4bef Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 21:25:05 -0300 Subject: [PATCH 16/30] update build-multiplatform.yml, build.py and _version.py update build-multiplatform.yml and build.py --- .github/workflows/build-multiplatform.yml | 8 ++++---- build.py | 12 ++++++++---- vne/_version.py | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index 7de8478..83da6db 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -30,7 +30,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: dist-windows - path: dist/vne.zip + path: dist/vne-win.zip build-linux: runs-on: ubuntu-22.04 @@ -56,7 +56,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: dist-linux - path: dist/vne.zip + path: dist/vne-linux.zip build-mac: runs-on: macos-14 @@ -82,8 +82,8 @@ jobs: uses: actions/upload-artifact@v4 with: name: dist-mac - path: dist/vne.zip - + path: dist/vne-darwin.zip + create-release: runs-on: ubuntu-22.04 needs: [build-windows, build-linux, build-mac] diff --git a/build.py b/build.py index 29b14df..5288902 100644 --- a/build.py +++ b/build.py @@ -78,11 +78,15 @@ def build_engine(): if platform.system() == "Windows": print("[build.py] Zipping the engine and documentation...") - zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine.exe'], f'./dist/vne.zip') + zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine.exe'], f'./dist/vne-win.zip') + elif platform.system() == "Linux": + print("[build.py] Zipping the engine and documentation for Linux...") + zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine'], f'./dist/vne-linux.zip') + elif platform.system() == "Darwin": + print("[build.py] Zipping the engine and documentation for macOS...") + zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine'], f'./dist/vne-darwin.zip') else: - print("[build.py] Zipping the engine and documentation for non-Windows platforms...") - zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine'], f'./dist/vne.zip') - + pass except subprocess.CalledProcessError as e: print(f"[build.py] Error during compilation: {e}") sys.exit(1) diff --git a/vne/_version.py b/vne/_version.py index b79e827..d0b5906 100644 --- a/vne/_version.py +++ b/vne/_version.py @@ -1 +1 @@ -__version__ = "v1.0.0-alpha.12" \ No newline at end of file +__version__ = "v1.0.0-alpha.13" \ No newline at end of file From 074b2637be8a89a6136ec77416c8c3e4355eb3f8 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 21:38:48 -0300 Subject: [PATCH 17/30] ci: update build-multiplatform.yml --- .github/workflows/build-multiplatform.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index 83da6db..eaaa551 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [gh/neyunse/test] +permissions: + contents: write + id-token: write jobs: build-windows: runs-on: windows-2022 From 5468fe07c048bc467a5e22e0021a816720522a34 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 22:06:07 -0300 Subject: [PATCH 18/30] ci: update build-multiplatform.yml and docs.yml --- .github/workflows/build-multiplatform.yml | 4 ++-- .github/workflows/docs.yml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index eaaa551..526f89b 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -2,9 +2,9 @@ name: Build Multiplatform Engine on: push: - branches: [gh/neyunse/test] + branches: [dev] pull_request: - branches: [gh/neyunse/test] + branches: [dev] permissions: contents: write diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b941828..8cec42e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -10,6 +10,8 @@ on: - '_version.py' workflow_dispatch: + release: + types: [published] # Triggered when a release is published (not draft) permissions: contents: read From 68f547ff6aa037a74b0567f63309c2ddaddddd0d Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 22:07:59 -0300 Subject: [PATCH 19/30] ci: update build-multiplatform.yml --- .github/workflows/build-multiplatform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index 526f89b..fb73fe1 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -102,7 +102,7 @@ jobs: with: tag_name: ${{ steps.get_version.outputs.version }} name: ${{ steps.get_version.outputs.version }} - body: "Automatic release generated by CI." + body: "Automatic release generated by CI. Important information, the engine is detected by the antivirus and removes the executables. This is because all the libraries are integrated into a single executable and also these executables are not signed." draft: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From f10b55ba28e17f97c19f882e42563c8172157e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AD=E3=82=86=E3=82=93=E3=81=9B?= <36079551+Neyunse@users.noreply.github.com> Date: Sun, 3 Aug 2025 22:10:30 -0300 Subject: [PATCH 20/30] Update build.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index 5288902..d45ca4b 100644 --- a/build.py +++ b/build.py @@ -86,7 +86,8 @@ def build_engine(): print("[build.py] Zipping the engine and documentation for macOS...") zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine'], f'./dist/vne-darwin.zip') else: - pass + print(f"[build.py] Error: Unsupported platform '{platform.system()}'. Cannot zip engine and documentation.") + sys.exit(1) except subprocess.CalledProcessError as e: print(f"[build.py] Error during compilation: {e}") sys.exit(1) From f3f20e351e7ec0655f3ac80c51687b5e14c74b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AD=E3=82=86=E3=82=93=E3=81=9B?= <36079551+Neyunse@users.noreply.github.com> Date: Sun, 3 Aug 2025 22:11:42 -0300 Subject: [PATCH 21/30] Update .github/workflows/build-multiplatform.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/build-multiplatform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index fb73fe1..71d8d0b 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -20,7 +20,7 @@ jobs: python-version: "3.10" - name: Generate env.py with VNE_KEY run: | - echo "import os" > env.py + echo "import os" > ./vne/env.py echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> ./vne/env.py - name: Install dependencies run: | From 6fbfffebece2d7e6f0304354e0a5610c7aa761bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AD=E3=82=86=E3=82=93=E3=81=9B?= <36079551+Neyunse@users.noreply.github.com> Date: Sun, 3 Aug 2025 22:11:59 -0300 Subject: [PATCH 22/30] Update .github/workflows/build-multiplatform.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/build-multiplatform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index 71d8d0b..b5b8ee6 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -46,7 +46,7 @@ jobs: python-version: "3.10" - name: Generate env.py with VNE_KEY run: | - echo "import os" > env.py + echo "import os" > ./vne/env.py echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> ./vne/env.py - name: Install dependencies run: | From d37f23912e4646a36ada8a487fd08af939582772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AD=E3=82=86=E3=82=93=E3=81=9B?= <36079551+Neyunse@users.noreply.github.com> Date: Sun, 3 Aug 2025 22:12:09 -0300 Subject: [PATCH 23/30] Update .github/workflows/build-multiplatform.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/build-multiplatform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index b5b8ee6..331e947 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -72,7 +72,7 @@ jobs: python-version: "3.10" - name: Generate env.py with VNE_KEY run: | - echo "import os" > env.py + echo "import os" > ./vne/env.py echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> ./vne/env.py - name: Install dependencies run: | From 601e228ff39ce217fce19763e5d94baf3f0a5ebb Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 22:20:46 -0300 Subject: [PATCH 24/30] ci: update build-multiplatform.yml --- .github/workflows/build-multiplatform.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index 331e947..39f1d41 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -5,12 +5,16 @@ on: branches: [dev] pull_request: branches: [dev] + types: [closed] permissions: contents: write id-token: write + + jobs: build-windows: + if: github.event.pull_request.merged == true runs-on: windows-2022 steps: - uses: actions/checkout@v3 @@ -20,7 +24,7 @@ jobs: python-version: "3.10" - name: Generate env.py with VNE_KEY run: | - echo "import os" > ./vne/env.py + echo "import os" >> ./vne/env.py echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> ./vne/env.py - name: Install dependencies run: | @@ -46,7 +50,7 @@ jobs: python-version: "3.10" - name: Generate env.py with VNE_KEY run: | - echo "import os" > ./vne/env.py + echo "import os" >> ./vne/env.py echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> ./vne/env.py - name: Install dependencies run: | @@ -72,7 +76,7 @@ jobs: python-version: "3.10" - name: Generate env.py with VNE_KEY run: | - echo "import os" > ./vne/env.py + echo "import os" >> ./vne/env.py echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> ./vne/env.py - name: Install dependencies run: | From 52024e18db33573da91e56719de6ec79fa781db2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AD=E3=82=86=E3=82=93=E3=81=9B?= <36079551+Neyunse@users.noreply.github.com> Date: Sun, 3 Aug 2025 22:21:37 -0300 Subject: [PATCH 25/30] Update main.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 9ae1921..4f294c9 100644 --- a/main.py +++ b/main.py @@ -215,7 +215,11 @@ def distribute_game(game_path): exe_source = os.path.abspath(exe_source) - exe_dest = os.path.join(dest_folder, "game.exe") + if platform.system() == "Windows": + exe_filename = "game.exe" + else: + exe_filename = "game" + exe_dest = os.path.join(dest_folder, exe_filename) shutil.copy2(exe_source, exe_dest) print(f"[distribute] Binary copied: {exe_source} → {exe_dest}") From 43b999b7244a738ed7406db6ff511519d9522271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AD=E3=82=86=E3=82=93=E3=81=9B?= <36079551+Neyunse@users.noreply.github.com> Date: Sun, 3 Aug 2025 22:22:43 -0300 Subject: [PATCH 26/30] Update .github/workflows/build-multiplatform.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/build-multiplatform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index 39f1d41..cacf797 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -101,7 +101,7 @@ jobs: run: | VERSION=$(python -c "import re; f=open('vne/_version.py').read(); print(re.search(r'__version__\s*=\s*[\'\"]([^\'\"]+)[\'\"]', f).group(1))") echo "version=$VERSION" >> $GITHUB_OUTPUT - - name: Crear Release + - name: Create Release uses: softprops/action-gh-release@v1 with: tag_name: ${{ steps.get_version.outputs.version }} From b28c2f24542a349ea39d56a678102cedd4602f6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AD=E3=82=86=E3=82=93=E3=81=9B?= <36079551+Neyunse@users.noreply.github.com> Date: Sun, 3 Aug 2025 22:22:54 -0300 Subject: [PATCH 27/30] Update .github/workflows/build-multiplatform.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/build-multiplatform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index cacf797..a4389de 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -110,7 +110,7 @@ jobs: draft: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Adjuntar artefactos + - name: Download artifacts uses: actions/download-artifact@v4 with: path: ./artifacts From 14fb1a09db628f88379cb1768b270191aa7eddcc Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 22:33:37 -0300 Subject: [PATCH 28/30] update build.py and main.py --- build.py | 17 ++++++++++++++--- main.py | 12 +++++++++++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/build.py b/build.py index d45ca4b..afa04ef 100644 --- a/build.py +++ b/build.py @@ -23,13 +23,13 @@ def zip_folders_and_files(folders, files, zip_path): if file_path and os.path.isfile(file_path): zipf.write(file_path, os.path.basename(file_path)) -def build(spec="engine"): +def build(spec="engine", so="win"): if spec == "bootstrapper": return [ "pyinstaller", "--clean", "--distpath", - "./dist/lib/win", + f"./dist/lib/{so}", "--workpath", "./build", f"{spec}.spec" @@ -52,6 +52,17 @@ def buildDoc(): "./dist/docs" ] +def so_name(): + if platform.system() == "Windows": + return "win" + elif platform.system() == "Linux": + return "linux" + elif platform.system() == "Darwin": + return "darwin" + else: + print(f"[build.py] Error: Unsupported platform '{platform.system()}'. Cannot determine shared object name.") + sys.exit(1) + def build_engine(): # Verify that main.py exists in the current directory. if not os.path.exists("main.py"): @@ -60,7 +71,7 @@ def build_engine(): try: engine = build() - bootstrapper = build("bootstrapper") + bootstrapper = build("bootstrapper", so=so_name()) doc = buildDoc() diff --git a/main.py b/main.py index 9ae1921..0192034 100644 --- a/main.py +++ b/main.py @@ -209,13 +209,23 @@ def distribute_game(game_path): elif platform.system() == "Linux": exe_source = os.path.join(os.path.dirname(sys.executable), "lib", "linux", "bootstrapper") elif platform.system() == "Darwin": - exe_source = os.path.join(os.path.dirname(sys.executable), "lib", "mac", "bootstrapper") + exe_source = os.path.join(os.path.dirname(sys.executable), "lib", "darwin", "bootstrapper") else: raise Exception("Unsupported platform") exe_source = os.path.abspath(exe_source) exe_dest = os.path.join(dest_folder, "game.exe") + + if platform.system() == "Windows": + exe_dest = os.path.join(dest_folder, "game.exe") + elif platform.system() == "Linux": + exe_dest = os.path.join(dest_folder, "game") + elif platform.system() == "Darwin": + exe_dest = os.path.join(dest_folder, "game.app", "Contents", "MacOS", "game") + os.makedirs(os.path.dirname(exe_dest), exist_ok=True) + + shutil.copy2(exe_source, exe_dest) print(f"[distribute] Binary copied: {exe_source} → {exe_dest}") From a6692d26affd669de62185771089e44dd6d3a1f5 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 22:36:47 -0300 Subject: [PATCH 29/30] ci: update build-multiplatform.yml --- .github/workflows/build-multiplatform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index a4389de..20031f4 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -106,7 +106,7 @@ jobs: with: tag_name: ${{ steps.get_version.outputs.version }} name: ${{ steps.get_version.outputs.version }} - body: "Automatic release generated by CI. Important information, the engine is detected by the antivirus and removes the executables. This is because all the libraries are integrated into a single executable and also these executables are not signed." + body: "Automatic release generated by CI. Important information, the engine is detected by the antivirus and removes the executables. This is because all the libraries are integrated into a single executable and also these executables are not signed. Some distributions such as Linux or Mac were not tested!" draft: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ebfb42e000244109da3ac444e086865e4872eae8 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Sun, 3 Aug 2025 23:22:24 -0300 Subject: [PATCH 30/30] ci: update build-multiplatform.yml --- .github/workflows/build-multiplatform.yml | 57 ++++++++++++----------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index 20031f4..a6b7701 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -64,36 +64,37 @@ jobs: with: name: dist-linux path: dist/vne-linux.zip - - build-mac: - runs-on: macos-14 - needs: build-linux - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Generate env.py with VNE_KEY - run: | - echo "import os" >> ./vne/env.py - echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> ./vne/env.py - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Build engine and bootstrapper - run: | - python build.py - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: dist-mac - path: dist/vne-darwin.zip + + # Temporarily disabled + # build-mac: + # runs-on: macos-14 + # needs: build-linux + # steps: + # - uses: actions/checkout@v3 + # - name: Set up Python + # uses: actions/setup-python@v4 + # with: + # python-version: "3.10" + # - name: Generate env.py with VNE_KEY + # run: | + # echo "import os" >> ./vne/env.py + # echo "os.environ['VNE_KEY'] = '${{ secrets.VNE_KEY }}'" >> ./vne/env.py + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # pip install -r requirements.txt + # - name: Build engine and bootstrapper + # run: | + # python build.py + # - name: Upload Artifacts + # uses: actions/upload-artifact@v4 + # with: + # name: dist-mac + # path: dist/vne-darwin.zip create-release: runs-on: ubuntu-22.04 - needs: [build-windows, build-linux, build-mac] + needs: [build-windows, build-linux] steps: - uses: actions/checkout@v3 - name: Extract engine version @@ -106,7 +107,7 @@ jobs: with: tag_name: ${{ steps.get_version.outputs.version }} name: ${{ steps.get_version.outputs.version }} - body: "Automatic release generated by CI. Important information, the engine is detected by the antivirus and removes the executables. This is because all the libraries are integrated into a single executable and also these executables are not signed. Some distributions such as Linux or Mac were not tested!" + body: "Automatic release generated by CI. Important information, the engine is detected by the antivirus and removes the executables. This is because all the libraries are integrated into a single executable and also these executables are not signed. Some distributions such as Linux were not tested!" draft: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}