@@ -123,7 +123,6 @@ defmodule BuildScript do
123
123
platforms = [
124
124
{"windows", "x86_64"},
125
125
{"linuxbsd", "x86_64"},
126
- {"macos", "arm64"},
127
126
{"web", "wasm32"},
128
127
]
129
128
for {target_platform, target_arch} <- platforms do
@@ -161,19 +160,18 @@ defmodule BuildScript do
161
160
162
161
templatedir = case @os_family do
163
162
{:win32, :nt} ->
164
- "#{System.get_env("USERPROFILE")}/AppData/Roaming/Godot/export_templates/#{version}/"
163
+ Path.expand( "#{System.get_env("USERPROFILE")}/AppData/Roaming/Godot/export_templates/#{version}/")
165
164
{:unix, :darwin} ->
166
- "#{System.get_env("HOME")}/Library/Application Support/Godot/export_templates/#{version}/"
165
+ Path.expand( "#{System.get_env("HOME")}/Library/Application Support/Godot/export_templates/#{version}/")
167
166
{:unix, _} ->
168
- "#{System.get_env("HOME")}/.local/share/godot/export_templates/#{version}/"
167
+ Path.expand( "#{System.get_env("HOME")}/.local/share/godot/export_templates/#{version}/")
169
168
end
170
169
File.mkdir_p!(templatedir)
171
170
172
171
debug_file = case target_platform do
173
172
"linuxbsd" -> "#{@extract_dir_extracted}/godot.linuxbsd.template_debug.double.#{target_arch}"
174
173
"windows" -> "#{@extract_dir_extracted}/godot.windows.template_debug.double.#{target_arch}.llvm.exe"
175
174
"web" -> "#{@extract_dir_extracted}/godot.web.template_debug.double.wasm32.dlink.zip"
176
- "macos" -> "#{@extract_dir_extracted}/godot_macos_double.zip"
177
175
"android" -> "#{@extract_dir_extracted}/android_debug.apk"
178
176
_ -> raise "Unsupported platform: #{target_platform}"
179
177
end
@@ -182,7 +180,6 @@ defmodule BuildScript do
182
180
"linuxbsd" -> "#{@extract_dir_extracted}/godot.linuxbsd.template_release.double.#{target_arch}"
183
181
"windows" -> "#{@extract_dir_extracted}/godot.windows.template_release.double.#{target_arch}.llvm.exe"
184
182
"web" -> "#{@extract_dir_extracted}/godot.web.template_release.double.wasm32.dlink.zip"
185
- "macos" -> "#{@extract_dir_extracted}/godot_macos_double.zip"
186
183
"android" -> "#{@extract_dir_extracted}/android_release.apk"
187
184
_ -> raise "Unsupported platform: #{target_platform}"
188
185
end
@@ -194,13 +191,12 @@ defmodule BuildScript do
194
191
"macos" -> "macos_debug_#{target_arch}"
195
192
"android" -> "android_debug.apk"
196
193
_ -> "#{target_platform}_debug_#{target_arch}"
197
- end
194
+ end
198
195
199
196
release_file_name = case target_platform do
200
197
"linuxbsd" -> "linux_release.#{target_arch}"
201
198
"windows" -> "windows_release_#{target_arch}.exe"
202
199
"web" -> "web_dlink_nothreads_release.zip"
203
- "macos" -> "macos_release_#{target_arch}"
204
200
"android" -> "android_release.apk"
205
201
_ -> "#{target_platform}_release_#{target_arch}"
206
202
end
@@ -221,15 +217,15 @@ defmodule BuildScript do
221
217
end
222
218
File.chmod(editor_file, 0o755)
223
219
pwd = Path.dirname(__ENV__.file)
224
- arguments = ["--headless", "--path", pwd, "--import", "-e"]
225
- System.cmd("bash", ["-c", "#{editor_file} #{Enum.join(arguments, " ")}"], stderr_to_stdout: true)
220
+ arguments = ["--headless", "--path", pwd, "--import"]
221
+ {output, _exit_code} = System.cmd("bash", ["-c", "#{editor_file} #{Enum.join(arguments, " ")}"])
222
+ IO.puts(output)
226
223
227
224
output_file = "#{@extract_dir}/export_#{target_platform}_#{target_arch}/#{@project_name}"
228
225
output_file = if target_platform == "windows", do: output_file <> ".exe", else: output_file
229
-
230
226
arguments = ["--headless", "--path", pwd, "--export-release", target_platform, output_file, "-e"]
231
- {_, 0 } = System.cmd("bash", ["-c", "#{editor_file} #{Enum.join(arguments, " ")}"], stderr_to_stdout: true )
232
- IO.puts(Enum.join(arguments, " ") )
227
+ {output, _exit_code } = System.cmd("bash", ["-c", "#{editor_file} #{Enum.join(arguments, " ")}"])
228
+ IO.puts(output )
233
229
234
230
case target_platform do
235
231
"windows" ->
0 commit comments