Skip to content

Commit

Permalink
Sync ReaPack and force restart as part of Updater Function
Browse files Browse the repository at this point in the history
  • Loading branch information
chmaha committed Feb 4, 2024
1 parent d453ba6 commit 34b21e7
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions ReaClassical/ReaClassical_Updater.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,24 @@ local dest_shortcuts_path = resource_path .. "/reaper-kb.ini"
---------------------------------------------------------------------

function main()
local response1 = ShowMessageBox("This part will overwrite your custom toolbars.\nAre you sure you want to continue?", "ReaClassical Updater",4)
local sync_reapack = reaper.NamedCommandLookup("_REAPACK_SYNC")
Main_OnCommand(sync_reapack,0)
ShowMessageBox("1) Syncing ReaPack repos", "ReaClassical Updater",0)

local response1 = ShowMessageBox("2) This section will overwrite your custom toolbars.\nAre you sure you want to continue?", "ReaClassical Updater",4)
if response1 == 6 then
copy_file(source_file_path,destination_file_path)
end

local response2 = ShowMessageBox("This part will overwrite your custom keymaps!\nAre you sure you want to continue?", "ReaClassical Updater",4)
local response2 = ShowMessageBox("3) This section will overwrite your custom keymaps!\nAre you sure you want to continue?", "ReaClassical Updater",4)
if response2 == 6 then
copy_file(source_shortcuts_path,dest_shortcuts_path)
end
end

if response1 == 6 or response2 == 6 then
ShowMessageBox("4) REAPER/ReaClassical will now close.", "ReaClassical Updater",0)
reaper.Main_OnCommand(40004, 0) -- Save dirty projects and close REAPER
end
end

---------------------------------------------------------------------
Expand Down

0 comments on commit 34b21e7

Please sign in to comment.