Skip to content

Commit

Permalink
fix pyinstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
czoido committed Oct 29, 2024
1 parent 8bb9d4e commit 02a98bb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pyinstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,20 @@ def pyinstall(source_folder, onefile=False):
"--hidden-import=conan.tools.layout --hidden-import=conan.tools.premake "
"--hidden-import=conan.tools.qbs --hidden-import=conan.tools.scm "
"--hidden-import=conan.tools.system --hidden-import=conan.tools.system.package_manager")

if not os.path.exists(pyinstaller_path):
os.mkdir(pyinstaller_path)

if platform.system() != "Windows":
hidden += " --hidden-import=setuptools.msvc"
win_ver = ""
else:
win_ver_file = os.path.join(pyinstaller_path, 'windows-version-file')
content = _windows_version_file(__version__)
from conans.util.files import save
save(win_ver_file, content)
with open(win_ver_file, 'w') as file:
file.write(content)
win_ver = ["--version-file", win_ver_file]

if not os.path.exists(pyinstaller_path):
os.mkdir(pyinstaller_path)

if onefile:
distpath = os.path.join(pyinstaller_path, "dist", "conan")
Expand Down

0 comments on commit 02a98bb

Please sign in to comment.