diff --git a/.github/workflows/build_gdextension.yml b/.github/workflows/build_gdextension.yml index 59df11c..05275bb 100644 --- a/.github/workflows/build_gdextension.yml +++ b/.github/workflows/build_gdextension.yml @@ -35,29 +35,31 @@ jobs: run: pip install scons - name: Install Yasm run: sudo apt-get update && sudo apt-get install -y yasm + - name: Build Linux Debug run: scons -Q -j4 target=template_debug platform=linux arch=x86_64 use_system=yes + - name: Build Linux full Debug + run: scons -Q -j4 target=template_debug platform=linux arch=x86_64 use_system=no enable_gpl=yes enable_small=yes + - name: Build Linux Release + run: scons -Q -j4 target=template_release platform=linux arch=x86_64 use_system=yes + - name: Build Linux full Release + run: scons -Q -j4 target=template_release platform=linux arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no enable_small=yes + - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: name: gde_gozen-linux-debug path: bin/linux_video_only_template_debug/* - - name: Build Linux Release - run: scons -Q -j4 target=template_release platform=linux arch=x86_64 use_system=yes - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: - name: gde_gozen-linux-release - path: bin/linux_video_only_template_release/* - - name: Build Linux full Debug - run: scons -Q -j4 target=template_debug platform=linux arch=x86_64 use_system=no enable_gpl=yes + name: gde_gozen-linux-full-build + path: bin/linux_video_only_full_template_debug/* - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: - name: gde_gozen-linux-full-build - path: bin/linux_video_only_full_template_debug/* - - name: Build Linux full Release - run: scons -Q -j4 target=template_release platform=linux arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no + name: gde_gozen-linux-release + path: bin/linux_video_only_template_release/* - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: @@ -86,15 +88,17 @@ jobs: sudo update-alternatives --config x86_64-w64-mingw32-g++ <<< "1" - name: Install Yasm run: sudo apt-get install -y yasm + - name: Build Windows Debug run: scons -Q -j4 target=template_debug platform=windows arch=x86_64 use_system=no enable_gpl=yes + - name: Build Windows Release + run: scons -Q -j4 target=template_release platform=windows arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no + - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: name: gde_gozen-windows-build path: bin/windows_video_only_template_debug/* - - name: Build Windows Release - run: scons -Q -j4 target=template_release platform=windows arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/build_gdextension_release.yml b/.github/workflows/build_gdextension_release.yml index 96347cc..0d4994c 100644 --- a/.github/workflows/build_gdextension_release.yml +++ b/.github/workflows/build_gdextension_release.yml @@ -35,57 +35,63 @@ jobs: run: pip install scons - name: Install Yasm run: sudo apt-get update && sudo apt-get install -y yasm + + # DEBUG BUILDS - name: Build Linux Debug video only run: scons -Q -j4 target=template_debug platform=linux arch=x86_64 use_system=yes + - name: Build Linux Debug + run: scons -Q -j4 target=template_debug platform=linux arch=x86_64 use_system=yes include_renderer=yes + - name: Build Linux full Debug video only + run: scons -Q -j4 target=template_debug platform=linux arch=x86_64 use_system=no enable_gpl=yes enable_small=yes + - name: Build Linux full Debug + run: scons -Q -j4 target=template_debug platform=linux arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no include_renderer=yes enable_small=yes + - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: name: gde_gozen-linux-debug-video-only path: bin/linux_video_only_template_debug/* - - name: Build Linux Release video only - run: scons -Q -j4 target=template_release platform=linux arch=x86_64 use_system=yes - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: - name: gde_gozen-linux-release-video-only - path: bin/linux_video_only_template_release/* - - name: Build Linux Debug - run: scons -Q -j4 target=template_debug platform=linux arch=x86_64 use_system=yes include_renderer=yes + name: gde_gozen-linux-debug + path: bin/linux_template_debug/* - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: - name: gde_gozen-linux-debug - path: bin/linux_template_debug/* + name: gde_gozen-linux-full-build-video-only + path: bin/linux_video_only_full_template_debug/* + - name: Uploading GDExtension artifact + uses: actions/upload-artifact@v4 + with: + name: gde_gozen-linux-full-build + path: bin/linux_full_template_debug/* + + # RELEASE builds + - name: Build Linux Release video only + run: scons -Q -j4 target=template_release platform=linux arch=x86_64 use_system=yes - name: Build Linux Release run: scons -Q -j4 target=template_release platform=linux arch=x86_64 use_system=yes include_renderer=yes + - name: Build Linux full Release video only + run: scons -Q -j4 target=template_release platform=linux arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no enable_small=yes + - name: Build Linux full Release + run: scons -Q -j4 target=template_release platform=linux arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no include_renderer=yes enable_small=yes + - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: - name: gde_gozen-linux-release - path: bin/linux_template_release/* - - name: Build Linux full Debug video only - run: scons -Q -j4 target=template_debug platform=linux arch=x86_64 use_system=no enable_gpl=yes + name: gde_gozen-linux-release-video-only + path: bin/linux_video_only_template_release/* - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: - name: gde_gozen-linux-full-build-video-only - path: bin/linux_video_only_full_template_debug/* - - name: Build Linux full Release video only - run: scons -Q -j4 target=template_release platform=linux arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no + name: gde_gozen-linux-release + path: bin/linux_template_release/* - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: name: gde_gozen-linux-full-release-video-only path: bin/linux_video_only_full_template_release/* - - name: Build Linux full Debug - run: scons -Q -j4 target=template_debug platform=linux arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no include_renderer=yes - - name: Uploading GDExtension artifact - uses: actions/upload-artifact@v4 - with: - name: gde_gozen-linux-full-build - path: bin/linux_full_template_debug/* - - name: Build Linux full Release - run: scons -Q -j4 target=template_release platform=linux arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no include_renderer=yes - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: @@ -114,29 +120,31 @@ jobs: sudo update-alternatives --config x86_64-w64-mingw32-g++ <<< "1" - name: Install Yasm run: sudo apt-get install -y yasm + - name: Build Windows Debug video only - run: scons -Q -j4 target=template_debug platform=windows arch=x86_64 use_system=no enable_gpl=yes + run: scons -Q -j4 target=template_debug platform=windows arch=x86_64 use_system=no enable_gpl=yes enable_small=yes + - name: Build Windows Debug + run: scons -Q -j4 target=template_debug platform=windows arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no include_renderer=yes enable_small=yes + - name: Build Windows Release video only + run: scons -Q -j4 target=template_release platform=windows arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no enable_small=yes + - name: Build Windows Release + run: scons -Q -j4 target=template_release platform=windows arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no include_renderer=yes enable_small=yes + - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: name: gde_gozen-windows-build-video_only path: bin/windows_video_only_template_debug/* - - name: Build Windows Release video only - run: scons -Q -j4 target=template_release platform=windows arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: - name: gde_gozen-windows-release-video-only - path: bin/windows_video_only_template_release/* - - name: Build Windows Debug - run: scons -Q -j4 target=template_debug platform=windows arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no include_renderer=yes + name: gde_gozen-windows-build + path: bin/windows_template_debug/* - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: - name: gde_gozen-windows-build - path: bin/window_template_debug/* - - name: Build Windows Release - run: scons -Q -j4 target=template_release platform=windows arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no include_renderer=yes + name: gde_gozen-windows-release-video-only + path: bin/windows_video_only_template_release/* - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/build_gdextension_with_renderer.yml b/.github/workflows/build_gdextension_with_renderer.yml index 24d526d..6750446 100644 --- a/.github/workflows/build_gdextension_with_renderer.yml +++ b/.github/workflows/build_gdextension_with_renderer.yml @@ -35,29 +35,31 @@ jobs: run: pip install scons - name: Install Yasm run: sudo apt-get update && sudo apt-get install -y yasm + - name: Build Linux Debug run: scons -Q -j4 target=template_debug platform=linux arch=x86_64 use_system=yes include_renderer=yes + - name: Build Linux full Debug + run: scons -Q -j4 target=template_debug platform=linux arch=x86_64 use_system=no enable_gpl=yes include_renderer=yes enable_small=yes + - name: Build Linux Release + run: scons -Q -j4 target=template_release platform=linux arch=x86_64 use_system=yes include_renderer=yes + - name: Build Linux full Release + run: scons -Q -j4 target=template_release platform=linux arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no include_renderer=yes enable_small=yes + - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: name: gde_gozen-linux-debug path: bin/linux_template_debug/* - - name: Build Linux Release - run: scons -Q -j4 target=template_release platform=linux arch=x86_64 use_system=yes include_renderer=yes - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: - name: gde_gozen-linux-release - path: bin/linux_template_release/* - - name: Build Linux full Debug - run: scons -Q -j4 target=template_debug platform=linux arch=x86_64 use_system=no enable_gpl=yes include_renderer=yes + name: gde_gozen-linux-full-build + path: bin/linux_full_template_debug/* - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: - name: gde_gozen-linux-full-build - path: bin/linux_full_template_debug/* - - name: Build Linux full Release - run: scons -Q -j4 target=template_release platform=linux arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no include_renderer=yes + name: gde_gozen-linux-release + path: bin/linux_template_release/* - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: @@ -86,15 +88,17 @@ jobs: sudo update-alternatives --config x86_64-w64-mingw32-g++ <<< "1" - name: Install Yasm run: sudo apt-get install -y yasm + - name: Build Windows Debug - run: scons -Q -j4 target=template_debug platform=windows arch=x86_64 use_system=no enable_gpl=yes include_renderer=yes + run: scons -Q -j4 target=template_debug platform=windows arch=x86_64 use_system=no enable_gpl=yes include_renderer=yes enable_small=yes + - name: Build Windows Release + run: scons -Q -j4 target=template_release platform=windows arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no include_renderer=yes enable_small=yes + - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: name: gde_gozen-windows-build - path: bin/window_template_debug/* - - name: Build Windows Release - run: scons -Q -j4 target=template_release platform=windows arch=x86_64 use_system=no enable_gpl=yes recompile_ffmpeg=no include_renderer=yes + path: bin/windows_template_debug/* - name: Uploading GDExtension artifact uses: actions/upload-artifact@v4 with: diff --git a/COMPILE_INFO.md b/COMPILE_INFO.md index 219722b..22187a5 100644 --- a/COMPILE_INFO.md +++ b/COMPILE_INFO.md @@ -47,3 +47,6 @@ Using the command line is pretty straightforward. Use `scons` with any of the st `recompile_ffmpeg=` is set to yes by default, but when making consequential builds, you probably don't need this to happen so for the second run of the same OS you could set this to `no`. This is helpful when building the template_debug and template_release directly after each other. +### Enable small + +`enable_small=` is a command which will make FFmpeg take longer to compile but will save in space as the libraries will be smaller in size. Set this to `yes` to use it. diff --git a/SConstruct b/SConstruct index ef498b2..5468ada 100644 --- a/SConstruct +++ b/SConstruct @@ -30,6 +30,8 @@ if ARGUMENTS.get('include_renderer', 'no') == 'yes': env.Append(CPPFLAGS=['-DEXPORT_RENDERER']) else: platform += '_video_only' +if ARGUMENTS.get('enable_small', 'no') == 'yes': + ffmpeg_build_args += ' --enable-small' if 'linux' in platform: diff --git a/build.py b/build.py index 633bad6..48a5355 100644 --- a/build.py +++ b/build.py @@ -80,6 +80,14 @@ print('2. No.') match input('> '): case '2.': ' recompile_ffmpeg=no' + + print('Enable small: (takes longer to compile FFmpeg but libs are smaller)') + print('1. No; (default)') + print('2. Yes.') + match input('> '): + case '2.': ' enable_small=yes' + + user_input = input('Number of threads/cores for compiling> ') if user_input.isdigit(): jobs = int(user_input)