From 3652815550285e67b8962e3da07a4129d0522987 Mon Sep 17 00:00:00 2001 From: Dadoum Date: Fri, 20 Oct 2023 11:54:41 +0200 Subject: [PATCH] Update provision --- dub.json | 6 +++--- dub.selections.json | 10 +++++----- linux/gtk/ui/authentication/loginslide.d | 2 +- linux/gtk/ui/mainwindow.d | 2 +- linux/gtk/ui/manageappidwindow.d | 4 ++-- linux/gtk/ui/sideloadergtkapplication.d | 4 ++-- linux/gtk/ui/utils.d | 2 +- source/imobiledevice/package.d | 1 - source/main.d | 2 -- windows/winforms/frontend.d | 10 ++++++++-- 10 files changed, 23 insertions(+), 20 deletions(-) diff --git a/dub.json b/dub.json index 49edfbe..41eb8b4 100644 --- a/dub.json +++ b/dub.json @@ -17,16 +17,16 @@ }, "dynamic-loader": { "repository": "git+https://github.com/Dadoum/dynamicloader.git", - "version": "32355c1aae76e0a89c123bc082ec2df8cddc2b0f" + "version": "b62f6f5f1cd5cc71c3ffb3689cd11d4fc80a0556" }, "intel-intrinsics": "~>1.11.15", "plist-d": { "repository": "git+https://github.com/Dadoum/libplist-d.git", - "version": "ad7ce217b56af8e51647ab9dd86157b94ef58325" + "version": "d4b3793d9ff5f64325cd1cedb2ced31b51523ec1" }, "provision": { "repository": "git+https://github.com/Dadoum/Provision.git", - "version": "a007cb290da1a21e231a1a4a335a047a151ca24f" + "version": "90f5c9df9d987acc795ba5338af50a7f0764034e" }, "requests": "~>2.0.9", "slf4d": "~>2.4.2" diff --git a/dub.selections.json b/dub.selections.json index 7afbcaa..dec8c49 100644 --- a/dub.selections.json +++ b/dub.selections.json @@ -13,8 +13,8 @@ "dfl": {"version":"5a3cba4d13d4d962b707d713be6d77c2ccc52a42","repository":"git+https://github.com/Rayerd/dfl.git"}, "dlangui": "0.10.4", "dsfml": "2.1.1", - "dxml": "0.4.3", - "dynamic-loader": {"version":"32355c1aae76e0a89c123bc082ec2df8cddc2b0f","repository":"git+https://github.com/Dadoum/dynamicloader.git"}, + "dxml": "0.4.4", + "dynamic-loader": {"version":"b62f6f5f1cd5cc71c3ffb3689cd11d4fc80a0556","repository":"git+https://github.com/Dadoum/dynamicloader.git"}, "glx-d": "1.1.0", "gtk_d": "1.0.3", "icontheme": "1.2.3", @@ -23,11 +23,11 @@ "isfreedesktop": "0.1.1", "memutils": "1.0.9", "plist": "~master", - "plist-d": {"version":"ad7ce217b56af8e51647ab9dd86157b94ef58325","repository":"git+https://github.com/Dadoum/libplist-d.git"}, - "provision": {"version":"a007cb290da1a21e231a1a4a335a047a151ca24f","repository":"git+https://github.com/Dadoum/Provision.git"}, + "plist-d": {"version":"d4b3793d9ff5f64325cd1cedb2ced31b51523ec1","repository":"git+https://github.com/Dadoum/libplist-d.git"}, + "provision": {"version":"90f5c9df9d987acc795ba5338af50a7f0764034e","repository":"git+https://github.com/Dadoum/Provision.git"}, "requests": "2.0.9", "silly": "1.2.0-dev.2", - "slf4d": "2.4.2", + "slf4d": "2.4.3", "test_allocator": "0.3.4", "undead": "1.1.8", "unit-threaded": "0.10.8", diff --git a/linux/gtk/ui/authentication/loginslide.d b/linux/gtk/ui/authentication/loginslide.d index 38f12d3..45c5f27 100644 --- a/linux/gtk/ui/authentication/loginslide.d +++ b/linux/gtk/ui/authentication/loginslide.d @@ -106,7 +106,7 @@ class LoginSlide: Box, AssistantSlide { authAssistant.setCursor(authAssistant.waitCursor); new Thread({ - uiTry({ + uiTry!({ DeveloperSession appleAccount = DeveloperSession.login( runningApplication.device, runningApplication.adi, diff --git a/linux/gtk/ui/mainwindow.d b/linux/gtk/ui/mainwindow.d index f814746..6afccc6 100644 --- a/linux/gtk/ui/mainwindow.d +++ b/linux/gtk/ui/mainwindow.d @@ -69,7 +69,7 @@ class MainWindow: Window { refreshDevicesButton.setIconName("view-refresh-symbolic"); refreshDevicesButton.addOnClicked((_) { setBusy(true); - uiTry({ + uiTry!({ scope(exit) setBusy(false); foreach (k, dw; deviceWidgets) { removeDeviceWidget(k); diff --git a/linux/gtk/ui/manageappidwindow.d b/linux/gtk/ui/manageappidwindow.d index c735ef6..a237012 100644 --- a/linux/gtk/ui/manageappidwindow.d +++ b/linux/gtk/ui/manageappidwindow.d @@ -99,7 +99,7 @@ class ManageAppIdWindow: Dialog { if (response == ResponseType.ACCEPT) { setBusy(true); new Thread({ - uiTry({ + uiTry!({ scope(exit) runInUIThread(() => setBusy(false)); auto profile = session.downloadTeamProvisioningProfile!iOS(team, appId).unwrap(); @@ -120,7 +120,7 @@ class ManageAppIdWindow: Dialog { deleteAppIdRow.addOnActivated((_) { setBusy(true); new Thread({ - uiTry({ + uiTry!({ scope(exit) runInUIThread(() => setBusy(false)); session.deleteAppId!iOS(team, appId).unwrap(); runInUIThread(() => unparent()); diff --git a/linux/gtk/ui/sideloadergtkapplication.d b/linux/gtk/ui/sideloadergtkapplication.d index 65aa39f..3ff7919 100644 --- a/linux/gtk/ui/sideloadergtkapplication.d +++ b/linux/gtk/ui/sideloadergtkapplication.d @@ -87,7 +87,7 @@ class SideloaderGtkApplication: Application { auto appIdsAction = new SimpleAction("manage-app-ids", null); appIdsAction.addOnActivate((_, __) { - uiTry({ + uiTry!({ AuthenticationAssistant.authenticate(this, (developer) { auto window = new ManageAppIdWindow(mainWindow, developer); scope(failure) window.close(); @@ -99,7 +99,7 @@ class SideloaderGtkApplication: Application { auto certificatesAction = new SimpleAction("manage-certificates", null); certificatesAction.addOnActivate((_, __) { - uiTry({ + uiTry!({ AuthenticationAssistant.authenticate(this, (developer) { auto window = new ManageCertificatesWindow(mainWindow, developer); scope(failure) window.close(); diff --git a/linux/gtk/ui/utils.d b/linux/gtk/ui/utils.d index e58688e..8218057 100644 --- a/linux/gtk/ui/utils.d +++ b/linux/gtk/ui/utils.d @@ -52,7 +52,7 @@ import slf4d; import gtk.MessageDialog; -void uiTry(void delegate() del, Window parentWindow = runningApplication.mainWindow) { +void uiTry(alias del)(Window parentWindow = runningApplication.mainWindow) { try { del(); } catch (Exception ex) { diff --git a/source/imobiledevice/package.d b/source/imobiledevice/package.d index eae6944..a86abdb 100644 --- a/source/imobiledevice/package.d +++ b/source/imobiledevice/package.d @@ -68,7 +68,6 @@ public class iDevice { udid: cast(string) event.udid.fromStringz(), connType: cast(iDeviceConnectionType) event.conn_type, }; - GC.removeRoot(del); del.callback(eventD); } diff --git a/source/main.d b/source/main.d index fce3be7..dd20ce5 100644 --- a/source/main.d +++ b/source/main.d @@ -9,8 +9,6 @@ import file = std.file; import slf4d; -import provision; - import constants; import utils; diff --git a/windows/winforms/frontend.d b/windows/winforms/frontend.d index 0fbe528..ef7d38a 100644 --- a/windows/winforms/frontend.d +++ b/windows/winforms/frontend.d @@ -27,8 +27,14 @@ shared class WindowsFrontend: Frontend { } override int run(string[] args) { - Application.run(new SideloaderForm()); - return 0; + try { + Application.run(new SideloaderForm()); + return 0; + } catch (Exception ex) { + getLogger().errorF!"Unhandled exception: %s"(ex); + msgBox(ex.msg, "Unhandled exception!", MsgBoxButtons.OK, MsgBoxIcon.ERROR); + throw ex; + } } }