mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-29 18:27:23 +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 |
30
setup.py
30
setup.py
|
@ -4,26 +4,24 @@ import setuptools # for bdist
|
||||||
from cx_Freeze import setup, Executable
|
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 = {
|
build_exe_options = {
|
||||||
# include dynamically loaded plugins
|
# include dynamically loaded plugins
|
||||||
"packages": ["meshroom.nodes", "meshroom.submitters"]
|
"packages": ["meshroom.nodes", "meshroom.submitters"]
|
||||||
}
|
}
|
||||||
|
|
||||||
executables = [
|
meshroomExe = Executable(
|
||||||
Executable(
|
"meshroom/ui/__main__.py",
|
||||||
"meshroom/ui/__main__.py",
|
targetName="Meshroom",
|
||||||
targetName="Meshroom" + getExecutableExtension(),
|
)
|
||||||
),
|
|
||||||
]
|
# 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(
|
setup(
|
||||||
name="Meshroom",
|
name="Meshroom",
|
||||||
|
@ -36,5 +34,5 @@ setup(
|
||||||
},
|
},
|
||||||
version="1.0", # TODO: get correct version info
|
version="1.0", # TODO: get correct version info
|
||||||
options={"build_exe": build_exe_options},
|
options={"build_exe": build_exe_options},
|
||||||
executables=executables,
|
executables=[meshroomExe],
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue