aboutsummaryrefslogtreecommitdiff
path: root/system/winusb/winusb-1.0.11-nogksudo1.patch
diff options
context:
space:
mode:
authorRuan K. F <ruan.klein@gmail.com>2015-01-13 06:59:44 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-01-13 06:59:44 +0700
commit36d6ed03552f912ad82c36dc37036766c5da93c8 (patch)
tree6aa1841553c1a5a30d11c06933c38b7c29213f65 /system/winusb/winusb-1.0.11-nogksudo1.patch
parent2829844cc26441ca03164164f89bbe3f9cac4db7 (diff)
system/winusb: Added (USB Stick Windows Installer Creator).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/winusb/winusb-1.0.11-nogksudo1.patch')
-rw-r--r--system/winusb/winusb-1.0.11-nogksudo1.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/system/winusb/winusb-1.0.11-nogksudo1.patch b/system/winusb/winusb-1.0.11-nogksudo1.patch
new file mode 100644
index 0000000000000..e2b85c96aaa08
--- /dev/null
+++ b/system/winusb/winusb-1.0.11-nogksudo1.patch
@@ -0,0 +1,20 @@
+--- src/MainPanel.cpp 2013-03-27 18:57:44.000000000 -0300
++++ winusb-1.0.11-nogksudo1.cpp 2015-01-12 17:01:26.274398856 -0200
+@@ -240,8 +240,15 @@
+ iso = m_dvdDriveDevList.at(m_dvdDriveList->GetSelection());
+ }
+
+- PipeManager pipe(std::string("gksudo --description 'WinUSB' -- sh -c 'winusb --noColor --forGui --format \"") + iso + "\" \"" + device + "\" 2>&1'");
+-
++ //PipeManager pipe(std::string("gksudo --description 'WinUSB' -- sh -c 'winusb --noColor --forGui --format \"") + iso + "\" \"" + device + "\" 2>&1'");
++
++ if(getuid() != 0) {
++ wxMessageBox(_("WinUSB must be run by the root user !"), _("Error"), wxOK | wxICON_ERROR, this);
++ return;
++ }
++
++ PipeManager pipe(std::string("winusb --noColor --forGui --format \"") + iso + "\" \"" + device + "\" 2>&1");
++
+ wxProgressDialog *dialog = new wxProgressDialog(_("Installing..."), _("Please wait..."), 100, GetParent(), wxPD_APP_MODAL | wxPD_SMOOTH | wxPD_CAN_ABORT);
+
+ wxString log;