Skip to content

Commit

Permalink
Updated Display Preview build to reduce size and dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmikethetech committed Nov 24, 2024
1 parent ec5c792 commit 6871235
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 32 deletions.
23 changes: 1 addition & 22 deletions Community Scripts/DisplayPreview/DisplayPreview.pyw
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#WINDOWS

import platform
import sys
import tkinter as tk
from tkinter import ttk, messagebox
import threading
import os
import subprocess
import time
import mss
import numpy as np
Expand All @@ -24,7 +19,7 @@ logger = setup_logging()
class ScreenRecorderApp:
def __init__(self, root):
self.root = root
# self.initialize_ffmpeg()

logger.info("THE APP WAS OPEN")

self.root.protocol("WM_DELETE_WINDOW", self.on_closing)
Expand Down Expand Up @@ -55,7 +50,6 @@ class ScreenRecorderApp:

self.init_ui()

# self.create_output_folder()
self.recording_process = None
self.running = False
self.elapsed_time = 0
Expand Down Expand Up @@ -160,21 +154,6 @@ class ScreenRecorderApp:
def get_monitors(self):
return get_monitors()

# def initialize_ffmpeg(self):
# ffmpeg_path = self.get_ffmpeg_path()
# if not os.path.exists(ffmpeg_path):
# logger.error("FFmpeg not found.")
# messagebox.showerror("Error", "FFmpeg not found.")
# sys.exit(1)
# logger.info("FFmpeg was found.")

# def get_ffmpeg_path(self):
# base_path = os.path.dirname(os.path.abspath(__file__))
# if platform.system() == 'Windows':
# return os.path.join(base_path, 'ffmpeg_files', 'ffmpeg.exe')
# return os.path.join(base_path, 'ffmpeg_files', 'ffmpeg')


if __name__ == "__main__":
try:
root = tk.Tk()
Expand Down
14 changes: 4 additions & 10 deletions Community Scripts/DisplayPreview/DisplayPreview.spec
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,20 @@ pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
exclude_binaries=True,
name='DisplayPreview',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='DisplayPreview',
)
Binary file added Community Scripts/DisplayPreview/dist/video.ico
Binary file not shown.

0 comments on commit 6871235

Please sign in to comment.