Restart Fusion produces additional Fusion icon in macOS's Dock.
Using
killall
instead of fusion:Quit()
performs correct restart.So this part:
- -- Create the Fusion launching command
- if platform == "Windows" then
- command = "start \"\" " .. "\"" .. fusionApp .. "\" 2>&1 &"
- elseif platform == "Mac" then
- command = "\"" .. fusionApp .. "\" 2>&1 &"
- -- command = "open \"" .. fusionApp .. "\" 2>&1 &"
- else
- command = "\"" .. fusionApp .. "\" 2>&1 &"
- end
- obj:Comp():Print("[Launch Command] " .. tostring(command) .. "\n")
- -- Start up a new instance of Fusion
- os.execute(command)
- -- Quit the current Fusion session
- fusion:Quit()
- -- Create the Fusion launching command
- if platform == "Windows" then
- command = "start \"\" " .. "\"" .. fusionApp .. "\" 2>&1 &"
- -- Start up a new instance of Fusion
- os.execute(command)
- -- Quit the current Fusion session
- fusion:Quit()
- elseif platform == "Mac" then
- command = "killall Fusion && ".."\"" .. fusionApp .."\" 2>&1"
- os.execute(command)
- else
- command = "\"" .. fusionApp .. "\" 2>&1 &"
- -- Start up a new instance of Fusion
- os.execute(command)
- -- Quit the current Fusion session
- fusion:Quit()
- end
Diffs: https://gitlab.com/WeSuckLess/Reactor/m ... 55ec9c29d1