You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #63312 from bruvzg/one_click
[Export] Add one-click deploy over SSH for the desktop exports.
This commit is contained in:
34
methods.py
34
methods.py
@@ -488,29 +488,29 @@ def use_windows_spawn_fix(self, platform=None):
|
||||
def save_active_platforms(apnames, ap):
|
||||
|
||||
for x in ap:
|
||||
names = ["logo"]
|
||||
if os.path.isfile(x + "/run_icon.png"):
|
||||
names.append("run_icon")
|
||||
svg_names = []
|
||||
if os.path.isfile(x + "/logo.svg"):
|
||||
svg_names.append("logo")
|
||||
if os.path.isfile(x + "/run_icon.svg"):
|
||||
svg_names.append("run_icon")
|
||||
|
||||
for name in names:
|
||||
pngf = open(x + "/" + name + ".png", "rb")
|
||||
b = pngf.read(1)
|
||||
str = " /* AUTOGENERATED FILE, DO NOT EDIT */ \n"
|
||||
str += " static const unsigned char _" + x[9:] + "_" + name + "[]={"
|
||||
for name in svg_names:
|
||||
svgf = open(x + "/" + name + ".svg", "rb")
|
||||
b = svgf.read(1)
|
||||
svg_str = " /* AUTOGENERATED FILE, DO NOT EDIT */ \n"
|
||||
svg_str += " static const char *_" + x[9:] + "_" + name + '_svg = "'
|
||||
while len(b) == 1:
|
||||
str += hex(ord(b))
|
||||
b = pngf.read(1)
|
||||
if len(b) == 1:
|
||||
str += ","
|
||||
svg_str += "\\" + hex(ord(b))[1:]
|
||||
b = svgf.read(1)
|
||||
|
||||
str += "};\n"
|
||||
svg_str += '";\n'
|
||||
|
||||
pngf.close()
|
||||
svgf.close()
|
||||
|
||||
# NOTE: It is safe to generate this file here, since this is still executed serially
|
||||
wf = x + "/" + name + ".gen.h"
|
||||
with open(wf, "w") as pngw:
|
||||
pngw.write(str)
|
||||
wf = x + "/" + name + "_svg.gen.h"
|
||||
with open(wf, "w") as svgw:
|
||||
svgw.write(svg_str)
|
||||
|
||||
|
||||
def no_verbose(sys, env):
|
||||
|
||||
Reference in New Issue
Block a user