From 4584bf4ba1d0fb3f4217e19520033796dd13df82 Mon Sep 17 00:00:00 2001 From: mprahl Date: Sep 23 2017 00:31:29 +0000 Subject: Initial release --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b97f51d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/WoeUSB-2.1.3.tar.gz diff --git a/0001-Use-device-instead-of-format-in-the-GUI-to-avoid-a-w.patch b/0001-Use-device-instead-of-format-in-the-GUI-to-avoid-a-w.patch new file mode 100644 index 0000000..5d25e6b --- /dev/null +++ b/0001-Use-device-instead-of-format-in-the-GUI-to-avoid-a-w.patch @@ -0,0 +1,26 @@ +From 79c9524bc9effc43ada4a1ff8ec0e574d4b64c5d Mon Sep 17 00:00:00 2001 +From: mprahl +Date: Thu, 21 Sep 2017 20:03:17 -0400 +Subject: [PATCH 1/2] Use "--device" instead of "--format" in the GUI to avoid + a warning in the logs + +--- + src/MainPanel.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/MainPanel.cpp b/src/MainPanel.cpp +index ae89ef8..d756f2e 100755 +--- a/src/MainPanel.cpp ++++ b/src/MainPanel.cpp +@@ -240,7 +240,7 @@ void MainPanel::OnInstall(wxCommandEvent& event) + iso = m_dvdDriveDevList.at(m_dvdDriveList->GetSelection()); + } + +- PipeManager pipe(std::string("pkexec sh -c 'woeusb --no-color --for-gui --format \"") + iso + "\" \"" + device + "\" 2>&1'"); ++ PipeManager pipe(std::string("pkexec sh -c 'woeusb --no-color --for-gui --device \"") + iso + "\" \"" + device + "\" 2>&1'"); + + wxProgressDialog *dialog = new wxProgressDialog(_("Installing..."), _("Please wait..."), 100, GetParent(), wxPD_APP_MODAL | wxPD_SMOOTH | wxPD_CAN_ABORT); + +-- +2.13.5 + diff --git a/0002-Fix-small-grammar-errors.patch b/0002-Fix-small-grammar-errors.patch new file mode 100644 index 0000000..379cf18 --- /dev/null +++ b/0002-Fix-small-grammar-errors.patch @@ -0,0 +1,67 @@ +From 676ab960d771568a4c4cf3c2db6e6a76b76bdbad Mon Sep 17 00:00:00 2001 +From: mprahl +Date: Thu, 21 Sep 2017 20:05:50 -0400 +Subject: [PATCH 2/2] Fix small grammar errors + +--- + src/MainFrame.cpp | 2 +- + src/woeusb | 4 ++-- + src/woeusb.1 | 4 ++-- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/MainFrame.cpp b/src/MainFrame.cpp +index 23d94bf..1bd0a9e 100755 +--- a/src/MainFrame.cpp ++++ b/src/MainFrame.cpp +@@ -38,7 +38,7 @@ MainFrame::MainFrame(const wxString& title, const wxPoint& pos, const wxSize& si + + // File menu + wxMenu *FileMenu = new wxMenu; +- m_menuItemShowAll = new wxMenuItem(FileMenu, wxID_ANY, wxString(_("Show all drive")) + _T("\tCtrl+A"), _("Show all drives, even those not detected as USB stick."), wxITEM_CHECK); ++ m_menuItemShowAll = new wxMenuItem(FileMenu, wxID_ANY, wxString(_("Show all drives")) + _T("\tCtrl+A"), _("Show all drives, even those not detected as USB stick."), wxITEM_CHECK); + FileMenu->Append(m_menuItemShowAll); + + FileMenu->AppendSeparator(); +diff --git a/src/woeusb b/src/woeusb +index c311b3a..8760a09 100755 +--- a/src/woeusb ++++ b/src/woeusb +@@ -225,13 +225,13 @@ print_help(){ + echo -e "==========================" + echo -e "Create a bootable Windows USB device from a bootable Windows optical disk or an disk image" + echo -e +- echo -e "Copy Windows files to an existing FAT partition of an USB storage and make it bootable" ++ echo -e "Copy Windows files to an existing FAT partition of a USB storage device and make it bootable" + echo -e "NOTE: All files that has the same name will be OVERWRITTEN!" + echo -e "\t""${RUNTIME_EXECUTABLE_NAME} --partition " + echo -e "\t""Example: ${RUNTIME_EXECUTABLE_NAME} --partition win7_amd64.iso /dev/sdX1" + echo -e "\t""Example: ${RUNTIME_EXECUTABLE_NAME} --partition /dev/sr0 /dev/sdX1" + echo -e +- echo -e "Completely DESTROY all previous data on an USB storage and recreate partition table and target partition, copy Windows files and make it bootable" ++ echo -e "Completely DESTROY all previous data on a USB storage device, recreate the partition table and the target partition, copy the Windows files, and make it bootable" + echo -e "\t""${RUNTIME_EXECUTABLE_NAME} --device " + echo -e "\t""Example: ${RUNTIME_EXECUTABLE_NAME} --device win7_amd64.iso /dev/sdX" + echo -e "\t""Example: ${RUNTIME_EXECUTABLE_NAME} --device /dev/sr0 /dev/sdX" +diff --git a/src/woeusb.1 b/src/woeusb.1 +index dfd7732..533df4a 100644 +--- a/src/woeusb.1 ++++ b/src/woeusb.1 +@@ -77,13 +77,13 @@ Note that the label is not verified for validity and may be illegal for the file + .SH EXAMPLES + We love examples! + +-Completely DESTROY all previous data on an USB storage and recreate partition table and target partition, copy Windows files and make it bootable ++Completely DESTROY all previous data on a USB storage device, recreate the partition table and the target partition, copy the Windows files, and make it bootable + .EX + # woeusb --device win7_amd64.iso /dev/sdX + # woeusb --device /dev/sr0 /dev/sdX + .EE + +-Copy Windows files to an existing FAT partition of an USB storage and make it bootable ++Copy Windows files to an existing FAT partition of a USB storage device and make it bootable + .EX + # woeusb --partition win7_amd64.iso /dev/sdX1 + # woeusb --partition /dev/sr0 /dev/sdX1 +-- +2.13.5 + diff --git a/WoeUSB.spec b/WoeUSB.spec new file mode 100644 index 0000000..8894782 --- /dev/null +++ b/WoeUSB.spec @@ -0,0 +1,74 @@ +%global debug_package %{nil} + +Name: WoeUSB +Version: 2.1.3 +Release: 1%{?dist} +Summary: Windows USB installation media creator +License: GPLv3+ +URL: https://github.com/slacka/WoeUSB +Source0: https://github.com/slacka/WoeUSB/archive/v%{version}/%{name}-%{version}.tar.gz +Patch0: 0001-Use-device-instead-of-format-in-the-GUI-to-avoid-a-w.patch +Patch1: 0002-Fix-small-grammar-errors.patch + +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: wxGTK3-devel +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: gettext +BuildRequires: desktop-file-utils +# Used for applying the patches +BuildRequires: git +# This requirement isn't automatically getting picked up +Requires: wxGTK3-webview + +%description +A utility that enables you to create your own bootable Windows installation +USB storage device from an existing Windows Installation disc or disk image. + +%prep +%autosetup -S git + + +%build +# Resolves some compilation errors +export LDFLAGS="-Wl,-as-needed" +# Replace the version placeholders +find . -type f -print0 | xargs -0 sed -i "s/@@WOEUSB_VERSION@@/%{version}/" +%configure +%make_build + +%install +%make_install +sed -i '1!b;s/env bash/bash/' %{buildroot}%{_bindir}/woeusb +sed -i '1!b;s/env bash/bash/' %{buildroot}%{_prefix}/share/woeusb/data/listDvdDrive +sed -i '1!b;s/env bash/bash/' %{buildroot}%{_prefix}/share/woeusb/data/listUsb +desktop-file-validate %{buildroot}/%{_datadir}/applications/woeusbgui.desktop + + +%files +%license COPYING +# CLI +%{_bindir}/woeusb +%{_mandir}/man1/woeusb.1.gz +# GUI +%{_mandir}/man1/woeusbgui.1.gz +%{_bindir}/woeusbgui +%{_datadir}/applications/woeusbgui.desktop +%{_datadir}/pixmaps/woeusbgui-icon.png +%dir %{_datadir}/woeusb +%dir %{_datadir}/woeusb/data +%{_datadir}/woeusb/data/c501-logo.png +%{_datadir}/woeusb/data/icon.png +%{_datadir}/woeusb/data/listDvdDrive +%{_datadir}/woeusb/data/listUsb +%{_datadir}/woeusb/data/woeusb-logo.png +%dir %{_datadir}/woeusb/locale/fr/LC_MESSAGES +%lang(fr) %{_datadir}/woeusb/locale/fr/LC_MESSAGES/trad.mo +%lang(fr) %{_datadir}/woeusb/locale/fr/LC_MESSAGES/wxstd.mo + + +%changelog +* Wed Sep 20 2017 Matt Prahl - 2.1.3-1 +- Initial release diff --git a/sources b/sources new file mode 100644 index 0000000..a8daf2c --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (WoeUSB-2.1.3.tar.gz) = 065c8ef2446d02a33c8dc47fa1cfcc8e623b8e34af57ecbce7459185f59b10a04bb62e022ecbd10225392d0e9b9c1e9bd2adff48d7f2d1539a7c809be3ea454f