From 06ad027b202d69a821bca78d940da8bd792c25a8 Mon Sep 17 00:00:00 2001 From: blob1234567890 Date: Sat, 28 Jun 2025 14:39:13 -0700 Subject: [PATCH 1/2] add linux build file --- .gitignore | 2 ++ distcondenserREADME.txt | 0 make_exe.bat | 3 ++- make_exe.linux.bat | 14 ++++++++++++++ shell.nix | 12 ++++++++++++ 5 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 distcondenserREADME.txt create mode 100755 make_exe.linux.bat create mode 100755 shell.nix diff --git a/.gitignore b/.gitignore index c97f49f..8085ddf 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ build/ dist/ condenser.spec .idea/ +.venv/ +.DS_Store diff --git a/distcondenserREADME.txt b/distcondenserREADME.txt new file mode 100644 index 0000000..e69de29 diff --git a/make_exe.bat b/make_exe.bat index 210ec9e..9fc870c 100644 --- a/make_exe.bat +++ b/make_exe.bat @@ -9,4 +9,5 @@ del dist\condenser\_internal\_lzma.pyd del dist\condenser\_internal\unicodedata.pyd del dist\condenser\_internal\libcrypto-3.dll del dist\condenser\_internal\ucrtbase.dll -del dist\condenser\_internal\api-ms-win-* \ No newline at end of file +del dist\condenser\_internal\api-ms-win-* +del dist\condenser\_internal\api-ms-win-* diff --git a/make_exe.linux.bat b/make_exe.linux.bat new file mode 100755 index 0000000..1b39ba7 --- /dev/null +++ b/make_exe.linux.bat @@ -0,0 +1,14 @@ +pyinstaller --exclude-module PIL --onedir -y -i "./condenser_icon.png" "./condenser.py" +mkdir -p dist/condenser/utils/ffmpeg +cp $(which ffmpeg) dist/condenser/utils/ffmpeg/ffmpeg +cp $(which ffprobe) dist/condenser/utils/ffmpeg/ffprobe +cp config.json dist/condenser/config.json +grep -v '^!\[Condenser\].*' README.md | grep '^\[!\[codecov\].*' > dist/condenser/README.txt +rm dist/condenser/_internal/_bz2.pyd +rm dist/condenser/_internal/_hashlib.pyd +rm dist/condenser/_internal/_socket.pyd +rm dist/condenser/_internal/_lzma.pyd +rm dist/condenser/_internal/unicodedata.pyd +rm dist/condenser/_internal/libcrypto-3.dll +rm dist/condenser/_internal/ucrtbase.dll +rm dist/condenser/_internal/api-ms-win-* diff --git a/shell.nix b/shell.nix new file mode 100755 index 0000000..4a7fbe2 --- /dev/null +++ b/shell.nix @@ -0,0 +1,12 @@ +#! /usr/bin/env nix-shell +# python -m venv .venv +# source .venv/bin/activate +# pip install -r requirements.txt +let + pkgs = import {}; +in pkgs.mkShell { + packages = [ + pkgs.python312Full + pkgs.ffmpeg_6-full + ]; +} From 58581e49dc91222c54a76a95cf93b7424a27e186 Mon Sep 17 00:00:00 2001 From: blob1234567890 Date: Sat, 28 Jun 2025 14:53:41 -0700 Subject: [PATCH 2/2] added README linux building --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c3c6be9..4844064 100644 --- a/README.md +++ b/README.md @@ -70,8 +70,10 @@ How to build an .exe file * using pip: - ensure you use Python version from 3.10 to 3.12 - run pip install -r ./requirements.txt + * ensure you have `ffmpeg` and `ffprobe` (available at https://ffmpeg.org/) * Run build script: ./make_exe.bat + > For Linux/Mac, use `./make_exe.bat` * You can find the output in the dist/condenser directory.