File tree Expand file tree Collapse file tree
LadybugTools_Engine/Python/src/ladybugtools_toolkit/bhom Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 </group >
2121 </dependencies >
2222 <contentFiles >
23- <files include =" Python\310 \PythonCode\**\*.*" buildAction =" Content" copyToOutput =" true" flatten =" false" />
24- <files include =" Python\310 \PythonEnvironment\**\*" buildAction =" Content" copyToOutput =" true" flatten =" false" />
23+ <files include =" any\any \PythonCode\**\*.*" buildAction =" Content" copyToOutput =" true" flatten =" false" />
24+ <files include =" any\any \PythonEnvironment\**\*" buildAction =" Content" copyToOutput =" true" flatten =" false" />
2525 </contentFiles >
2626 </metadata >
2727 <files >
3030 <file src =" docs/readme.md" target =" " />
3131 <!-- lib\**\* is a workaround for contentfiles not including dll files-->
3232 <file src =" lib\**\*" target =" lib" />
33- <file src =" C:\ProgramData\BHoM\Extensions\PythonCode\LadybugTools_Toolkit\src\ladybugtools_toolkit\bhom\wrapped\**\*.*" exclude =" **\__pycache__\*;**\docs\**\*" target =" contentFiles\Python\310 \PythonCode\LadybugTools_Toolkit\src\ladybugtools_toolkit\bhom\wrapped" />
34- <file src =" C:\ProgramData\BHoM\Extensions\PythonCode\LadybugTools_Toolkit\src\**\*.*" exclude =" **\__pycache__\*;**\docs\**\*" target =" contentFiles\Python\310 \PythonEnvironment\Lib\site-packages" />
33+ <file src =" C:\ProgramData\BHoM\Extensions\PythonCode\LadybugTools_Toolkit\src\ladybugtools_toolkit\bhom\wrapped\**\*.*" exclude =" **\__pycache__\*;**\docs\**\*" target =" contentFiles\any\any \PythonCode\LadybugTools_Toolkit\src\ladybugtools_toolkit\bhom\wrapped" />
34+ <file src =" C:\ProgramData\BHoM\Extensions\PythonCode\LadybugTools_Toolkit\src\**\*.*" exclude =" **\__pycache__\*;**\docs\**\*" target =" contentFiles\any\any \PythonEnvironment\Lib\site-packages" />
3535 </files >
36- </package >
36+ </package >
Original file line number Diff line number Diff line change 66from win32api import HIWORD , LOWORD , GetFileVersionInfo
77
88BHOM_ASSEMBLIES_DIRECTORY = Path (path .expandvars ("%PROGRAMDATA%/BHoM/Assemblies" ))
9- BHOM_DIRECTORY = Path (path .expandvars ("%PROGRAMDATA%/BHoM" ))
109BHOM_LOG_FOLDER = Path (path .expandvars ("%PROGRAMDATA%/BHoM/Logs" ))
11-
12- PYTHON_CODE_DIRECTORY = Path (path .expandvars ("%PROGRAMDATA%/BHoM/Extensions/PythonCode" ))
13- PYTHON_ENVIRONMENTS_DIRECTORY = Path (path .expandvars ("%PROGRAMDATA%/BHoM/Extensions/PythonEnvironments" ))
14-
1510TOOLKIT_NAME = "LadybugTools_Toolkit"
1611
17- _file_version_ms = GetFileVersionInfo (
18- (BHOM_ASSEMBLIES_DIRECTORY / "BHoM.dll" ).as_posix (), "\\ "
19- )["FileVersionMS" ]
12+ if not BHOM_LOG_FOLDER .exists ():
13+ BHOM_LOG_FOLDER = Path (path .expandvars ("%TEMP%/BHoMLogs" ))
14+ BHOM_LOG_FOLDER .mkdir (exist_ok = True )
15+
16+ if not BHOM_ASSEMBLIES_DIRECTORY .exists ():
17+ BHOM_VERSION = ""
18+ else :
19+ _file_version_ms = GetFileVersionInfo (
20+ (BHOM_ASSEMBLIES_DIRECTORY / "BHoM.dll" ).as_posix (), "\\ "
21+ )["FileVersionMS" ]
2022
21- BHOM_VERSION = f"{ HIWORD (_file_version_ms )} .{ LOWORD (_file_version_ms )} "
23+ BHOM_VERSION = f"{ HIWORD (_file_version_ms )} .{ LOWORD (_file_version_ms )} "
You can’t perform that action at this time.
0 commit comments