Skip to content

Commit 8a5a86e

Browse files
committed
Fix macos still not copying bundle over
1 parent 87f38b2 commit 8a5a86e

4 files changed

Lines changed: 15 additions & 5 deletions

File tree

objects/obj_controller/Create_0.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if (os_type = os_windows) {
88
if (!directory_exists(songs_directory)) execute_program("Xcopy", @'/E /I "' + filename_dir(bundled_songs_directory) + @'" "' + filename_dir(songs_directory) + @'"', true)
99
if (!directory_exists(pattern_directory)) execute_program("Xcopy", @'/E /I "' + filename_dir(bundled_pattern_directory) + @'" "' + filename_dir(pattern_directory) + @'"', true)
1010
} if (os_type = os_macosx) {
11-
if (!directory_exists(data_directory)) execute_program("cp", @'-fR "' + filename_dir(bundled_data_directory) + @'." "' + filename_dir(data_directory) + @'"', true)
11+
if (!directory_exists(data_directory)) execute_program("cp", @'-fR "' + filename_dir(bundled_data_directory) + @'/." "' + filename_dir(data_directory) + @'"', true)
1212
//if (!directory_exists(songs_directory)) directory_create(songs_directory)
1313
//if (!directory_exists(pattern_directory)) directory_create(pattern_directory)
1414
} if (os_type = os_linux) {

scripts/control_create/control_create.gml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,9 @@ function control_create() {
631631

632632
// Settings
633633
if (!check_args("--prefreset")) load_settings()
634+
var vers_tmp = vers
635+
var vers_date_tmp = vers_date
636+
if (vers_date_tmp != version_date) copy_bundled_files()
634637
if (os_type = os_macosx) macos_enable_system_settings_menu()
635638
tonextsave = autosave ? autosavemins : 0; // Defining autosavemins here to avoid the autosave when the first song is loaded after open the game.
636639
menu_macos_init()
@@ -706,14 +709,13 @@ function control_create() {
706709
update_download = -1
707710
downloaded_size = 0
708711
total_size = -1
709-
if (file_exists_lib(settings_file) && vers != version) {
712+
if (file_exists_lib(settings_file) && vers_tmp != version) {
710713
if (theme = 2) fdark = 1
711714
theme = 3 // Sets to the Fluent theme when updated
712715
window = w_update
713716
update_success = 1
714717
donate_banner = 1 // Enable donate banner after each update
715718
}
716-
if (file_exists_lib(settings_file) && vers_date != version_date) copy_bundled_files()
717719
changelogstr = load_text(bundled_data_directory + "changelog.txt")
718720
creditsstr = load_text(bundled_data_directory + "credits.txt")
719721

scripts/copy_bundled_files/copy_bundled_files.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function copy_bundled_files(){
44
execute_program("cp", @'-fR "' + filename_dir(bundled_songs_directory) + @'/." "' + filename_dir(songs_directory) + @'"', true)
55
execute_program("cp", @'-fR "' + filename_dir(bundled_pattern_directory) + @'/." "' + filename_dir(pattern_directory) + @'"', true)
66
} else if (os_type = os_macosx) {
7-
execute_program("cp", @'-fR "' + filename_dir(bundled_data_directory) + @'." "' + filename_dir(data_directory) + @'"', true)
7+
execute_program("cp", @'-fR "' + filename_dir(bundled_data_directory) + @'/." "' + filename_dir(data_directory) + @'"', true)
88
} else {
99
execute_program("Xcopy", @'/E /I /Y "' + filename_dir(bundled_data_directory) + @'" "' + filename_dir(data_directory) + @'"', true)
1010
execute_program("Xcopy", @'/E /I /Y "' + filename_dir(bundled_songs_directory) + @'" "' + filename_dir(songs_directory) + @'"', true)

scripts/draw_window_greeting/draw_window_greeting.gml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,18 @@ function draw_window_greeting() {
5050
if (os_type = os_windows || os_type = os_linux) {
5151
if (language != 1) draw_text_center(x1 + 132, y1 + 248 + dev_label_offset, "Update checking disabled.")
5252
else draw_text_center(x1 + 132, y1 + 248 + dev_label_offset, "检查更新不可用")
53-
} else if (os_type = os_macosx) {
53+
} else {
5454
if (language != 1) draw_text_center(x1 + 132, y1 + 248 + dev_label_offset, "Updates managed by TestFlight app.")
5555
else draw_text_center(x1 + 132, y1 + 248 + dev_label_offset, "由 TestFlight 应用管理更新")
5656
}
57+
} else if (os_type = os_macosx) {
58+
if (is_prerelease) {
59+
if (language != 1) draw_text_center(x1 + 132, y1 + 248 + dev_label_offset, "Updates managed by TestFlight app.")
60+
else draw_text_center(x1 + 132, y1 + 248 + dev_label_offset, "由 TestFlight 应用管理更新")
61+
} else {
62+
if (language != 1) draw_text_center(x1 + 132, y1 + 248 + dev_label_offset, "App Store Version")
63+
else draw_text_center(x1 + 132, y1 + 248 + dev_label_offset, "App Store 版本")
64+
}
5765
} else if (check_update) {
5866
if (update_success) {
5967
draw_set_color(c_lime)

0 commit comments

Comments
 (0)