Skip to content

Commit

Permalink
Version 7.4: new terminal integration and freezing upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
matkuki committed May 27, 2023
1 parent 9f2ff5e commit 946e199
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 23 deletions.
2 changes: 1 addition & 1 deletion data.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
configuration file!
--------------------------------------------------------
"""
application_version = "7.3"
application_version = "7.4"
# Global variable that holds state of logging mode
logging_mode = False
# Global referenc to the log display window, so it can be used anywhere
Expand Down
62 changes: 40 additions & 22 deletions utilities/freeze_exco.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@


def main():
file_directory = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
file_directory = os.path.join(
os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))),
"..",
)
output_directory = "frozen_exco_{}_{}".format(
platform.system().lower(),
platform.architecture()[0],
)

builtin_modules = []
builtin_modules = [
"PyQt6",
"PyQt6.Qsci",
"PyQt6.QtTest",
]
local_modules = []
# List all local modules
exclude_dirs = [
Expand Down Expand Up @@ -48,6 +55,7 @@ def main():
continue
local_modules.append(new_module)
pprint.pprint(local_modules)

modules = local_modules + builtin_modules

search_path = sys.path
Expand All @@ -60,47 +68,57 @@ def main():
executable_name = "ExCo"
if platform.system().lower() == "windows":
base = "Win32GUI"

builtin_modules.extend([
"win32api",
"win32con",
"win32gui",
"win32file",
])

excludes = [
"tkinter",
# "PyQt5",
# "PyQt5.QtCore",
# "PyQt5.QtWidgets",
# "PyQt5.QtGui",
# "PyQt5.Qsci",
# "PyQt5.QtTest",
"PyQt6",
"PyQt6.QtCore",
"PyQt6.QtWidgets",
"PyQt6.QtGui",
"PyQt6.Qsci",
"PyQt6.QtTest",
"PyQt5",
"PyQt5.QtCore",
"PyQt5.QtWidgets",
"PyQt5.QtGui",
"PyQt5.Qsci",
"PyQt5.QtTest",
# "PyQt6",
# "PyQt6.QtCore",
# "PyQt6.QtWidgets",
# "PyQt6.QtGui",
# "PyQt6.Qsci",
# "PyQt6.QtTest",
]

executable_name = "ExCo.exe"

executables = [
cx_Freeze.Executable(
'exco.py',
initScript = None,
init_script = None,
base = base,
icon = "resources/exco-icon-win.ico",
targetName = executable_name,
target_name = executable_name,
)
]

freezer = cx_Freeze.Freezer(
executables,
includes = modules,
excludes = excludes,
replacePaths = [],
replace_paths = [],
compress = True,
optimizeFlag = True,
optimize = True,
include_msvcr = True,
path = search_path,
targetDir = output_directory,
includeFiles = [],
zipIncludes = [],
target_dir = output_directory,
include_files = [],
zip_includes = [],
silent = False,
)
freezer.Freeze()
freezer.freeze()

shutil.copytree("resources", output_directory + "/resources")

Expand Down

0 comments on commit 946e199

Please sign in to comment.