mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-29 10:17:27 +02:00
[setup] add ".ico" for Meshroom executable (Windows)
+ small rewrite of executable customization per platform
This commit is contained in:
parent
d752839c8c
commit
f798050799
2 changed files with 14 additions and 16 deletions
BIN
meshroom/ui/img/meshroom.ico
Normal file
BIN
meshroom/ui/img/meshroom.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 108 KiB |
28
setup.py
28
setup.py
|
@ -4,26 +4,24 @@ import setuptools # for bdist
|
|||
from cx_Freeze import setup, Executable
|
||||
|
||||
|
||||
def getExecutableExtension():
|
||||
""" Return file extension for an executable program based on current platform. """
|
||||
if sys.platform == "win32":
|
||||
return ".exe"
|
||||
if sys.platform == "darwin":
|
||||
return ".app"
|
||||
return ""
|
||||
|
||||
|
||||
build_exe_options = {
|
||||
# include dynamically loaded plugins
|
||||
"packages": ["meshroom.nodes", "meshroom.submitters"]
|
||||
}
|
||||
|
||||
executables = [
|
||||
Executable(
|
||||
meshroomExe = Executable(
|
||||
"meshroom/ui/__main__.py",
|
||||
targetName="Meshroom" + getExecutableExtension(),
|
||||
),
|
||||
]
|
||||
targetName="Meshroom",
|
||||
)
|
||||
|
||||
# Customize executable for each target platform
|
||||
if sys.platform.startswith("win32"):
|
||||
# meshroomExe.base = "Win32GUI" # for no-console version
|
||||
meshroomExe.targetName += ".exe"
|
||||
meshroomExe.icon = "meshroom/ui/img/meshroom.ico"
|
||||
elif sys.platform.startswith("darwin"):
|
||||
meshroomExe.targetName += ".app"
|
||||
# TODO: icon for Mac
|
||||
|
||||
setup(
|
||||
name="Meshroom",
|
||||
|
@ -36,5 +34,5 @@ setup(
|
|||
},
|
||||
version="1.0", # TODO: get correct version info
|
||||
options={"build_exe": build_exe_options},
|
||||
executables=executables,
|
||||
executables=[meshroomExe],
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue