mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-19 18:09:06 +08:00
Raise exceptions on critical errors
This commit is contained in:
parent
85644b621e
commit
4fedf332a0
@ -38,13 +38,13 @@ pyinstaller:
|
||||
src: "plugins"
|
||||
dst: "share/cura/plugins"
|
||||
native_cad_plugin:
|
||||
package: "native_cad_plugin"
|
||||
src: "res/plugins/NativeCADplugin"
|
||||
dst: "share/cura/plugins/NativeCADplugin"
|
||||
package: "native_cad_plugin"
|
||||
src: "res/plugins/NativeCADplugin"
|
||||
dst: "share/cura/plugins/NativeCADplugin"
|
||||
native_cad_plugin_bundled:
|
||||
package: "native_cad_plugin"
|
||||
src: "res/bundled_packages"
|
||||
dst: "share/cura/resources/bundled_packages"
|
||||
package: "native_cad_plugin"
|
||||
src: "res/bundled_packages"
|
||||
dst: "share/cura/resources/bundled_packages"
|
||||
cura_resources:
|
||||
package: "cura"
|
||||
src: "resources"
|
||||
|
15
conanfile.py
15
conanfile.py
@ -207,9 +207,12 @@ class CuraConan(ConanFile):
|
||||
elif "root" in data: # get the paths relative from the install folder
|
||||
src_path = os.path.join(self.install_folder, data["root"], data["src"])
|
||||
else:
|
||||
continue
|
||||
if Path(src_path).exists():
|
||||
datas.append((str(src_path), data["dst"]))
|
||||
raise ConanException("Misformatted conan data for pyinstaller datas, expected either package or root option")
|
||||
|
||||
if not Path(src_path).exists():
|
||||
raise ConanException(f"Missing folder {src_path} for pyinstaller data {data}")
|
||||
|
||||
datas.append((str(src_path), data["dst"]))
|
||||
|
||||
binaries = []
|
||||
for binary in pyinstaller_metadata["binaries"].values():
|
||||
@ -220,10 +223,10 @@ class CuraConan(ConanFile):
|
||||
if self.settings.os == "Windows":
|
||||
src_path = src_path.replace("\\", "\\\\")
|
||||
else:
|
||||
continue
|
||||
raise ConanException("Misformatted conan data for pyinstaller binaries, expected either package or root option")
|
||||
|
||||
if not Path(src_path).exists():
|
||||
self.output.warning(f"Source path for binary {binary['binary']} does not exist")
|
||||
continue
|
||||
raise ConanException(f"Missing folder {src_path} for pyinstaller binary {binary}")
|
||||
|
||||
for bin in Path(src_path).glob(binary["binary"] + "*[.exe|.dll|.so|.dylib|.so.]*"):
|
||||
binaries.append((str(bin), binary["dst"]))
|
||||
|
Loading…
x
Reference in New Issue
Block a user