Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 3.51 KB

File metadata and controls

68 lines (50 loc) · 3.51 KB

Project files — what to keep and what’s generated

Why trim.exe can feel slower than trim.py

trim.exe is a PyInstaller onefile executable: when you run it, Windows first extracts the embedded Python runtime to a temp folder (e.g. %TEMP%\ _MEI...), then runs. That extraction adds a few seconds before smartcut actually starts. The trimming work (smartcut) takes the same time either way.

  • trim.py: Python runs immediately → starts smartcut → no extraction delay.
  • trim.exe: Extract to temp → then start smartcut → same smartcut time.

So the extra time is startup only. If you need the fastest possible trim during development, use trim.py (with Python + pip install smartcut). For the installed app (no Python), trim.exe is required; the one-time startup cost is normal for onefile exes.


Files to KEEP (source and config)

Path Purpose
package.json App config, scripts, Electron build
main.js Electron main process
index.html UI
compress.py Source for compress.exe (build with npm run build-compressor)
trim.py Source for trim.exe (build with npm run build-trim)
compress.spec PyInstaller spec for compress
trim.spec PyInstaller spec for trim
scripts/predist.js Pre-packaging checks + get smartcut
scripts/get-smartcut.js Copies smartcut into bin/
scripts/copy-compress.js Copies built compress.exe to root
scripts/copy-trim.js Copies built trim.exe to root
bin/ffmpeg.exe Required — video encoding
bin/ffprobe.exe Required — video info
bin/ffplay.exe Required — playback
bin/smartcut.exe Required for trim — from npm run get-smartcut
requirements.txt Python deps note (smartcut)
compress.ico App icon (optional; build works without it)

Generated / build artifacts (can delete or ignore)

Path Purpose Safe to delete?
node_modules/ npm deps Yes — recreated by npm install
dist/ PyInstaller output (compress.exe, trim.exe) + electron-builder unpacked Yes — recreated by npm run build-compressor, build-trim, dist
build/ PyInstaller build cache Yes — recreated when building exes
compress.exe Built from compress.py Yes — recreated by npm run build-compressor; needed only for packaging
trim.exe Built from trim.py Yes — recreated by npm run build-trim; needed only for packaging
out/ Default output folder for compressed/trimmed files Yes — just app output
package-lock.json Lockfile Keep — used by npm

Unused (not needed by the app)

  • trim.py is used — it’s the source for trim.exe; keep it.
  • compress.py is used — source for compress.exe; keep it.
  • Anything under node_modules/ that isn’t required by the app is still needed for npm run dist; don’t delete individual packages unless you know what you’re doing.

Minimal folder for “run and package”

To run the app and run npm run dist, you need:

  1. All “Files to KEEP” above (including bin/ with the four exes).
  2. node_modules/ (run npm install if missing).
  3. For packaging: after npm run build-compressor and npm run build-trim, the root will also have compress.exe and trim.exe; electron-builder bundles those.

You can delete dist/, build/, compress.exe, and trim.exe whenever you want to clean; re-run the build scripts or npm run dist to recreate them.