@@ -123,7 +123,6 @@ defmodule BuildScript do
123123 platforms = [
124124 {"windows", "x86_64"},
125125 {"linuxbsd", "x86_64"},
126- {"macos", "arm64"},
127126 {"web", "wasm32"},
128127 ]
129128 for {target_platform, target_arch} <- platforms do
@@ -161,19 +160,18 @@ defmodule BuildScript do
161160
162161 templatedir = case @os_family do
163162 {: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}/")
165164 {: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}/")
167166 {: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}/")
169168 end
170169 File.mkdir_p!(templatedir)
171170
172171 debug_file = case target_platform do
173172 "linuxbsd" -> "#{@extract_dir_extracted}/godot.linuxbsd.template_debug.double.#{target_arch}"
174173 "windows" -> "#{@extract_dir_extracted}/godot.windows.template_debug.double.#{target_arch}.llvm.exe"
175174 "web" -> "#{@extract_dir_extracted}/godot.web.template_debug.double.wasm32.dlink.zip"
176- "macos" -> "#{@extract_dir_extracted}/godot_macos_double.zip"
177175 "android" -> "#{@extract_dir_extracted}/android_debug.apk"
178176 _ -> raise "Unsupported platform: #{target_platform}"
179177 end
@@ -182,7 +180,6 @@ defmodule BuildScript do
182180 "linuxbsd" -> "#{@extract_dir_extracted}/godot.linuxbsd.template_release.double.#{target_arch}"
183181 "windows" -> "#{@extract_dir_extracted}/godot.windows.template_release.double.#{target_arch}.llvm.exe"
184182 "web" -> "#{@extract_dir_extracted}/godot.web.template_release.double.wasm32.dlink.zip"
185- "macos" -> "#{@extract_dir_extracted}/godot_macos_double.zip"
186183 "android" -> "#{@extract_dir_extracted}/android_release.apk"
187184 _ -> raise "Unsupported platform: #{target_platform}"
188185 end
@@ -194,13 +191,12 @@ defmodule BuildScript do
194191 "macos" -> "macos_debug_#{target_arch}"
195192 "android" -> "android_debug.apk"
196193 _ -> "#{target_platform}_debug_#{target_arch}"
197- end
194+ end
198195
199196 release_file_name = case target_platform do
200197 "linuxbsd" -> "linux_release.#{target_arch}"
201198 "windows" -> "windows_release_#{target_arch}.exe"
202199 "web" -> "web_dlink_nothreads_release.zip"
203- "macos" -> "macos_release_#{target_arch}"
204200 "android" -> "android_release.apk"
205201 _ -> "#{target_platform}_release_#{target_arch}"
206202 end
@@ -221,15 +217,15 @@ defmodule BuildScript do
221217 end
222218 File.chmod(editor_file, 0o755)
223219 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)
226223
227224 output_file = "#{@extract_dir}/export_#{target_platform}_#{target_arch}/#{@project_name}"
228225 output_file = if target_platform == "windows", do: output_file <> ".exe", else: output_file
229-
230226 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 )
233229
234230 case target_platform do
235231 "windows" ->
0 commit comments