mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
36d6ed0355
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
20 lines
1,007 B
Diff
20 lines
1,007 B
Diff
--- 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;
|