code cleanup

This commit is contained in:
2025-11-30 20:51:30 -06:00
parent 6dffe70e9b
commit cc30e6abc1
16 changed files with 2296 additions and 1251 deletions

View File

@@ -1,49 +1,49 @@
from cx_Freeze import setup, Executable
from cx_Freeze import Executable, setup
setup(
name='ReticulumMeshChatX',
version='1.0.0',
description='A simple mesh network communications app powered by the Reticulum Network Stack',
name="ReticulumMeshChatX",
version="1.0.0",
description="A simple mesh network communications app powered by the Reticulum Network Stack",
executables=[
Executable(
script='meshchat.py', # this script to run
base=None, # we are running a console application, not a gui
target_name='ReticulumMeshChatX', # creates ReticulumMeshChatX.exe
shortcut_name='ReticulumMeshChatX', # name shown in shortcut
shortcut_dir='ProgramMenuFolder', # put the shortcut in windows start menu
icon='logo/icon.ico', # set the icon for the exe
copyright='Copyright (c) 2024 Liam Cottle',
script="meshchat.py", # this script to run
base=None, # we are running a console application, not a gui
target_name="ReticulumMeshChatX", # creates ReticulumMeshChatX.exe
shortcut_name="ReticulumMeshChatX", # name shown in shortcut
shortcut_dir="ProgramMenuFolder", # put the shortcut in windows start menu
icon="logo/icon.ico", # set the icon for the exe
copyright="Copyright (c) 2024 Liam Cottle",
),
],
options={
'build_exe': {
"build_exe": {
# libs that are required
'packages': [
"packages": [
# required for dynamic import fix
# https://github.com/marcelotduarte/cx_Freeze/discussions/2039
# https://github.com/marcelotduarte/cx_Freeze/issues/2041
'RNS',
'RNS.Interfaces',
'LXMF',
"RNS",
"RNS.Interfaces",
"LXMF",
],
# files that are required
'include_files': [
'package.json', # used to determine app version from python
'public/', # static files served by web server
"include_files": [
"package.json", # used to determine app version from python
"public/", # static files served by web server
],
# slim down the build by excluding these unused libs
'excludes': [
'PIL', # saves ~200MB
"excludes": [
"PIL", # saves ~200MB
],
# this has the same effect as the -O command line option when executing CPython directly.
# it also prevents assert statements from executing, removes docstrings and sets __debug__ to False.
# https://stackoverflow.com/a/57948104
"optimize": 2,
# change where exe is built to
'build_exe': 'build/exe',
"build_exe": "build/exe",
# make the build relocatable by replacing absolute paths
'replace_paths': [
('*', ''),
"replace_paths": [
("*", ""),
],
},
},