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/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. 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 + ]; +}