Edge is now working on Windows.
This commit is contained in:
parent
b8564f2196
commit
c6f42da7f2
4 changed files with 19 additions and 5 deletions
|
@ -92,7 +92,7 @@ pushd godot
|
|||
ln -f -s ../custom.py .
|
||||
|
||||
# Clean Prior Builds.
|
||||
#scons --clean
|
||||
scons --clean
|
||||
|
||||
# Build Editor.
|
||||
scons platform=linuxbsd target=editor arch=x86_64 ${LTO}
|
||||
|
@ -101,7 +101,9 @@ scons platform=linuxbsd target=editor arch=x86_64 ${LTO}
|
|||
scons compiledb=yes
|
||||
|
||||
# Build Templates.
|
||||
scons platform=linuxbsd target=template_debug arch=x86_64 ${TEMPLATE} ${LTO}
|
||||
scons platform=linuxbsd target=template_release arch=x86_64 ${TEMPLATE} ${LTO}
|
||||
scons platform=windows target=template_debug arch=x86_64 ${TEMPLATE} ${LTO}
|
||||
scons platform=windows target=template_release arch=x86_64 ${TEMPLATE} ${LTO}
|
||||
|
||||
popd
|
||||
|
|
|
@ -91,8 +91,15 @@ func _send(what: String, mode: String = MODE_READ):
|
|||
|
||||
|
||||
func start_edge(community: String, key: String, supernode: String, port: int = 7777, my_port: int = 5643, management_port: int = 5644):
|
||||
_password = Util.generate_password()
|
||||
_edge_pid = await Process.elevate(OS.get_user_data_dir() + "/edge", ["--management-password", _password, "-c", community, "-k", key, "-l", supernode + ":" + str(port), "-f"])
|
||||
var binary = OS.get_user_data_dir() + "/edge"
|
||||
var arguments = ["--management-password", _password, "-c", community, "-k", key, "-l", supernode + ":" + str(port)]
|
||||
if OS.get_name() == "Windows":
|
||||
binary = binary + ".exe"
|
||||
_edge_pid = OS.create_process(binary, arguments, false)
|
||||
else:
|
||||
arguments.append("-f")
|
||||
_password = Util.generate_password()
|
||||
_edge_pid = await Process.elevate(binary, arguments)
|
||||
if _edge_pid < 0:
|
||||
await Dialog.alert("Error", "Unable to start network layer!")
|
||||
return false
|
||||
|
|
|
@ -43,8 +43,11 @@ func _elevate_unix(program: String, arguments: PackedStringArray):
|
|||
return pid
|
||||
|
||||
|
||||
func _elevate_windows(_program: String, _arguments: PackedStringArray):
|
||||
pass
|
||||
func _elevate_windows(program: String, arguments: PackedStringArray):
|
||||
# powershell.exe -Command Start-Process edge.exe -ArgumentList 'stuff here' -Verb runAs
|
||||
var options = ["-Command", "Start-Process", program, "-ArgumentList", "'" + " ".join(arguments) + "'", "-Verb", "runAs"]
|
||||
var pid = OS.create_process("powershell.exe", options, true)
|
||||
return pid
|
||||
|
||||
|
||||
func _process(_delta):
|
||||
|
|
|
@ -13,6 +13,8 @@ config_version=5
|
|||
config/name="Ham'n'Cheese"
|
||||
config/description="Open Source Peer-to-Peer VPN Client"
|
||||
run/main_scene="res://Scenes/main.tscn"
|
||||
config/use_custom_user_dir=true
|
||||
config/custom_user_dir_name="Kangaroo Punch/HamNCheese"
|
||||
config/auto_accept_quit=false
|
||||
config/features=PackedStringArray("4.2", "GL Compatibility")
|
||||
run/low_processor_mode=true
|
||||
|
|
Loading…
Add table
Reference in a new issue