mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 21:13:58 -06:00
Attempt to set file associations and fire-wall exceptions.
The fire-wall exceptions work, but the device needs to be restarted. Is that worth it? A more important problem is that windows overhauled the file associations a few years ago. The approach here doesn't work (but is at least consistent with how it worked before, so it might work for Windows < 10 or unupdated). The current go-to approach is the one used by firefox, and it happens after the installer, at first start-up of the program. part of CURA-9157
This commit is contained in:
parent
ddd7ac58b0
commit
5b8bac6a61
3 changed files with 48 additions and 27 deletions
|
@ -87,13 +87,17 @@ def build(dist_path: Path, filename: str):
|
|||
"-out", f"{heat_loc.as_posix()}"]
|
||||
subprocess.call(heat_command)
|
||||
|
||||
build_command = ["candle", "-arch", "x64", f"-dCuraDir={dist_loc}\\", "-out", f"{build_loc.as_posix()}\\",
|
||||
build_command = ["candle", "-arch", "x64", f"-dCuraDir={dist_loc}\\",
|
||||
"-ext", "WixFirewallExtension",
|
||||
"-out", f"{build_loc.as_posix()}\\",
|
||||
f"{wxs_loc.as_posix()}", f"{heat_loc.as_posix()}", f"{manageoldcuradlg_loc.as_posix()}"]
|
||||
subprocess.call(build_command)
|
||||
|
||||
link_command = ["light", f"{build_loc.joinpath(wxs_loc.name).with_suffix('.wixobj')}",
|
||||
f"{build_loc.joinpath(heat_loc.name).with_suffix('.wixobj')}",
|
||||
f"{build_loc.joinpath(manageoldcuradlg_loc.name).with_suffix('.wixobj')}", "-ext", "WixUIExtension",
|
||||
f"{build_loc.joinpath(manageoldcuradlg_loc.name).with_suffix('.wixobj')}",
|
||||
"-ext", "WixUIExtension",
|
||||
"-ext", "WixFirewallExtension",
|
||||
"-out", f"{work_loc.joinpath(filename.name)}"]
|
||||
subprocess.call(link_command)
|
||||
|
||||
|
@ -106,6 +110,6 @@ if __name__ == "__main__":
|
|||
help="Filename of the exe (e.g. 'UltiMaker-Cura-5.1.0-beta-Windows-X64.msi')")
|
||||
parser.add_argument("name", type=str, help="App name (e.g. 'UltiMaker Cura')")
|
||||
args = parser.parse_args()
|
||||
generate_wxs(args.source_path, args.dist_path, args.filename, args.name)
|
||||
cleanup_artifacts(args.dist_path)
|
||||
build(args.dist_path, args.filename)
|
||||
generate_wxs(args.source_path.resolve(), args.dist_path.resolve(), args.filename.resolve(), args.name)
|
||||
cleanup_artifacts(args.dist_path.resolve())
|
||||
build(args.dist_path.resolve(), args.filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue