mirror of
https://github.com/mbusb/multibootusb
synced 2024-11-18 15:25:46 +00:00
Merge branch 'master' of https://github.com/mbusb/multibootusb
Conflicts: .gitignore
This commit is contained in:
commit
68732e9473
17
CHANGELOG
17
CHANGELOG
@ -1,3 +1,20 @@
|
||||
Version - 8.7.1
|
||||
---------------
|
||||
* Warning text under 'Write image to disk' tab
|
||||
* Fix for rpm based distro which did not run due to import error
|
||||
* Fix for suse package and it now checks for correct package dependencies
|
||||
* Copy only multibootusb directory to USB if user accept installation choice
|
||||
* Display human readable size for an ISO in terminal
|
||||
* New command line option to skip confirmation message 'try multibootusb -c -h' for more details
|
||||
* New command line option to install multiple distros at a time (Windows user should be able to run only under source code)
|
||||
* Fix for crash when installing under Install syslinux tab
|
||||
* Prevent read only filesystem under Linux
|
||||
* Corrected setup file copy location preventing crash
|
||||
* Improved multibootusb-pkexec script for working under rpm and deb based distros
|
||||
* Create correct policy file during build time for various packages
|
||||
* Improved user guide at http://multibootusb.org/page_guide/
|
||||
* Various code cleanups
|
||||
|
||||
Version - 8.7.0
|
||||
---------------
|
||||
* Welcome "Alin Trăistaru (alindt)". He is one of the major contributor for the project
|
||||
|
27
README.md
27
README.md
@ -1,49 +1,48 @@
|
||||
|
||||
|
||||
#### User guide is located [here](http://multibootusb.org/page_guide/)
|
||||
### Only limited instructions are provided here. For detailed instruction please refer [User guide ](http://multibootusb.org/page_guide/)
|
||||
|
||||
What is multibootusb?
|
||||
---------------------
|
||||
|
||||
MultiBootUSB is a cross platform* software/utility to create multi boot live Linux on a removable media i.e USB disk.
|
||||
It is similar to unetbootin but many distros can be installed, provided you have enough space on the disk.
|
||||
MultiBootUSB is a cross platform* software/utility to create multi boot live Linux on a removable USB disk.
|
||||
It is similar to UNetbootin but many distros can be installed, provided you have enough space on the disk.
|
||||
MultiBootUSB also provides an option to uninstall distro(s) at any time, if you wish.
|
||||
|
||||
* Only works on windows and linux
|
||||
|
||||
## What does multibootusb do?
|
||||
|
||||
MultiBootUSB allows you to do the following:-
|
||||
MultiBootUSB allows you to do the following:
|
||||
|
||||
1. Install multiple live Linux and other Operating Systems in to a USB disk and make it bootable without erasing existing data.
|
||||
1. Install multiple live Linux and other Operating Systems to a USB disk and make it bootable without erasing existing data.
|
||||
2. Ability to uninstall installed OS later.
|
||||
3. Write ISO image directly to a USB disk (you can think of GUI for Linux `dd` command).
|
||||
4. Boot ISO images directly without rebooting your system using QEMU option.
|
||||
5. Boot bootable USBs without rebooting your system using QEMU option.
|
||||
6. Boot USB on UEFI/EFI system through GRUB2 bootloader support (limited support).
|
||||
6. Boot USB on UEFI/EFI system through GRUB2 bootloader (limited support).
|
||||
|
||||
|
||||
## Installation:
|
||||
|
||||
* On Windows:-
|
||||
* On Windows:
|
||||
* The windows version of multbootusb is not a standalone program. You need to install it on windows after download. Download the latest
|
||||
precompiled setup binary (.exe) file from
|
||||
[here](http://multibootusb.org/page_download/)
|
||||
* The installation is farley simple. Double click on the executable and follow the onscreen instruction.
|
||||
* The installation is fairly simple. Double click on the executable and follow the onscreen instructions.
|
||||
|
||||
* On Linux:-
|
||||
* On Linux:
|
||||
|
||||
**Using binary method:-**
|
||||
**Using binary method:**
|
||||
|
||||
* Download the installation and source files for various distros from
|
||||
[here](http://multibootusb.org/page_download/)
|
||||
* Use your favourite package manager to install multibootusb.
|
||||
|
||||
**Using source code method `Linux`:-**
|
||||
**Using source code method:**
|
||||
|
||||
* The install.py script provided with multibootusb should take care of all dependencies and install multibootusb.
|
||||
Assume that you have downloaded the package named **multibootusb.tar.gz** in to your home directory.
|
||||
Issue the following commands to install multibootusb:-
|
||||
Assuming you have downloaded the package named **multibootusb.tar.gz** in your home directory, issue the following commands to install multibootusb:
|
||||
|
||||
```sh
|
||||
tar -xf ./multibootusb.tar.gz
|
||||
@ -65,7 +64,7 @@ chmod +x ./uninstall.py
|
||||
sudo ./uninstall.py
|
||||
```
|
||||
|
||||
For the rest of operations you can refer [Guide](http://multibootusb.org/page_guide/) section of [http://multibootusb.org](http://multibootusb.org)
|
||||
For the rest of operations you can refer to the [Guide](http://multibootusb.org/page_guide/) section of [http://multibootusb.org](http://multibootusb.org)
|
||||
|
||||
Website:
|
||||
--------
|
||||
|
34
build_pkg
34
build_pkg
@ -20,6 +20,7 @@ import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import platform
|
||||
import re
|
||||
|
||||
|
||||
####################################################################################################
|
||||
@ -34,6 +35,9 @@ else:
|
||||
# pyinstaller_path = "/home/sundar/Documents/pyInstaller/pyinstaller.py"
|
||||
pyinstaller_path = "/media/sundar/Data/multibootusb/pyinstaller/pyinstaller.py"
|
||||
release_dir = "/media/sundar/Data/multibootusb/release"
|
||||
debian_bin_path = '/usr/bin/multibootusb'
|
||||
rpm_bin_path = '/usr/local/bin/multibootusb'
|
||||
|
||||
sourceforge_release_path = "multibootusb@frs.sourceforge.net:/home/frs/project/multibootusb/"
|
||||
####################################################################################################
|
||||
|
||||
@ -47,6 +51,27 @@ class bcolors:
|
||||
ENDC = '\033[0m'
|
||||
|
||||
|
||||
def coorect_bin_path(_file_path, search_bin_path, replace_bin_path):
|
||||
import shutil
|
||||
|
||||
# shutil.move(_file_path, _file_path + "~")
|
||||
# destination = open(_file_path, "w")
|
||||
# source = open(_file_path + "~", "r").read()
|
||||
|
||||
with open(_file_path + "~", 'r') as _infile:
|
||||
data = _infile.read()
|
||||
|
||||
if re.search(search_bin_path, data, re.I):
|
||||
_data = re.search(search_bin_path, data, re.I).group()
|
||||
_mod_text = re.sub(search_bin_path, replace_bin_path, data)
|
||||
print('_mod_text', _mod_text)
|
||||
with open(_file_path, 'w') as _out_file:
|
||||
_out_file.write(_mod_text)
|
||||
else:
|
||||
with open(_file_path, 'w') as _out_file:
|
||||
_out_file.write(data)
|
||||
|
||||
|
||||
class pkg():
|
||||
def __init__(self, name):
|
||||
self.pkg_name = name
|
||||
@ -64,6 +89,8 @@ class pkg():
|
||||
if not os.path.exists(os.path.join(self.release_upload_dir, "Source")):
|
||||
os.mkdir(os.path.join(self.release_upload_dir, "Source"))
|
||||
if self.pkg_name == "deb":
|
||||
print('Modifying policy file...')
|
||||
coorect_bin_path('org.debian.pkexec.run-multibootusb.policy', rpm_bin_path, debian_bin_path)
|
||||
print("Ensure thta you have python-stdeb package installed!")
|
||||
stdcfg = """[DEFAULT]
|
||||
Package: multibootusb
|
||||
@ -89,7 +116,11 @@ class pkg():
|
||||
print((os.path.join("deb_dist", "python3-multibootusb_" + self.version + "-1_all.deb\n\n\n")))
|
||||
result = True
|
||||
elif self.pkg_name == 'rpm' or self.pkg_name == 'suse' or self.pkg_name == 'mageia':
|
||||
if self.pkg_name == 'suse' or self.pkg_name == 'mageia':
|
||||
print('Modifying policy file for rpm packages...')
|
||||
coorect_bin_path('org.debian.pkexec.run-multibootusb.policy', debian_bin_path, rpm_bin_path)
|
||||
if self.pkg_name == 'suse':
|
||||
require = "python3-qt5, parted, util-linux, mtools, dbus-1-python3, python3-pyudev, p7zip, python3-six"
|
||||
elif self.pkg_name == 'mageia':
|
||||
require = "python3-qt5, parted, util-linux, mtools, python3-dbus, python3-pyudev, p7zip, python3-six"
|
||||
else:
|
||||
require = "python3-PyQt5, parted, util-linux, mtools, python3-dbus, python3-pyudev, p7zip, p7zip-plugins, python3-six"
|
||||
@ -282,6 +313,7 @@ if __name__ == '__main__':
|
||||
if platform.system() == 'Linux':
|
||||
print('Converting line ending to Linux for proper functioning.')
|
||||
os.system('dos2unix multibootusb')
|
||||
|
||||
argv = sys.argv
|
||||
if not os.path.exists(release_dir):
|
||||
print("Release directory does not exist.\nPlease mount and rerun the script.")
|
||||
|
@ -1 +1 @@
|
||||
8.7.0
|
||||
8.7.1
|
||||
|
84
multibootusb
Executable file → Normal file
84
multibootusb
Executable file → Normal file
@ -4,7 +4,7 @@
|
||||
# Purpose: Main file which will determine if cli or gui is to be opened
|
||||
# Authors: Sundar
|
||||
# Licence: This file is a part of multibootusb package. You can redistribute it or modify
|
||||
# under the terms of GNU General Public License, v.2 or above
|
||||
# under the terms of GNU General Public License, version 2 or above.
|
||||
|
||||
import logging
|
||||
import getopt
|
||||
@ -12,6 +12,10 @@ import sys
|
||||
import os
|
||||
import platform
|
||||
|
||||
# The following line is required for distros based on rpm so as to avoid import errors when running from installed system
|
||||
sys.path.append('/usr/local/lib/python3.4/dist-packages')
|
||||
# print(sys.path)
|
||||
|
||||
# Had trouble in importing scripts directory. Had to add few lines below to ensure it works on source as well as
|
||||
# post install
|
||||
try:
|
||||
@ -32,22 +36,60 @@ gui = True
|
||||
uninstall = False
|
||||
|
||||
|
||||
def running_from():
|
||||
"""
|
||||
Print version and path location (installed or source code) info for debugging later.
|
||||
"""
|
||||
if os.path.exists('scripts'):
|
||||
gen.log('Running multibootusb version ' + gen.mbusb_version() + ' from source...')
|
||||
else:
|
||||
gen.log('Running multibootusb version ' + gen.mbusb_version() + ' from installed system...')
|
||||
|
||||
|
||||
def usage():
|
||||
print('\n An advanced multiboot live usb creator using command line.')
|
||||
print('\n Usage: python3 multibootusb [option(s)]\n')
|
||||
print(' Options:\n')
|
||||
print(' -h or --help : Print this help message and exit')
|
||||
print(' -i or --iso : Path to ISO file')
|
||||
print(' -t or --target : Path to target USB device partition (example /dev/sdb1)')
|
||||
print(' -c or --command : Invoke command line usage. This option is must')
|
||||
print(' -u or --uninstall : List and uninstall distro from an USB disk')
|
||||
print(' -d or --debug : Enable debug messages (very verbose!)\n')
|
||||
print(' Eexample for making a bootable USB from command line should look like this:\n')
|
||||
print('\tpython3 multibootusb -c -i ../../favourite.iso -t /dev/sdb1 on Linux and \n')
|
||||
print('\tpython3 multibootusb -c -i ../../favourite.iso -t G: on Windows\n')
|
||||
print(' Example for uninstalling distro from an USB should look like this:\n')
|
||||
print('\tpython3 multibootusb -c -u -t /dev/sdb1 on Linux and \n')
|
||||
print('\tpython3 multibootusb -c -u -t G: on Windows\n')
|
||||
print('''
|
||||
An advanced multiboot live usb creator which can be used from the command line
|
||||
or via a GUI.
|
||||
|
||||
Usage: python3 multibootusb [option(s)]
|
||||
|
||||
Options:
|
||||
-h or --help : Print this help message and exit
|
||||
-c or --command : Invoke command line usage. This option is required;
|
||||
if omitted, the GUI will be launched.
|
||||
-i or --iso : Path to ISO file()s. If many ISOs are supplied,
|
||||
they should be separated by ',' with no spaces in
|
||||
between.
|
||||
-t or --target : Path to target USB device partition (e.g. "/dev/sdb1").
|
||||
-y or --yes : Default yes for user input during install.
|
||||
Will not wait for user.
|
||||
-u or --uninstall : List and uninstall distro from an USB disk.
|
||||
-d or --debug : Enable debug messages (very verbose!)
|
||||
|
||||
Example for making a bootable USB from the command line:
|
||||
|
||||
Linux:
|
||||
python3 multibootusb -c -i ../../favourite.iso -t /dev/sdb1
|
||||
|
||||
Windows:
|
||||
python3 multibootusb -c -i ../../favourite.iso -t G:
|
||||
|
||||
Example for uninstalling a distro from a USB:
|
||||
|
||||
Linux:
|
||||
python3 multibootusb -c -u -t /dev/sdb1
|
||||
|
||||
Windows:
|
||||
python3 multibootusb -c -u -t G:
|
||||
|
||||
Example for installing multiple distros without user intervention:
|
||||
|
||||
Linux:
|
||||
python3 multibootusb -c -y -i ../../favourite.iso,../../other-distro.iso -t /dev/sdb1
|
||||
|
||||
Windows:
|
||||
python3 multibootusb -c -i ../../favourite.iso,../../other-distro.iso -t G:
|
||||
''')
|
||||
exit(2)
|
||||
|
||||
|
||||
@ -63,13 +105,14 @@ def start_gui():
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
running_from()
|
||||
if platform.system() == 'Windows':
|
||||
if not admin.isUserAdmin():
|
||||
admin.runAsAdmin()
|
||||
sys.exit(0)
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], 'i:t:vhcud',
|
||||
['iso=', 'target=', 'version', 'help', 'command', 'uninstall', 'debug'])
|
||||
opts, args = getopt.getopt(sys.argv[1:], 'i:t:yvhcud',
|
||||
['iso=', 'target=', 'yes', 'version', 'help', 'command', 'uninstall', 'debug'])
|
||||
except getopt.GetoptError:
|
||||
usage()
|
||||
sys.exit(2)
|
||||
@ -81,7 +124,10 @@ if __name__ == '__main__':
|
||||
print_version()
|
||||
sys.exit()
|
||||
elif opt in ('-i', '--iso'):
|
||||
if ',' not in arg:
|
||||
config.image_path = arg
|
||||
else:
|
||||
config.image_path = arg.split(',')
|
||||
elif opt in ('-t', '--target'):
|
||||
config.usb_disk = arg
|
||||
elif opt in ('-c', '--command'):
|
||||
@ -90,6 +136,8 @@ if __name__ == '__main__':
|
||||
uninstall = True
|
||||
elif opt in ('-d', '--debug'):
|
||||
config.debug = True
|
||||
elif opt in ('-y', '--yes'):
|
||||
config.yes = True
|
||||
else:
|
||||
gui = True
|
||||
#start_gui()
|
||||
|
@ -1,6 +1,22 @@
|
||||
#!/bin/bash
|
||||
# Generic wrapper for locating multibootusb file and execute pkexec accordingly
|
||||
# Bin pat of this file and policy file have to match
|
||||
|
||||
if [ $(which pkexec) ]; then
|
||||
if [ -f /usr/bin/multibootusb ]; then
|
||||
pkexec --disable-internal-agent "/usr/bin/multibootusb" "$@"
|
||||
fi
|
||||
|
||||
if [ -f /usr/local/bin/multibootusb ]; then
|
||||
pkexec --disable-internal-agent "/usr/local/bin/multibootusb" "$@"
|
||||
fi
|
||||
else
|
||||
if [ -f /usr/bin/multibootusb ]; then
|
||||
/usr/bin/multibootusb "$@"
|
||||
fi
|
||||
|
||||
if [ -f /usr/local/bin/multibootusb ]; then
|
||||
/usr/local/bin/multibootusb "$@"
|
||||
fi
|
||||
|
||||
fi
|
@ -12,7 +12,7 @@
|
||||
<allow_inactive>auth_admin</allow_inactive>
|
||||
<allow_active>auth_admin</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/multibootusb</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">/usr/local/bin/multibootusb</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
||||
</action>
|
||||
|
||||
|
@ -80,7 +80,7 @@ def list_iso(iso_link, suppress_out=True):
|
||||
if '.....' in line:
|
||||
if gen.has_digit(line[2]) or gen.has_digit(line[4]):
|
||||
if len(line) > 6:
|
||||
f_path = " ".join(line[5:len(line)])
|
||||
f_path = " ".join(line[5:])
|
||||
file_list.append(f_path)
|
||||
else:
|
||||
f_path = line[-1]
|
||||
@ -115,10 +115,7 @@ def test_iso(iso_link, suppress_out=True):
|
||||
|
||||
rc = subprocess.call(_cmd, shell=True)
|
||||
|
||||
if rc == 0 or rc == 1:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
return bool(rc in [0, 1])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -86,7 +86,10 @@ def runAsAdmin(cmdLine=None, wait=True):
|
||||
# raise RuntimeError, "This function is only implemented on Windows."
|
||||
if platform.system() == "Windows":
|
||||
|
||||
import win32api, win32con, win32event, win32process
|
||||
import win32api
|
||||
import win32con
|
||||
import win32event
|
||||
import win32process
|
||||
from win32com.shell.shell import ShellExecuteEx
|
||||
from win32com.shell import shellcon
|
||||
|
||||
|
@ -25,6 +25,8 @@ uninstall_distro_dir_path = ""
|
||||
iso_file_list = ''
|
||||
iso_bin_dir = ''
|
||||
process_exist = None
|
||||
yes = False
|
||||
|
||||
|
||||
imager_iso_link = ""
|
||||
imager_usb_disk_selected = ""
|
||||
|
@ -112,10 +112,7 @@ def is_quoted(text):
|
||||
:param text: Any word or sentence with or without quote.
|
||||
:return: True if text is quoted else False.
|
||||
"""
|
||||
if text.startswith("\"") and text.endswith("\""):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
return bool(text.startswith("\"") and text.endswith("\""))
|
||||
|
||||
|
||||
def has_digit(word):
|
||||
@ -216,12 +213,15 @@ def copy_mbusb_dir_usb(usb_disk):
|
||||
log('multibootusb directory already exists. Not copying.')
|
||||
|
||||
if not os.path.exists(os.path.join(usb_mount_path, 'EFI', 'BOOT', 'multibootusb_grub2.txt')):
|
||||
if not os.path.exists(os.path.join(usb_mount_path, 'EFI', 'BOOT')):
|
||||
log('EFI directory does not exist. Creating new.')
|
||||
os.makedirs(os.path.join(usb_mount_path, 'EFI', 'BOOT'), exist_ok=True)
|
||||
try:
|
||||
log('Copying EFI directory to ' + usb_mount_path)
|
||||
shutil.copytree(resource_path(os.path.join("data", "EFI")), os.path.join(usb_mount_path, "EFI"))
|
||||
result = True
|
||||
except:
|
||||
log('multibootusb directory could not be copied to ' + usb_mount_path)
|
||||
log('EFI directory could not be copied to ' + usb_mount_path)
|
||||
result = False
|
||||
else:
|
||||
log('EFI directory already exist. Not copying.')
|
||||
@ -263,10 +263,8 @@ def size_not_enough(iso_link, usb_disk):
|
||||
isoSize = iso_size(iso_link)
|
||||
usb_details = details(usb_disk)
|
||||
usb_size = usb_details['size_free']
|
||||
if isoSize > usb_size:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
return bool(isoSize > usb_size)
|
||||
|
||||
|
||||
def mbusb_version():
|
||||
@ -336,12 +334,12 @@ def prepare_mbusb_host_dir():
|
||||
log("Removing junk files...")
|
||||
for files in os.listdir(os.path.join(home, "iso_cfg_ext_dir")):
|
||||
if os.path.isdir(os.path.join(os.path.join(home, "iso_cfg_ext_dir", files))):
|
||||
log (os.path.join(os.path.join(home, "iso_cfg_ext_dir", files)))
|
||||
log(os.path.join(os.path.join(home, "iso_cfg_ext_dir", files)))
|
||||
os.chmod(os.path.join(os.path.join(home, "iso_cfg_ext_dir", files)), 0o777)
|
||||
shutil.rmtree(os.path.join(os.path.join(home, "iso_cfg_ext_dir", files)))
|
||||
else:
|
||||
try:
|
||||
log (os.path.join(os.path.join(home, "iso_cfg_ext_dir", files)))
|
||||
log(os.path.join(os.path.join(home, "iso_cfg_ext_dir", files)))
|
||||
os.chmod(os.path.join(os.path.join(home, "iso_cfg_ext_dir", files)), 0o777)
|
||||
os.unlink(os.path.join(os.path.join(home, "iso_cfg_ext_dir", files)))
|
||||
os.remove(os.path.join(os.path.join(home, "iso_cfg_ext_dir", files)))
|
||||
|
@ -11,6 +11,7 @@ from . import config
|
||||
from . import iso
|
||||
from . import _7zip
|
||||
from . import gen
|
||||
from .usb import bytes2human
|
||||
|
||||
|
||||
def mbusb_update_grub_cfg():
|
||||
@ -141,9 +142,9 @@ def get_grub_cfg(iso_link, efi=True):
|
||||
|
||||
|
||||
def grub_custom_menu(mbus_grub_cfg_path, distro):
|
||||
iso_size_mb = iso.iso_size(config.image_path) / (1024.0 * 1024.0)
|
||||
iso_size_mb = bytes2human(iso.iso_size(config.image_path))
|
||||
gen.log('size of the ISO is ' + str(iso_size_mb))
|
||||
if distro == 'sgrubd2' or distro == 'raw_iso':
|
||||
if distro in ['sgrubd2', 'raw_iso']:
|
||||
grub_raw_iso(mbus_grub_cfg_path)
|
||||
|
||||
'''
|
||||
|
@ -308,7 +308,7 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_multibootusb">
|
||||
<property name="enabled">
|
||||
@ -483,7 +483,7 @@
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item row="1" column="2">
|
||||
<item row="3" column="2">
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -496,14 +496,14 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QPushButton" name="button_write_image_to_disk">
|
||||
<property name="text">
|
||||
<string>Write image to USB</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" colspan="2">
|
||||
<item row="3" column="3" colspan="2">
|
||||
<widget class="QWidget" name="widget_7" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<property name="leftMargin">
|
||||
@ -521,7 +521,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="3" column="0">
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -534,8 +534,28 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p align="center"><span style=" font-size:14pt; font-weight:600; color:#ff0000;">WARNING!</span></p><p align="center"><span style=" color:#000000;">This operation destroys </span><span style=" font-weight:600; color:#000000;">ALL</span><span style=" color:#000000;"> data on the selected disk.</span></p><p align="center"><span style=" color:#000000;">Please select the destination disk carefully.</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="verticalSpacer_4">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
@ -548,7 +568,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<spacer name="verticalSpacer_5">
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
@ -560,6 +580,16 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_waning">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p align="justify"><span style=" font-weight:600; color:#ff0000;">WARNING</span> : Any bootable USB made using<span style=" font-weight:600;"> ISO Imager will destroy all data </span>on the selected USB disk. </p><p align="justify">Use it at your own risk. Developers are not responsile for loss of any data.</p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
@ -935,7 +965,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>629</width>
|
||||
<height>19</height>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="nativeMenuBar">
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,519 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'gui/multibootusb.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.5.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
class Ui_Dialog(object):
|
||||
def setupUi(self, Dialog):
|
||||
Dialog.setObjectName("Dialog")
|
||||
Dialog.resize(717, 516)
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout(Dialog)
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.tabWidget = QtWidgets.QTabWidget(Dialog)
|
||||
self.tabWidget.setEnabled(True)
|
||||
self.tabWidget.setObjectName("tabWidget")
|
||||
self.tab_3 = QtWidgets.QWidget()
|
||||
self.tab_3.setEnabled(True)
|
||||
self.tab_3.setObjectName("tab_3")
|
||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.tab_3)
|
||||
self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
|
||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||
self.gridLayout = QtWidgets.QGridLayout()
|
||||
self.gridLayout.setContentsMargins(5, 5, 5, 5)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.groupBox_6 = QtWidgets.QGroupBox(self.tab_3)
|
||||
self.groupBox_6.setAlignment(QtCore.Qt.AlignBottom|QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing)
|
||||
self.groupBox_6.setFlat(False)
|
||||
self.groupBox_6.setCheckable(False)
|
||||
self.groupBox_6.setObjectName("groupBox_6")
|
||||
self.formLayout = QtWidgets.QFormLayout(self.groupBox_6)
|
||||
self.formLayout.setLabelAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.formLayout.setObjectName("formLayout")
|
||||
self.label_usb_dev = QtWidgets.QLabel(self.groupBox_6)
|
||||
self.label_usb_dev.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.label_usb_dev.setObjectName("label_usb_dev")
|
||||
self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_usb_dev)
|
||||
self.usb_dev = QtWidgets.QLabel(self.groupBox_6)
|
||||
self.usb_dev.setText("")
|
||||
self.usb_dev.setObjectName("usb_dev")
|
||||
self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.usb_dev)
|
||||
self.label_usb_vendor = QtWidgets.QLabel(self.groupBox_6)
|
||||
self.label_usb_vendor.setObjectName("label_usb_vendor")
|
||||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_usb_vendor)
|
||||
self.usb_vendor = QtWidgets.QLabel(self.groupBox_6)
|
||||
self.usb_vendor.setText("")
|
||||
self.usb_vendor.setObjectName("usb_vendor")
|
||||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.usb_vendor)
|
||||
self.label_usb_model = QtWidgets.QLabel(self.groupBox_6)
|
||||
self.label_usb_model.setObjectName("label_usb_model")
|
||||
self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_usb_model)
|
||||
self.label_usb_size = QtWidgets.QLabel(self.groupBox_6)
|
||||
self.label_usb_size.setFrameShape(QtWidgets.QFrame.NoFrame)
|
||||
self.label_usb_size.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.label_usb_size.setObjectName("label_usb_size")
|
||||
self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_usb_size)
|
||||
self.label_usb_mount = QtWidgets.QLabel(self.groupBox_6)
|
||||
self.label_usb_mount.setObjectName("label_usb_mount")
|
||||
self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_usb_mount)
|
||||
self.usb_model = QtWidgets.QLabel(self.groupBox_6)
|
||||
self.usb_model.setText("")
|
||||
self.usb_model.setObjectName("usb_model")
|
||||
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.usb_model)
|
||||
self.usb_size = QtWidgets.QLabel(self.groupBox_6)
|
||||
self.usb_size.setText("")
|
||||
self.usb_size.setObjectName("usb_size")
|
||||
self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.usb_size)
|
||||
self.usb_mount = QtWidgets.QLabel(self.groupBox_6)
|
||||
self.usb_mount.setText("")
|
||||
self.usb_mount.setObjectName("usb_mount")
|
||||
self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.usb_mount)
|
||||
self.gridLayout.addWidget(self.groupBox_6, 2, 0, 1, 5)
|
||||
self.close = QtWidgets.QPushButton(self.tab_3)
|
||||
self.close.setObjectName("close")
|
||||
self.gridLayout.addWidget(self.close, 9, 6, 1, 1)
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.gridLayout.addItem(spacerItem, 8, 0, 1, 1)
|
||||
self.browse_iso = QtWidgets.QPushButton(self.tab_3)
|
||||
self.browse_iso.setCheckable(False)
|
||||
self.browse_iso.setFlat(False)
|
||||
self.browse_iso.setObjectName("browse_iso")
|
||||
self.gridLayout.addWidget(self.browse_iso, 4, 4, 1, 1)
|
||||
self.listWidget = QtWidgets.QListWidget(self.tab_3)
|
||||
self.listWidget.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
||||
self.listWidget.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
self.listWidget.setResizeMode(QtWidgets.QListView.Fixed)
|
||||
self.listWidget.setObjectName("listWidget")
|
||||
self.gridLayout.addWidget(self.listWidget, 1, 5, 8, 2)
|
||||
self.label_persistence = QtWidgets.QLabel(self.tab_3)
|
||||
self.label_persistence.setEnabled(False)
|
||||
self.label_persistence.setMouseTracking(True)
|
||||
self.label_persistence.setStyleSheet("font-weight: 600")
|
||||
self.label_persistence.setObjectName("label_persistence")
|
||||
self.gridLayout.addWidget(self.label_persistence, 6, 0, 1, 1)
|
||||
self.lineEdit = QtWidgets.QLineEdit(self.tab_3)
|
||||
self.lineEdit.setObjectName("lineEdit")
|
||||
self.gridLayout.addWidget(self.lineEdit, 4, 0, 1, 4)
|
||||
self.detect_usb = QtWidgets.QPushButton(self.tab_3)
|
||||
self.detect_usb.setObjectName("detect_usb")
|
||||
self.gridLayout.addWidget(self.detect_usb, 1, 2, 1, 2)
|
||||
self.uninstall = QtWidgets.QPushButton(self.tab_3)
|
||||
self.uninstall.setObjectName("uninstall")
|
||||
self.gridLayout.addWidget(self.uninstall, 0, 5, 1, 2)
|
||||
self.comboBox = QtWidgets.QComboBox(self.tab_3)
|
||||
self.comboBox.setObjectName("comboBox")
|
||||
self.gridLayout.addWidget(self.comboBox, 1, 0, 1, 2)
|
||||
self.slider_persistence = QtWidgets.QSlider(self.tab_3)
|
||||
self.slider_persistence.setEnabled(False)
|
||||
self.slider_persistence.setAutoFillBackground(False)
|
||||
self.slider_persistence.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.slider_persistence.setTickPosition(QtWidgets.QSlider.TicksBothSides)
|
||||
self.slider_persistence.setObjectName("slider_persistence")
|
||||
self.gridLayout.addWidget(self.slider_persistence, 6, 1, 1, 3)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout.addItem(spacerItem1, 8, 2, 1, 2)
|
||||
self.checkBox_all_drives = QtWidgets.QCheckBox(self.tab_3)
|
||||
self.checkBox_all_drives.setObjectName("checkBox_all_drives")
|
||||
self.gridLayout.addWidget(self.checkBox_all_drives, 1, 4, 1, 1)
|
||||
self.label_persistence_value = QtWidgets.QLabel(self.tab_3)
|
||||
self.label_persistence_value.setEnabled(False)
|
||||
self.label_persistence_value.setObjectName("label_persistence_value")
|
||||
self.gridLayout.addWidget(self.label_persistence_value, 6, 4, 1, 1)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout.addItem(spacerItem2, 8, 1, 1, 1)
|
||||
self.create = QtWidgets.QPushButton(self.tab_3)
|
||||
self.create.setObjectName("create")
|
||||
self.gridLayout.addWidget(self.create, 7, 4, 1, 1)
|
||||
self.progressBar = QtWidgets.QProgressBar(self.tab_3)
|
||||
self.progressBar.setProperty("value", 0)
|
||||
self.progressBar.setInvertedAppearance(False)
|
||||
self.progressBar.setObjectName("progressBar")
|
||||
self.gridLayout.addWidget(self.progressBar, 7, 0, 1, 4)
|
||||
self.status = QtWidgets.QLabel(self.tab_3)
|
||||
self.status.setMinimumSize(QtCore.QSize(0, 0))
|
||||
self.status.setAcceptDrops(False)
|
||||
self.status.setAutoFillBackground(False)
|
||||
self.status.setFrameShadow(QtWidgets.QFrame.Plain)
|
||||
self.status.setTextFormat(QtCore.Qt.AutoText)
|
||||
self.status.setScaledContents(False)
|
||||
self.status.setObjectName("status")
|
||||
self.gridLayout.addWidget(self.status, 9, 0, 1, 6)
|
||||
self.labelstep1 = QtWidgets.QLabel(self.tab_3)
|
||||
self.labelstep1.setStyleSheet("font-weight: 600; margin-top:15")
|
||||
self.labelstep1.setObjectName("labelstep1")
|
||||
self.gridLayout.addWidget(self.labelstep1, 0, 0, 1, 5)
|
||||
self.labelstep2 = QtWidgets.QLabel(self.tab_3)
|
||||
self.labelstep2.setStyleSheet("font-weight: 600; margin-top:15")
|
||||
self.labelstep2.setObjectName("labelstep2")
|
||||
self.gridLayout.addWidget(self.labelstep2, 3, 0, 1, 5)
|
||||
self.labelstep3 = QtWidgets.QLabel(self.tab_3)
|
||||
self.labelstep3.setStyleSheet("font-weight: 600; margin-top:15")
|
||||
self.labelstep3.setObjectName("labelstep3")
|
||||
self.gridLayout.addWidget(self.labelstep3, 5, 0, 1, 5)
|
||||
self.horizontalLayout_2.addLayout(self.gridLayout)
|
||||
self.tabWidget.addTab(self.tab_3, "")
|
||||
self.imager = QtWidgets.QWidget()
|
||||
self.imager.setEnabled(True)
|
||||
self.imager.setObjectName("imager")
|
||||
self.horizontalLayout_7 = QtWidgets.QHBoxLayout(self.imager)
|
||||
self.horizontalLayout_7.setContentsMargins(0, 0, 0, 0)
|
||||
self.horizontalLayout_7.setObjectName("horizontalLayout_7")
|
||||
self.gridLayout_9 = QtWidgets.QGridLayout()
|
||||
self.gridLayout_9.setContentsMargins(5, 5, 5, 5)
|
||||
self.gridLayout_9.setObjectName("gridLayout_9")
|
||||
self.widget_7 = QtWidgets.QWidget(self.imager)
|
||||
self.widget_7.setObjectName("widget_7")
|
||||
self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.widget_7)
|
||||
self.verticalLayout_6.setContentsMargins(5, 5, 5, 5)
|
||||
self.verticalLayout_6.setObjectName("verticalLayout_6")
|
||||
self.gridLayout_11 = QtWidgets.QGridLayout()
|
||||
self.gridLayout_11.setObjectName("gridLayout_11")
|
||||
self.groupBox_10 = QtWidgets.QGroupBox(self.widget_7)
|
||||
self.groupBox_10.setObjectName("groupBox_10")
|
||||
self.verticalLayout_9 = QtWidgets.QVBoxLayout(self.groupBox_10)
|
||||
self.verticalLayout_9.setObjectName("verticalLayout_9")
|
||||
self.pushButton = QtWidgets.QPushButton(self.groupBox_10)
|
||||
self.pushButton.setObjectName("pushButton")
|
||||
self.verticalLayout_9.addWidget(self.pushButton)
|
||||
self.lineEdit_3 = QtWidgets.QLineEdit(self.groupBox_10)
|
||||
self.lineEdit_3.setObjectName("lineEdit_3")
|
||||
self.verticalLayout_9.addWidget(self.lineEdit_3)
|
||||
self.imager_bootable = QtWidgets.QLabel(self.groupBox_10)
|
||||
self.imager_bootable.setObjectName("imager_bootable")
|
||||
self.verticalLayout_9.addWidget(self.imager_bootable)
|
||||
self.imager_iso_size = QtWidgets.QLabel(self.groupBox_10)
|
||||
self.imager_iso_size.setObjectName("imager_iso_size")
|
||||
self.verticalLayout_9.addWidget(self.imager_iso_size)
|
||||
spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout_9.addItem(spacerItem3)
|
||||
self.gridLayout_11.addWidget(self.groupBox_10, 0, 1, 1, 1)
|
||||
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_11.addItem(spacerItem4, 1, 0, 1, 1)
|
||||
self.groupBox_9 = QtWidgets.QGroupBox(self.widget_7)
|
||||
self.groupBox_9.setStyleSheet("")
|
||||
self.groupBox_9.setObjectName("groupBox_9")
|
||||
self.verticalLayout_8 = QtWidgets.QVBoxLayout(self.groupBox_9)
|
||||
self.verticalLayout_8.setObjectName("verticalLayout_8")
|
||||
self.comboBox_2 = QtWidgets.QComboBox(self.groupBox_9)
|
||||
self.comboBox_2.setObjectName("comboBox_2")
|
||||
self.verticalLayout_8.addWidget(self.comboBox_2)
|
||||
self.pushbtn_imager_refreshusb = QtWidgets.QPushButton(self.groupBox_9)
|
||||
self.pushbtn_imager_refreshusb.setObjectName("pushbtn_imager_refreshusb")
|
||||
self.verticalLayout_8.addWidget(self.pushbtn_imager_refreshusb)
|
||||
self.formLayout_3 = QtWidgets.QFormLayout()
|
||||
self.formLayout_3.setLabelAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.formLayout_3.setObjectName("formLayout_3")
|
||||
self.label_imager_disk_label = QtWidgets.QLabel(self.groupBox_9)
|
||||
self.label_imager_disk_label.setObjectName("label_imager_disk_label")
|
||||
self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_imager_disk_label)
|
||||
self.label_imager_total_size = QtWidgets.QLabel(self.groupBox_9)
|
||||
self.label_imager_total_size.setObjectName("label_imager_total_size")
|
||||
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_imager_total_size)
|
||||
self.label_imager_uuid = QtWidgets.QLabel(self.groupBox_9)
|
||||
self.label_imager_uuid.setObjectName("label_imager_uuid")
|
||||
self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_imager_uuid)
|
||||
self.imager_disk_label = QtWidgets.QLabel(self.groupBox_9)
|
||||
self.imager_disk_label.setText("")
|
||||
self.imager_disk_label.setObjectName("imager_disk_label")
|
||||
self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.imager_disk_label)
|
||||
self.imager_total_size = QtWidgets.QLabel(self.groupBox_9)
|
||||
self.imager_total_size.setText("")
|
||||
self.imager_total_size.setObjectName("imager_total_size")
|
||||
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.imager_total_size)
|
||||
self.imager_uuid = QtWidgets.QLabel(self.groupBox_9)
|
||||
self.imager_uuid.setText("")
|
||||
self.imager_uuid.setObjectName("imager_uuid")
|
||||
self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.imager_uuid)
|
||||
self.verticalLayout_8.addLayout(self.formLayout_3)
|
||||
spacerItem5 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout_8.addItem(spacerItem5)
|
||||
self.gridLayout_11.addWidget(self.groupBox_9, 0, 0, 1, 1)
|
||||
self.verticalLayout_6.addLayout(self.gridLayout_11)
|
||||
self.imager_label_status = QtWidgets.QLabel(self.widget_7)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.imager_label_status.sizePolicy().hasHeightForWidth())
|
||||
self.imager_label_status.setSizePolicy(sizePolicy)
|
||||
self.imager_label_status.setObjectName("imager_label_status")
|
||||
self.verticalLayout_6.addWidget(self.imager_label_status)
|
||||
self.gridLayout_12 = QtWidgets.QGridLayout()
|
||||
self.gridLayout_12.setObjectName("gridLayout_12")
|
||||
self.label_10 = QtWidgets.QLabel(self.widget_7)
|
||||
self.label_10.setObjectName("label_10")
|
||||
self.gridLayout_12.addWidget(self.label_10, 1, 0, 1, 3)
|
||||
self.imager_progressbar = QtWidgets.QProgressBar(self.widget_7)
|
||||
self.imager_progressbar.setProperty("value", 0)
|
||||
self.imager_progressbar.setObjectName("imager_progressbar")
|
||||
self.gridLayout_12.addWidget(self.imager_progressbar, 0, 0, 1, 3)
|
||||
self.imager_write = QtWidgets.QPushButton(self.widget_7)
|
||||
self.imager_write.setObjectName("imager_write")
|
||||
self.gridLayout_12.addWidget(self.imager_write, 2, 2, 1, 1)
|
||||
self.verticalLayout_6.addLayout(self.gridLayout_12)
|
||||
self.gridLayout_9.addWidget(self.widget_7, 0, 0, 1, 2)
|
||||
self.imager_close = QtWidgets.QPushButton(self.imager)
|
||||
self.imager_close.setObjectName("imager_close")
|
||||
self.gridLayout_9.addWidget(self.imager_close, 1, 1, 1, 1)
|
||||
spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_9.addItem(spacerItem6, 1, 0, 1, 1)
|
||||
self.horizontalLayout_7.addLayout(self.gridLayout_9)
|
||||
self.tabWidget.addTab(self.imager, "")
|
||||
self.syslinux_ab = QtWidgets.QWidget()
|
||||
self.syslinux_ab.setObjectName("syslinux_ab")
|
||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.syslinux_ab)
|
||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
||||
self.gridLayout_2 = QtWidgets.QGridLayout()
|
||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
||||
self.groupBox_2 = QtWidgets.QGroupBox(self.syslinux_ab)
|
||||
self.groupBox_2.setAutoFillBackground(False)
|
||||
self.groupBox_2.setObjectName("groupBox_2")
|
||||
self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.groupBox_2)
|
||||
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
|
||||
self.gridLayout_3 = QtWidgets.QGridLayout()
|
||||
self.gridLayout_3.setObjectName("gridLayout_3")
|
||||
self.install_sys_only = QtWidgets.QRadioButton(self.groupBox_2)
|
||||
self.install_sys_only.setObjectName("install_sys_only")
|
||||
self.gridLayout_3.addWidget(self.install_sys_only, 0, 0, 1, 1)
|
||||
self.install_sys_all = QtWidgets.QRadioButton(self.groupBox_2)
|
||||
self.install_sys_all.setObjectName("install_sys_all")
|
||||
self.gridLayout_3.addWidget(self.install_sys_all, 1, 0, 1, 1)
|
||||
self.install_syslinux = QtWidgets.QPushButton(self.groupBox_2)
|
||||
self.install_syslinux.setObjectName("install_syslinux")
|
||||
self.gridLayout_3.addWidget(self.install_syslinux, 0, 2, 2, 1)
|
||||
spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_3.addItem(spacerItem7, 0, 1, 2, 1)
|
||||
self.horizontalLayout_4.addLayout(self.gridLayout_3)
|
||||
self.gridLayout_2.addWidget(self.groupBox_2, 0, 0, 1, 1)
|
||||
spacerItem8 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.gridLayout_2.addItem(spacerItem8, 3, 0, 1, 1)
|
||||
self.groupBox_3 = QtWidgets.QGroupBox(self.syslinux_ab)
|
||||
self.groupBox_3.setObjectName("groupBox_3")
|
||||
self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.groupBox_3)
|
||||
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
|
||||
self.gridLayout_4 = QtWidgets.QGridLayout()
|
||||
self.gridLayout_4.setObjectName("gridLayout_4")
|
||||
self.edit_syslinux = QtWidgets.QPushButton(self.groupBox_3)
|
||||
self.edit_syslinux.setObjectName("edit_syslinux")
|
||||
self.gridLayout_4.addWidget(self.edit_syslinux, 0, 2, 1, 1)
|
||||
self.label_2 = QtWidgets.QLabel(self.groupBox_3)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.gridLayout_4.addWidget(self.label_2, 0, 0, 1, 1)
|
||||
spacerItem9 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_4.addItem(spacerItem9, 0, 1, 1, 1)
|
||||
self.horizontalLayout_5.addLayout(self.gridLayout_4)
|
||||
self.gridLayout_2.addWidget(self.groupBox_3, 2, 0, 1, 1)
|
||||
spacerItem10 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
|
||||
self.gridLayout_2.addItem(spacerItem10, 1, 0, 1, 1)
|
||||
self.horizontalLayout_3.addLayout(self.gridLayout_2)
|
||||
self.tabWidget.addTab(self.syslinux_ab, "")
|
||||
self.tab = QtWidgets.QWidget()
|
||||
self.tab.setObjectName("tab")
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.tab)
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
self.groupBox_5 = QtWidgets.QGroupBox(self.tab)
|
||||
self.groupBox_5.setObjectName("groupBox_5")
|
||||
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.groupBox_5)
|
||||
self.verticalLayout_3.setObjectName("verticalLayout_3")
|
||||
self.gridLayout_7 = QtWidgets.QGridLayout()
|
||||
self.gridLayout_7.setObjectName("gridLayout_7")
|
||||
spacerItem11 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.gridLayout_7.addItem(spacerItem11, 3, 0, 1, 1)
|
||||
spacerItem12 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_7.addItem(spacerItem12, 1, 6, 1, 1)
|
||||
self.boot_iso_qemu = QtWidgets.QPushButton(self.groupBox_5)
|
||||
self.boot_iso_qemu.setObjectName("boot_iso_qemu")
|
||||
self.gridLayout_7.addWidget(self.boot_iso_qemu, 3, 6, 1, 1)
|
||||
self.browse_iso_qemu = QtWidgets.QPushButton(self.groupBox_5)
|
||||
self.browse_iso_qemu.setObjectName("browse_iso_qemu")
|
||||
self.gridLayout_7.addWidget(self.browse_iso_qemu, 0, 6, 1, 1)
|
||||
self.lineEdit_2 = QtWidgets.QLineEdit(self.groupBox_5)
|
||||
self.lineEdit_2.setObjectName("lineEdit_2")
|
||||
self.gridLayout_7.addWidget(self.lineEdit_2, 0, 0, 1, 6)
|
||||
spacerItem13 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.gridLayout_7.addItem(spacerItem13, 2, 6, 1, 1)
|
||||
self.label_3 = QtWidgets.QLabel(self.groupBox_5)
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.gridLayout_7.addWidget(self.label_3, 2, 0, 1, 1)
|
||||
self.ram_iso_256 = QtWidgets.QRadioButton(self.groupBox_5)
|
||||
self.ram_iso_256.setObjectName("ram_iso_256")
|
||||
self.gridLayout_7.addWidget(self.ram_iso_256, 2, 1, 1, 1)
|
||||
self.ram_iso_512 = QtWidgets.QRadioButton(self.groupBox_5)
|
||||
self.ram_iso_512.setObjectName("ram_iso_512")
|
||||
self.gridLayout_7.addWidget(self.ram_iso_512, 2, 2, 1, 1)
|
||||
self.ram_iso_768 = QtWidgets.QRadioButton(self.groupBox_5)
|
||||
self.ram_iso_768.setObjectName("ram_iso_768")
|
||||
self.gridLayout_7.addWidget(self.ram_iso_768, 2, 3, 1, 1)
|
||||
self.ram_iso_1024 = QtWidgets.QRadioButton(self.groupBox_5)
|
||||
self.ram_iso_1024.setObjectName("ram_iso_1024")
|
||||
self.gridLayout_7.addWidget(self.ram_iso_1024, 2, 4, 1, 1)
|
||||
self.ram_iso_2048 = QtWidgets.QRadioButton(self.groupBox_5)
|
||||
self.ram_iso_2048.setObjectName("ram_iso_2048")
|
||||
self.gridLayout_7.addWidget(self.ram_iso_2048, 2, 5, 1, 1)
|
||||
self.verticalLayout_3.addLayout(self.gridLayout_7)
|
||||
self.verticalLayout_2.addWidget(self.groupBox_5)
|
||||
self.gridLayout_6 = QtWidgets.QGridLayout()
|
||||
self.gridLayout_6.setObjectName("gridLayout_6")
|
||||
self.groupBox_4 = QtWidgets.QGroupBox(self.tab)
|
||||
self.groupBox_4.setStyleSheet("")
|
||||
self.groupBox_4.setObjectName("groupBox_4")
|
||||
self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.groupBox_4)
|
||||
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
||||
self.gridLayout_8 = QtWidgets.QGridLayout()
|
||||
self.gridLayout_8.setObjectName("gridLayout_8")
|
||||
self.ram_usb_2048 = QtWidgets.QRadioButton(self.groupBox_4)
|
||||
self.ram_usb_2048.setObjectName("ram_usb_2048")
|
||||
self.gridLayout_8.addWidget(self.ram_usb_2048, 0, 5, 1, 1)
|
||||
spacerItem14 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_8.addItem(spacerItem14, 0, 6, 1, 1)
|
||||
spacerItem15 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.gridLayout_8.addItem(spacerItem15, 1, 0, 1, 1)
|
||||
self.boot_usb_qemu = QtWidgets.QPushButton(self.groupBox_4)
|
||||
self.boot_usb_qemu.setObjectName("boot_usb_qemu")
|
||||
self.gridLayout_8.addWidget(self.boot_usb_qemu, 1, 6, 1, 1)
|
||||
self.ram_usb_256 = QtWidgets.QRadioButton(self.groupBox_4)
|
||||
self.ram_usb_256.setObjectName("ram_usb_256")
|
||||
self.gridLayout_8.addWidget(self.ram_usb_256, 0, 1, 1, 1)
|
||||
self.ram_usb_768 = QtWidgets.QRadioButton(self.groupBox_4)
|
||||
self.ram_usb_768.setObjectName("ram_usb_768")
|
||||
self.gridLayout_8.addWidget(self.ram_usb_768, 0, 3, 1, 1)
|
||||
self.label_4 = QtWidgets.QLabel(self.groupBox_4)
|
||||
self.label_4.setObjectName("label_4")
|
||||
self.gridLayout_8.addWidget(self.label_4, 0, 0, 1, 1)
|
||||
self.ram_usb_512 = QtWidgets.QRadioButton(self.groupBox_4)
|
||||
self.ram_usb_512.setObjectName("ram_usb_512")
|
||||
self.gridLayout_8.addWidget(self.ram_usb_512, 0, 2, 1, 1)
|
||||
self.ram_usb_1024 = QtWidgets.QRadioButton(self.groupBox_4)
|
||||
self.ram_usb_1024.setObjectName("ram_usb_1024")
|
||||
self.gridLayout_8.addWidget(self.ram_usb_1024, 0, 4, 1, 1)
|
||||
self.verticalLayout_4.addLayout(self.gridLayout_8)
|
||||
self.gridLayout_6.addWidget(self.groupBox_4, 0, 0, 1, 1)
|
||||
self.verticalLayout_2.addLayout(self.gridLayout_6)
|
||||
spacerItem16 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout_2.addItem(spacerItem16)
|
||||
self.tabWidget.addTab(self.tab, "")
|
||||
self.tab_2 = QtWidgets.QWidget()
|
||||
self.tab_2.setObjectName("tab_2")
|
||||
self.horizontalLayout_6 = QtWidgets.QHBoxLayout(self.tab_2)
|
||||
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
|
||||
self.gridLayout_10 = QtWidgets.QGridLayout()
|
||||
self.gridLayout_10.setObjectName("gridLayout_10")
|
||||
spacerItem17 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_10.addItem(spacerItem17, 0, 1, 1, 1)
|
||||
spacerItem18 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_10.addItem(spacerItem18, 1, 0, 1, 1)
|
||||
spacerItem19 = QtWidgets.QSpacerItem(20, 30, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_10.addItem(spacerItem19, 2, 1, 1, 1)
|
||||
self.label_5 = QtWidgets.QLabel(self.tab_2)
|
||||
self.label_5.setObjectName("label_5")
|
||||
self.gridLayout_10.addWidget(self.label_5, 1, 1, 1, 1)
|
||||
spacerItem20 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_10.addItem(spacerItem20, 1, 2, 1, 1)
|
||||
self.horizontalLayout_6.addLayout(self.gridLayout_10)
|
||||
self.tabWidget.addTab(self.tab_2, "")
|
||||
self.horizontalLayout.addWidget(self.tabWidget)
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
self.tabWidget.setCurrentIndex(0)
|
||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||
Dialog.setTabOrder(self.comboBox, self.detect_usb)
|
||||
Dialog.setTabOrder(self.detect_usb, self.lineEdit)
|
||||
Dialog.setTabOrder(self.lineEdit, self.slider_persistence)
|
||||
Dialog.setTabOrder(self.slider_persistence, self.uninstall)
|
||||
Dialog.setTabOrder(self.uninstall, self.listWidget)
|
||||
Dialog.setTabOrder(self.listWidget, self.close)
|
||||
Dialog.setTabOrder(self.close, self.comboBox_2)
|
||||
Dialog.setTabOrder(self.comboBox_2, self.pushButton)
|
||||
Dialog.setTabOrder(self.pushButton, self.pushbtn_imager_refreshusb)
|
||||
Dialog.setTabOrder(self.pushbtn_imager_refreshusb, self.lineEdit_3)
|
||||
Dialog.setTabOrder(self.lineEdit_3, self.imager_write)
|
||||
Dialog.setTabOrder(self.imager_write, self.imager_close)
|
||||
Dialog.setTabOrder(self.imager_close, self.install_sys_only)
|
||||
Dialog.setTabOrder(self.install_sys_only, self.install_sys_all)
|
||||
Dialog.setTabOrder(self.install_sys_all, self.install_syslinux)
|
||||
Dialog.setTabOrder(self.install_syslinux, self.edit_syslinux)
|
||||
Dialog.setTabOrder(self.edit_syslinux, self.lineEdit_2)
|
||||
Dialog.setTabOrder(self.lineEdit_2, self.browse_iso_qemu)
|
||||
Dialog.setTabOrder(self.browse_iso_qemu, self.ram_iso_256)
|
||||
Dialog.setTabOrder(self.ram_iso_256, self.ram_iso_512)
|
||||
Dialog.setTabOrder(self.ram_iso_512, self.ram_iso_768)
|
||||
Dialog.setTabOrder(self.ram_iso_768, self.ram_iso_1024)
|
||||
Dialog.setTabOrder(self.ram_iso_1024, self.ram_iso_2048)
|
||||
Dialog.setTabOrder(self.ram_iso_2048, self.boot_iso_qemu)
|
||||
Dialog.setTabOrder(self.boot_iso_qemu, self.ram_usb_256)
|
||||
Dialog.setTabOrder(self.ram_usb_256, self.ram_usb_512)
|
||||
Dialog.setTabOrder(self.ram_usb_512, self.ram_usb_768)
|
||||
Dialog.setTabOrder(self.ram_usb_768, self.ram_usb_1024)
|
||||
Dialog.setTabOrder(self.ram_usb_1024, self.ram_usb_2048)
|
||||
Dialog.setTabOrder(self.ram_usb_2048, self.boot_usb_qemu)
|
||||
Dialog.setTabOrder(self.boot_usb_qemu, self.tabWidget)
|
||||
|
||||
def retranslateUi(self, Dialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Dialog.setWindowTitle(_translate("Dialog", "multibootusb"))
|
||||
self.groupBox_6.setTitle(_translate("Dialog", "USB Details"))
|
||||
self.label_usb_dev.setText(_translate("Dialog", "Drive:"))
|
||||
self.label_usb_vendor.setText(_translate("Dialog", "Vendor:"))
|
||||
self.label_usb_model.setText(_translate("Dialog", "Model:"))
|
||||
self.label_usb_size.setText(_translate("Dialog", "Size:"))
|
||||
self.label_usb_mount.setText(_translate("Dialog", "Mount:"))
|
||||
self.close.setText(_translate("Dialog", "Quit"))
|
||||
self.browse_iso.setText(_translate("Dialog", "Browse ISO"))
|
||||
self.label_persistence.setText(_translate("Dialog", "Persistence"))
|
||||
self.detect_usb.setText(_translate("Dialog", "Detect Drives"))
|
||||
self.uninstall.setText(_translate("Dialog", "Uninstall Distro"))
|
||||
self.slider_persistence.setToolTip(_translate("Dialog", "Choose Persistence size. Not all distros supports persistence..."))
|
||||
self.checkBox_all_drives.setText(_translate("Dialog", "All Drives"))
|
||||
self.label_persistence_value.setText(_translate("Dialog", "0 MB"))
|
||||
self.create.setText(_translate("Dialog", "Install"))
|
||||
self.status.setText(_translate("Dialog", "Status: Idle"))
|
||||
self.labelstep1.setText(_translate("Dialog", "Step 1 :: Select drive"))
|
||||
self.labelstep2.setText(_translate("Dialog", "Step 2 :: Select ISO"))
|
||||
self.labelstep3.setText(_translate("Dialog", "Step 3 :: Install distro"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("Dialog", "MultiBootUSB"))
|
||||
self.groupBox_10.setTitle(_translate("Dialog", "Select image"))
|
||||
self.pushButton.setText(_translate("Dialog", "Browse image..."))
|
||||
self.imager_bootable.setText(_translate("Dialog", "Bootable ISO"))
|
||||
self.imager_iso_size.setText(_translate("Dialog", "Image Size"))
|
||||
self.groupBox_9.setTitle(_translate("Dialog", "Select USB Drive"))
|
||||
self.pushbtn_imager_refreshusb.setText(_translate("Dialog", "Refresh USB"))
|
||||
self.label_imager_disk_label.setText(_translate("Dialog", "Disk Type:"))
|
||||
self.label_imager_total_size.setText(_translate("Dialog", "Disk Size:"))
|
||||
self.label_imager_uuid.setText(_translate("Dialog", "Disk Label:"))
|
||||
self.imager_label_status.setText(_translate("Dialog", "Status: Idle"))
|
||||
self.label_10.setText(_translate("Dialog", "<html><head/><body><p><span style=\" font-weight:600; color:#ff0000;\">WARNING</span> : Any bootable USB made using<span style=\" font-weight:600;\"> ISO Imager will destroy all data </span>on the selected USB disk. </p><p>Use it at your own risk. Developers are not responsile for loss of any data.</p></body></html>"))
|
||||
self.imager_write.setText(_translate("Dialog", "Write Image"))
|
||||
self.imager_close.setText(_translate("Dialog", "Quit"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.imager), _translate("Dialog", "Write Image to USB"))
|
||||
self.groupBox_2.setTitle(_translate("Dialog", "Install Syslinux"))
|
||||
self.install_sys_only.setText(_translate("Dialog", "Install only syslinu&x (existing configurations will not be altered)."))
|
||||
self.install_sys_all.setText(_translate("Dialog", "Install syslinux and copy all re&quired files."))
|
||||
self.install_syslinux.setText(_translate("Dialog", "Install"))
|
||||
self.groupBox_3.setTitle(_translate("Dialog", "Edit syslinux.cfg"))
|
||||
self.edit_syslinux.setText(_translate("Dialog", "Edit"))
|
||||
self.label_2.setText(_translate("Dialog", "<html><head/><body><p align=\"justify\">Edit syslinux.cfg file directly using the default editor of your system. </p><p align=\"justify\">Be <span style=\" font-weight:600; color:#ff0000;\">CAREFUL</span> while editing syslinux.cfg!</p></body></html>"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.syslinux_ab), _translate("Dialog", "Install Syslinux"))
|
||||
self.groupBox_5.setTitle(_translate("Dialog", "Boot ISO :: Test bootable ISOs without reboot"))
|
||||
self.boot_iso_qemu.setText(_translate("Dialog", "Boot ISO"))
|
||||
self.browse_iso_qemu.setText(_translate("Dialog", "Browse ISO"))
|
||||
self.label_3.setText(_translate("Dialog", "Choose RAM size:"))
|
||||
self.ram_iso_256.setText(_translate("Dialog", "&256 MB"))
|
||||
self.ram_iso_512.setText(_translate("Dialog", "&512 MB"))
|
||||
self.ram_iso_768.setText(_translate("Dialog", "&768 MB"))
|
||||
self.ram_iso_1024.setText(_translate("Dialog", "&1024 MB"))
|
||||
self.ram_iso_2048.setText(_translate("Dialog", "204&8 MB"))
|
||||
self.groupBox_4.setTitle(_translate("Dialog", "Boot USB :: Test bootable USB drive without reboot"))
|
||||
self.ram_usb_2048.setText(_translate("Dialog", "20&48 MB"))
|
||||
self.boot_usb_qemu.setText(_translate("Dialog", "Boot USB"))
|
||||
self.ram_usb_256.setText(_translate("Dialog", "25&6 MB"))
|
||||
self.ram_usb_768.setText(_translate("Dialog", "7&68 MB"))
|
||||
self.label_4.setText(_translate("Dialog", "Choose RAM size:"))
|
||||
self.ram_usb_512.setText(_translate("Dialog", "5&12 MB"))
|
||||
self.ram_usb_1024.setText(_translate("Dialog", "1&024 MB"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("Dialog", "Boot ISO/USB"))
|
||||
self.label_5.setText(_translate("Dialog", "<html><head/><body><p align=\"center\">An advanced bootable usb creator with option to install/uninstall multiple distros.</p><p align=\"center\">This software is written in python and pyqt. </p><p align=\"center\">Copyright 2010-2016 Sundar</p><p align=\"center\"><span style=\" font-weight:600;\">Author(s)</span>: Sundar, Ian Bruce, Lee</p><p align=\"center\"><span style=\" font-weight:600;\">Licence</span>: GPL version 2 or later</p><p align=\"center\"><span style=\" font-weight:600;\">Home page</span>: <a href=\" http://multibootusb.org\"><span style=\" text-decoration: underline; color:#0000ff;\">http://multibootusb.org</span></a></p><p align=\"center\"><span style=\" font-weight:600;\">Help/Email</span>: feedback.multibootusb@gmail.com</p><p align=\"center\"><span style=\" font-weight:600;\">Source Code</span>: <a href=\"https://github.com/mbusb/multibootusb\"><span style=\" text-decoration: underline; color:#0000ff;\">https://github.com/mbusb/multibootusb</span></a></p><p><br/></p></body></html>"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("Dialog", "About"))
|
||||
|
@ -217,22 +217,27 @@ class Ui_MainWindow(object):
|
||||
self.gridLayout_9.setContentsMargins(5, 5, 5, 5)
|
||||
self.gridLayout_9.setObjectName("gridLayout_9")
|
||||
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_9.addItem(spacerItem, 1, 2, 1, 1)
|
||||
self.gridLayout_9.addItem(spacerItem, 3, 2, 1, 1)
|
||||
self.button_write_image_to_disk = QtWidgets.QPushButton(self.tab_imager)
|
||||
self.button_write_image_to_disk.setObjectName("button_write_image_to_disk")
|
||||
self.gridLayout_9.addWidget(self.button_write_image_to_disk, 1, 1, 1, 1)
|
||||
self.gridLayout_9.addWidget(self.button_write_image_to_disk, 3, 1, 1, 1)
|
||||
self.widget_7 = QtWidgets.QWidget(self.tab_imager)
|
||||
self.widget_7.setObjectName("widget_7")
|
||||
self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.widget_7)
|
||||
self.verticalLayout_6.setContentsMargins(5, 5, 5, 5)
|
||||
self.verticalLayout_6.setObjectName("verticalLayout_6")
|
||||
self.gridLayout_9.addWidget(self.widget_7, 1, 3, 1, 2)
|
||||
self.gridLayout_9.addWidget(self.widget_7, 3, 3, 1, 2)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_9.addItem(spacerItem1, 1, 0, 1, 1)
|
||||
self.gridLayout_9.addItem(spacerItem1, 3, 0, 1, 1)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.gridLayout_9.addItem(spacerItem2, 0, 1, 1, 1)
|
||||
self.gridLayout_9.addItem(spacerItem2, 4, 1, 1, 1)
|
||||
self.label_6 = QtWidgets.QLabel(self.tab_imager)
|
||||
self.label_6.setObjectName("label_6")
|
||||
self.gridLayout_9.addWidget(self.label_6, 1, 1, 1, 1)
|
||||
spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.gridLayout_9.addItem(spacerItem3, 2, 1, 1, 1)
|
||||
self.gridLayout_9.addItem(spacerItem3, 0, 1, 1, 1)
|
||||
spacerItem4 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.gridLayout_9.addItem(spacerItem4, 2, 1, 1, 1)
|
||||
self.horizontalLayout_7.addLayout(self.gridLayout_9)
|
||||
self.tabWidget.addTab(self.tab_imager, "")
|
||||
self.tab_syslinux = QtWidgets.QWidget()
|
||||
@ -257,12 +262,12 @@ class Ui_MainWindow(object):
|
||||
self.button_install_syslinux = QtWidgets.QPushButton(self.groupBox_2)
|
||||
self.button_install_syslinux.setObjectName("button_install_syslinux")
|
||||
self.gridLayout_3.addWidget(self.button_install_syslinux, 0, 2, 2, 1)
|
||||
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_3.addItem(spacerItem4, 0, 1, 2, 1)
|
||||
spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_3.addItem(spacerItem5, 0, 1, 2, 1)
|
||||
self.horizontalLayout_4.addLayout(self.gridLayout_3)
|
||||
self.gridLayout_2.addWidget(self.groupBox_2, 0, 0, 1, 1)
|
||||
spacerItem5 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.gridLayout_2.addItem(spacerItem5, 3, 0, 1, 1)
|
||||
spacerItem6 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.gridLayout_2.addItem(spacerItem6, 3, 0, 1, 1)
|
||||
self.groupBox_3 = QtWidgets.QGroupBox(self.tab_syslinux)
|
||||
self.groupBox_3.setObjectName("groupBox_3")
|
||||
self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.groupBox_3)
|
||||
@ -275,12 +280,12 @@ class Ui_MainWindow(object):
|
||||
self.label_2 = QtWidgets.QLabel(self.groupBox_3)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.gridLayout_4.addWidget(self.label_2, 0, 0, 1, 1)
|
||||
spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_4.addItem(spacerItem6, 0, 1, 1, 1)
|
||||
spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_4.addItem(spacerItem7, 0, 1, 1, 1)
|
||||
self.horizontalLayout_5.addLayout(self.gridLayout_4)
|
||||
self.gridLayout_2.addWidget(self.groupBox_3, 2, 0, 1, 1)
|
||||
spacerItem7 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
|
||||
self.gridLayout_2.addItem(spacerItem7, 1, 0, 1, 1)
|
||||
spacerItem8 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
|
||||
self.gridLayout_2.addItem(spacerItem8, 1, 0, 1, 1)
|
||||
self.horizontalLayout_3.addLayout(self.gridLayout_2)
|
||||
self.tabWidget.addTab(self.tab_syslinux, "")
|
||||
self.tab_testboot = QtWidgets.QWidget()
|
||||
@ -310,13 +315,13 @@ class Ui_MainWindow(object):
|
||||
self.label_4 = QtWidgets.QLabel(self.groupBox_4)
|
||||
self.label_4.setObjectName("label_4")
|
||||
self.gridLayout_8.addWidget(self.label_4, 0, 0, 1, 1)
|
||||
spacerItem8 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_8.addItem(spacerItem8, 0, 5, 1, 1)
|
||||
spacerItem9 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_8.addItem(spacerItem9, 0, 5, 1, 1)
|
||||
self.boot_usb_qemu = QtWidgets.QPushButton(self.groupBox_4)
|
||||
self.boot_usb_qemu.setObjectName("boot_usb_qemu")
|
||||
self.gridLayout_8.addWidget(self.boot_usb_qemu, 0, 4, 1, 1)
|
||||
spacerItem9 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_8.addItem(spacerItem9, 0, 3, 1, 1)
|
||||
spacerItem10 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_8.addItem(spacerItem10, 0, 3, 1, 1)
|
||||
self.label_5 = QtWidgets.QLabel(self.groupBox_4)
|
||||
self.label_5.setObjectName("label_5")
|
||||
self.gridLayout_8.addWidget(self.label_5, 0, 2, 1, 1)
|
||||
@ -334,8 +339,8 @@ class Ui_MainWindow(object):
|
||||
self.boot_iso_qemu = QtWidgets.QPushButton(self.groupBox_5)
|
||||
self.boot_iso_qemu.setObjectName("boot_iso_qemu")
|
||||
self.gridLayout_7.addWidget(self.boot_iso_qemu, 0, 4, 1, 1)
|
||||
spacerItem10 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_7.addItem(spacerItem10, 0, 3, 1, 1)
|
||||
spacerItem11 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_7.addItem(spacerItem11, 0, 3, 1, 1)
|
||||
self.combo_iso_boot_ram = QtWidgets.QComboBox(self.groupBox_5)
|
||||
self.combo_iso_boot_ram.setObjectName("combo_iso_boot_ram")
|
||||
self.combo_iso_boot_ram.addItem("")
|
||||
@ -345,16 +350,16 @@ class Ui_MainWindow(object):
|
||||
self.combo_iso_boot_ram.addItem("")
|
||||
self.combo_iso_boot_ram.addItem("")
|
||||
self.gridLayout_7.addWidget(self.combo_iso_boot_ram, 0, 1, 1, 1)
|
||||
spacerItem11 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_7.addItem(spacerItem11, 0, 5, 1, 1)
|
||||
spacerItem12 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.gridLayout_7.addItem(spacerItem12, 0, 5, 1, 1)
|
||||
self.label = QtWidgets.QLabel(self.groupBox_5)
|
||||
self.label.setObjectName("label")
|
||||
self.gridLayout_7.addWidget(self.label, 0, 2, 1, 1)
|
||||
self.verticalLayout_3.addLayout(self.gridLayout_7)
|
||||
self.gridLayout_6.addWidget(self.groupBox_5, 0, 0, 1, 1)
|
||||
self.verticalLayout_2.addLayout(self.gridLayout_6)
|
||||
spacerItem12 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout_2.addItem(spacerItem12)
|
||||
spacerItem13 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout_2.addItem(spacerItem13)
|
||||
self.tabWidget.addTab(self.tab_testboot, "")
|
||||
self.verticalLayout_7.addWidget(self.tabWidget)
|
||||
self.progressbar = QtWidgets.QProgressBar(self.centralwidget)
|
||||
@ -385,7 +390,7 @@ class Ui_MainWindow(object):
|
||||
self.menubar.addAction(self.menu_Help.menuAction())
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
self.tabWidget.setCurrentIndex(0)
|
||||
self.tabWidget.setCurrentIndex(1)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
@ -415,6 +420,7 @@ class Ui_MainWindow(object):
|
||||
self.label_persistence_value.setText(_translate("MainWindow", "0 MB"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_multibootusb), _translate("MainWindow", "MultiBootUSB"))
|
||||
self.button_write_image_to_disk.setText(_translate("MainWindow", "Write image to USB"))
|
||||
self.label_6.setText(_translate("MainWindow", "<html><head/><body><p align=\"center\"><span style=\" font-size:14pt; font-weight:600; color:#ff0000;\">WARNING!</span></p><p align=\"center\"><span style=\" color:#000000;\">This operation destroys </span><span style=\" font-weight:600; color:#000000;\">ALL</span><span style=\" color:#000000;\"> data on the selected disk.</span></p><p align=\"center\"><span style=\" color:#000000;\">Please select the destination disk carefully.</span></p></body></html>"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_imager), _translate("MainWindow", "Write Image to disk"))
|
||||
self.groupBox_2.setTitle(_translate("MainWindow", "Install Syslinux"))
|
||||
self.check_install_sys_only.setText(_translate("MainWindow", "Install only syslinu&x (existing configurations will not be altered)."))
|
||||
|
@ -63,7 +63,7 @@ def dd_linux():
|
||||
|
||||
if dd_process.poll() is not None:
|
||||
log("\nExecuting ==> sync")
|
||||
os.system("sync")
|
||||
os.sync()
|
||||
log("ISO has been written to USB disk...")
|
||||
return
|
||||
|
||||
|
@ -100,7 +100,7 @@ def install_distro():
|
||||
|
||||
if platform.system() == 'Linux':
|
||||
log('ISO extracted successfully. Sync is in progress...')
|
||||
os.system('sync')
|
||||
os.sync()
|
||||
|
||||
if config.persistence != 0:
|
||||
log('Creating persistence...')
|
||||
@ -159,7 +159,7 @@ def install_patch():
|
||||
"""
|
||||
if config.distro == 'debian':
|
||||
if platform.system() == 'Linux': # Need to syn under Linux. Otherwise, USB disk becomes random read only.
|
||||
os.system('sync')
|
||||
os.sync()
|
||||
iso_cfg_ext_dir = os.path.join(multibootusb_host_dir(), "iso_cfg_ext_dir")
|
||||
isolinux_path = os.path.join(iso_cfg_ext_dir, isolinux_bin_path(config.image_path))
|
||||
iso_linux_bin_dir = isolinux_bin_dir(config.image_path)
|
||||
|
@ -152,15 +152,15 @@ class ISO9660:
|
||||
BLOCK_SIZE = priVol.blockSize
|
||||
|
||||
# Check RRIP
|
||||
#gen.log ("loc extent(%d)"%(dirRec.locExtent))
|
||||
#gen.log("loc extent(%d)"%(dirRec.locExtent))
|
||||
self.priVol = priVol # readDirItems will use self.priVol
|
||||
root_dir = self.readDirItems(dirRec.locExtent, priVol.rootTotal)[0]
|
||||
rripNode = self.__rripLoop__(root_dir.suspBuf, root_dir.lenDr-root_dir.sysUseStar)
|
||||
if rripNode.offset != -1:
|
||||
self.rripOffset = rripNode.offset
|
||||
#gen.log ("RRIP: rrip_offset %d"%(self.rripOffset))
|
||||
#gen.log("RRIP: rrip_offset %d"%(self.rripOffset))
|
||||
else:
|
||||
gen.log ("This ISO doesn't support RRIP")
|
||||
gen.log("This ISO doesn't support RRIP")
|
||||
self.rootDir = root_dir
|
||||
|
||||
# Rrip extension
|
||||
@ -168,7 +168,7 @@ class ISO9660:
|
||||
|
||||
if self.rripOffset > 0:
|
||||
entry_buf = desc_buf[self.rripOffset:]
|
||||
gen.log ("__rripLoop__ offset:%d"%(self.rripOffset))
|
||||
gen.log("__rripLoop__ offset:%d"%(self.rripOffset))
|
||||
else:
|
||||
entry_buf = desc_buf
|
||||
|
||||
@ -181,7 +181,7 @@ class ISO9660:
|
||||
len_entry = 0
|
||||
|
||||
while True:
|
||||
#gen.log (("\n%d, %d\n")%(len_buf, head))
|
||||
#gen.log(("\n%d, %d\n")%(len_buf, head))
|
||||
head += len_entry
|
||||
if len_buf - head < 4: # less than one entry
|
||||
break
|
||||
@ -322,7 +322,7 @@ class ISO9660:
|
||||
else:
|
||||
return item
|
||||
else:
|
||||
gen.log ("can't find " + dircomps[i_dircomp])
|
||||
gen.log("can't find " + dircomps[i_dircomp])
|
||||
return None
|
||||
|
||||
def readDirrecord(self, desc_buf):
|
||||
@ -628,7 +628,7 @@ class ISO9660:
|
||||
lastfile_end = BLOCK_SIZE * dr2.locExtent + dr2.lenData
|
||||
self.isoFile.seek(0, os.SEEK_END)
|
||||
iso_end = self.isoFile.tell()
|
||||
#gen.log ("%d-->%d")%(lastfile_end, iso_end)
|
||||
#gen.log("%d-->%d")%(lastfile_end, iso_end)
|
||||
if iso_end >= lastfile_end:
|
||||
return True
|
||||
else:
|
||||
|
@ -44,35 +44,64 @@ def cli_install_distro():
|
||||
log(config.usb_disk + ' is not a valid device partition...')
|
||||
exit(1)
|
||||
#elif integrity(config.image_path) is not True:
|
||||
# log(config.image_path, ' failed to pass integrity check...')
|
||||
# log(config.image_path + ' failed to pass integrity check...')
|
||||
# exit(1)
|
||||
elif size_not_enough(config.image_path, config.usb_disk) is True:
|
||||
log(config.usb_disk + ' does not have enough space...')
|
||||
else:
|
||||
usb_details = details(config.usb_disk)
|
||||
config.usb_mount = usb_details['mount_point']
|
||||
print(config.usb_mount)
|
||||
print(config.image_path)
|
||||
config.usb_uuid = usb_details['uuid']
|
||||
config.usb_label = usb_details['label']
|
||||
prepare_mbusb_host_dir()
|
||||
extract_cfg_file(config.image_path)
|
||||
_distro = distro(iso_cfg_ext_dir(), config.image_path)
|
||||
if isinstance(config.image_path, str) is True:
|
||||
iso_install(config.image_path)
|
||||
elif isinstance(config.image_path, list) is True:
|
||||
# Transfer the list to other variable and loop through iso image
|
||||
iso_list = config.image_path
|
||||
for config.image_path in iso_list:
|
||||
iso_install(config.image_path)
|
||||
|
||||
|
||||
def iso_install(iso_image):
|
||||
"""
|
||||
Script for installing iso image to a disk. This can be called by other script for auto install of many distros
|
||||
:param iso_image: Path to ISO image
|
||||
:return:
|
||||
"""
|
||||
if size_not_enough(iso_image, config.usb_disk) is True:
|
||||
log(config.usb_disk + ' does not have enough space...')
|
||||
else:
|
||||
clean_iso_cfg_ext_dir(os.path.join(multibootusb_host_dir(), "iso_cfg_ext_dir")) # Need to be cleaned everytime
|
||||
extract_cfg_file(iso_image)
|
||||
_distro = distro(iso_cfg_ext_dir(), iso_image)
|
||||
if _distro is not None:
|
||||
log('Initiating installation process for ' + iso.iso_basename(iso_image))
|
||||
log('Detected distro type is :' + _distro)
|
||||
log('\nSelected ISO is :'+ quote(iso_name(config.image_path)))
|
||||
log('Selected target device is :'+ quote(config.usb_disk), '\n')
|
||||
log('\nSelected ISO is :' + quote(iso_name(iso_image)))
|
||||
log('Selected target device is :' + quote(config.usb_disk), '\n')
|
||||
if config.yes is not True:
|
||||
log('Please confirm the option.')
|
||||
log('Y/y/Yes/yes/YES or N/n/No/no/NO')
|
||||
if read_input_yes() is True:
|
||||
config.distro = _distro
|
||||
copy_mbusb_dir_usb(config.usb_disk)
|
||||
install_progress()
|
||||
syslinux_distro_dir(config.usb_disk, config.image_path, _distro)
|
||||
syslinux_distro_dir(config.usb_disk, iso_image, _distro)
|
||||
syslinux_default(config.usb_disk)
|
||||
update_distro_cfg_files(config.image_path, config.usb_disk, _distro)
|
||||
update_distro_cfg_files(iso_image, config.usb_disk, _distro)
|
||||
log('Finished installing ' + iso.iso_basename(iso_image))
|
||||
else:
|
||||
log('\n\nSorry ' + iso_name(config.image_path) + ' is not supported at the moment.\n'
|
||||
log('Not proceeding. User cancelled the operation.')
|
||||
else:
|
||||
log('Skipping user confirmation for ' + iso_image)
|
||||
config.distro = _distro
|
||||
copy_mbusb_dir_usb(config.usb_disk)
|
||||
install_progress()
|
||||
syslinux_distro_dir(config.usb_disk, iso_image, _distro)
|
||||
syslinux_default(config.usb_disk)
|
||||
update_distro_cfg_files(iso_image, config.usb_disk, _distro)
|
||||
log('Finished installing ' + iso.iso_basename(iso_image))
|
||||
else:
|
||||
log('\n\nSorry ' + iso_name(iso_image) + ' is not supported at the moment.\n'
|
||||
'Please report tissue at https://github.com/mbusb/multibootusb/issues\n')
|
||||
|
||||
|
||||
|
@ -331,7 +331,7 @@ Are you SURE you want to enable it?",
|
||||
self.update_list_box(config.usb_disk)
|
||||
if sys.platform.startswith("linux"):
|
||||
self.ui.statusbar.showMessage("Status: Sync is in progress...")
|
||||
os.system('sync')
|
||||
os.sync()
|
||||
self.ui.statusbar.showMessage("Status: Idle")
|
||||
self.ui_disable_persistence()
|
||||
log(iso_name(config.image_path) + ' has been successfully installed.')
|
||||
@ -346,14 +346,20 @@ Are you SURE you want to enable it?",
|
||||
"""
|
||||
|
||||
self.ui_disable_controls()
|
||||
|
||||
if platform.system() == "Linux" or platform.system() == "Windows":
|
||||
if self.ui.check_install_sys_all.isChecked() or self.ui.check_install_sys_only.isChecked():
|
||||
if platform.system() == 'Linux' and config.usb_disk[-1].isdigit() is False:
|
||||
gen.log('Selected USB is a disk. Please select a disk partition from the drop down list')
|
||||
QtWidgets.QMessageBox.information(self, 'No Partition...!',
|
||||
'USB disk selected doesn\'t contain a partition.\n'
|
||||
'Please select the partition (ending '
|
||||
'with a digit eg. /dev/sdb1)\nfrom the drop down list.')
|
||||
|
||||
if self.ui.install_sys_all.isChecked() or self.ui.install_sys_only.isChecked():
|
||||
log("Installing default syslinux on ", config.usb_disk)
|
||||
else:
|
||||
log("Installing default syslinux on " + config.usb_disk)
|
||||
ret = syslinux_default(config.usb_disk)
|
||||
if ret is True:
|
||||
if self.ui.install_sys_all.isChecked():
|
||||
if self.ui.check_install_sys_all.isChecked():
|
||||
log("Copying multibootusb directory to " + config.usb_mount)
|
||||
for dirpath, dirnames, filenames in os.walk(resource_path(os.path.join("tools", "multibootusb"))):
|
||||
for f in filenames:
|
||||
@ -428,7 +434,6 @@ Are you SURE you want to enable it?",
|
||||
QtWidgets.QMessageBox.Yes|QtWidgets.QMessageBox.No, QtWidgets.QMessageBox.No)
|
||||
|
||||
if reply == QtWidgets.QMessageBox.Yes:
|
||||
|
||||
if not os.path.exists(os.path.join(config.usb_mount, 'multibootusb', config.uninstall_distro_dir_name)):
|
||||
log("Distro install directory not found. Just updating syslinux.cfg file.")
|
||||
update_sys_cfg_file()
|
||||
@ -436,6 +441,8 @@ Are you SURE you want to enable it?",
|
||||
self.ui_enable_controls()
|
||||
else:
|
||||
self.progress_thread_uninstall.start()
|
||||
else:
|
||||
self.ui_enable_controls()
|
||||
|
||||
def uninstall_sys_file_update(self):
|
||||
"""
|
||||
@ -446,7 +453,7 @@ Are you SURE you want to enable it?",
|
||||
self.update_list_box(config.usb_mount)
|
||||
if sys.platform.startswith("linux"):
|
||||
self.ui.statusbar.showMessage("Status: Sync in progress...")
|
||||
os.system('sync')
|
||||
os.sync()
|
||||
self.ui.statusbar.showMessage("Status: Idle")
|
||||
QtWidgets.QMessageBox.information(self, 'Uninstall Complete...',
|
||||
config.uninstall_distro_dir_name + ' has been successfully removed.')
|
||||
@ -503,7 +510,6 @@ Are you SURE you want to enable it?",
|
||||
# self.ui.image_path.clear()
|
||||
if config.distro:
|
||||
log("MultiBoot Install: Distro type detected: " + config.distro)
|
||||
copy_mbusb_dir_usb(config.usb_disk)
|
||||
if not os.path.exists(os.path.join(config.usb_mount, "multibootusb", iso_basename(config.image_path))):
|
||||
config.persistence = self.ui.slider_persistence.value() * 1024 * 1024
|
||||
log("Persistence chosen is " + str(bytes2human(config.persistence)))
|
||||
@ -522,6 +528,7 @@ Are you SURE you want to enable it?",
|
||||
|
||||
if reply == QtWidgets.QMessageBox.Yes:
|
||||
self.ui.slider_persistence.setEnabled(False)
|
||||
copy_mbusb_dir_usb(config.usb_disk)
|
||||
config.process_exist = True
|
||||
self.progress_thread_install.start()
|
||||
elif reply == QtWidgets.QMessageBox.No:
|
||||
@ -584,18 +591,18 @@ Are you SURE you want to enable it?",
|
||||
self.ui_disable_controls()
|
||||
|
||||
if not config.usb_disk:
|
||||
QtWidgets.QMessageBox.information(self, 'No USB...', 'Please Insert USB disk and rerun multibootusb.')
|
||||
QtWidgets.QMessageBox.information(self, 'No USB disk selected', 'Please insert USB disk and click "Detect Drives".')
|
||||
self.ui_enable_controls()
|
||||
elif not config.image_path:
|
||||
QtWidgets.QMessageBox.information(self, 'No ISO...', 'Please select an ISO.')
|
||||
QtWidgets.QMessageBox.information(self, 'No ISO selected', 'Please select an ISO.')
|
||||
self.ui_enable_controls()
|
||||
else:
|
||||
imager = Imager()
|
||||
if platform.system() == 'Linux' and config.usb_disk[-1].isdigit() is True:
|
||||
gen.log('Selected disk is a partitions. Please select a disk from the drop down list')
|
||||
QtWidgets.QMessageBox.information(self, 'Wrong Disk...!', 'Disk selected is a partition.\nISO is to '
|
||||
'be written to whole disk for proper functioning'
|
||||
'.\n\nPlease select the disk from the drop down list.')
|
||||
if platform.system() == 'Linux' and config.usb_details['devtype'] == "partition":
|
||||
gen.log('Selected device is a partition. Please select a disk from the drop down list')
|
||||
QtWidgets.QMessageBox.information(self, 'Incompatible device', 'Selected device (%s) is a partition!\n'
|
||||
'ISO must be written to a whole disk.'
|
||||
'\n\nPlease select a disk from the drop down list.' % config.usb_disk)
|
||||
self.ui_enable_controls()
|
||||
else:
|
||||
usb_disk_size = int(imager.imager_usb_detail(config.usb_disk, partition=0).total_size)
|
||||
|
@ -8,8 +8,6 @@
|
||||
|
||||
from . import iso
|
||||
from . import config
|
||||
from . import grub
|
||||
|
||||
|
||||
def pc_tool_config(syslinux=True, grub=False):
|
||||
"""
|
||||
@ -19,8 +17,7 @@ def pc_tool_config(syslinux=True, grub=False):
|
||||
:return:
|
||||
"""
|
||||
if syslinux is True:
|
||||
return """LABEL livecd
|
||||
KERNEL /system/stage1
|
||||
return """KERNEL /system/stage1
|
||||
APPEND initrd=/system/stage2 root=/dev/ram0 rw rdinit=/linuxrc video=vesa:ywrap,mtrr vga=0x303 loglevel=0 splash boot=cdrom\n"""
|
||||
elif grub is True:
|
||||
return """menuentry """ + iso.iso_basename(config.image_path) + """ {
|
||||
|
@ -28,27 +28,6 @@ class Qemu(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
self.ui = Ui_MainWindow()
|
||||
self.ui.setupUi(self)
|
||||
|
||||
# def on_Qemu_Browse_iso_Click(self):
|
||||
# """
|
||||
# Browse and choose an ISO.
|
||||
# :return:
|
||||
# """
|
||||
# self.ui.lineEdit_2.clear()
|
||||
#
|
||||
# qemu = self.check_qemu_exist()
|
||||
#
|
||||
# if not qemu is None:
|
||||
# qemu_iso_link = QtWidgets.QFileDialog.getOpenFileName(self, 'Select an iso...', "", "ISO Files (*.iso)")[0]
|
||||
# else:
|
||||
# log("QEMU does not exist.\nPlease install qemu package to avail this feature.")
|
||||
# QtWidgets.QMessageBox.information(self, 'No QEMU...', 'Please install qemu package to avail this feature.')
|
||||
# qemu_iso_link = None
|
||||
#
|
||||
# if not qemu_iso_link is None:
|
||||
# self.ui.lineEdit_2.insert(qemu_iso_link)
|
||||
# else:
|
||||
# log ("File not selected.")
|
||||
|
||||
def on_Qemu_Boot_iso_Click(self):
|
||||
"""
|
||||
Main function to boot a selected ISO.
|
||||
|
@ -24,18 +24,18 @@ mbr_bin = resource_path(os.path.join("data", "tools", "mbr.bin"))
|
||||
|
||||
def set_boot_flag(usb_disk):
|
||||
if platform.system() == "Linux":
|
||||
log ("\nChecking boot flag on " + usb_disk[:-1], '\n')
|
||||
log("\nChecking boot flag on " + usb_disk[:-1], '\n')
|
||||
cmd_out = subprocess.check_output("parted -m -s " + usb_disk[:-1] + " print", shell=True)
|
||||
if b'boot' in cmd_out:
|
||||
log ("\nDisk " + usb_disk[:-1] + " already has boot flag.\n")
|
||||
log("\nDisk " + usb_disk[:-1] + " already has boot flag.\n")
|
||||
return True
|
||||
else:
|
||||
log ("\nExecuting ==> parted " + usb_disk[:-1] + " set 1 boot on", '\n')
|
||||
log("\nExecuting ==> parted " + usb_disk[:-1] + " set 1 boot on", '\n')
|
||||
if subprocess.call("parted " + usb_disk[:-1] + " set 1 boot on", shell=True) == 0:
|
||||
log ("\nBoot flag set to bootable " + usb_disk[:-1], '\n')
|
||||
log("\nBoot flag set to bootable " + usb_disk[:-1], '\n')
|
||||
return True
|
||||
else:
|
||||
log ("\nUnable to set boot flag on " + usb_disk[:-1], '\n')
|
||||
log("\nUnable to set boot flag on " + usb_disk[:-1], '\n')
|
||||
return False
|
||||
|
||||
|
||||
@ -50,18 +50,18 @@ def syslinux_default(usb_disk, version=4):
|
||||
usb_fs = usb_details['file_system']
|
||||
usb_mount = usb_details['mount_point']
|
||||
mbr_install_cmd = 'dd bs=440 count=1 conv=notrunc if=' + mbr_bin + ' of=' + usb_disk[:-1]
|
||||
# log (usb_fs)
|
||||
# log(usb_fs)
|
||||
if usb_fs in extlinux_fs:
|
||||
extlinu_cmd = extlinux_path + ' --install ' + os.path.join(usb_mount, 'multibootusb')
|
||||
if os.access(extlinux_path, os.X_OK) is False:
|
||||
subprocess.call('chmod +x ' + extlinux_path, shell=True)
|
||||
log ("\nExecuting ==> " + extlinu_cmd)
|
||||
log("\nExecuting ==> " + extlinu_cmd)
|
||||
config.status_text = 'Installing default extlinux version 4...'
|
||||
if subprocess.call(extlinu_cmd, shell=True) == 0:
|
||||
log ("\nDefault Extlinux install is success...\n")
|
||||
log("\nDefault Extlinux install is success...\n")
|
||||
config.status_text = 'Default extlinux install is success...'
|
||||
config.status_text = 'Installing mbr...'
|
||||
log ('\nExecuting ==> ' + mbr_install_cmd)
|
||||
log('\nExecuting ==> ' + mbr_install_cmd)
|
||||
if subprocess.call(mbr_install_cmd, shell=True) == 0:
|
||||
config.status_text = 'mbr install is successful...'
|
||||
log("\nmbr install is success...\n")
|
||||
@ -74,31 +74,31 @@ def syslinux_default(usb_disk, version=4):
|
||||
syslinux_cmd = syslinux_path + ' -i -d multibootusb ' + usb_disk
|
||||
if os.access(syslinux_path, os.X_OK) is False:
|
||||
subprocess.call('chmod +x ' + syslinux_path, shell=True)
|
||||
log ("\nExecuting ==> " + syslinux_cmd + "\n")
|
||||
log("\nExecuting ==> " + syslinux_cmd + "\n")
|
||||
config.status_text = 'Installing default syslinux version 4...'
|
||||
if subprocess.call(syslinux_cmd, shell=True) == 0:
|
||||
log ("\nDefault syslinux install is success...\n")
|
||||
log("\nDefault syslinux install is success...\n")
|
||||
config.status_text = 'Default syslinux successfully installed...'
|
||||
if subprocess.call(mbr_install_cmd, shell=True) == 0:
|
||||
config.status_text = 'mbr install is success...'
|
||||
log ("\nmbr install is success...\n")
|
||||
log("\nmbr install is success...\n")
|
||||
if set_boot_flag(usb_disk) is True:
|
||||
return True
|
||||
else:
|
||||
log ("\nFailed to install default syslinux...\n")
|
||||
log("\nFailed to install default syslinux...\n")
|
||||
config.status_text = 'Failed to install default syslinux...'
|
||||
return False
|
||||
|
||||
elif platform.system() == "Windows":
|
||||
syslinux = resource_path(os.path.join(multibootusb_host_dir(), "syslinux", "bin", "syslinux4.exe"))
|
||||
log ('Executing ==>' + syslinux + ' -maf -d multibootusb ' + usb_disk)
|
||||
log('Executing ==>' + syslinux + ' -maf -d multibootusb ' + usb_disk)
|
||||
config.status_text = 'Installing default syslinux version 4...'
|
||||
if subprocess.call(syslinux + ' -maf -d multibootusb ' + usb_disk, shell=True) == 0:
|
||||
config.status_text = 'Default syslinux successfully installed...'
|
||||
log ("\nDefault syslinux install is success...\n")
|
||||
log("\nDefault syslinux install is success...\n")
|
||||
return True
|
||||
else:
|
||||
log ("\nFailed to install default syslinux...\n")
|
||||
log("\nFailed to install default syslinux...\n")
|
||||
config.status_text = 'Failed to install default syslinux...'
|
||||
return False
|
||||
|
||||
@ -115,7 +115,7 @@ def syslinux_distro_dir(usb_disk, iso_link, distro):
|
||||
usb_mount = usb_details['mount_point']
|
||||
isolinux_bin_dir(iso_link)
|
||||
if isolinux_bin_exist(iso_link) is False:
|
||||
log ('Distro does not use isolinux for booting ISO.')
|
||||
log('Distro does not use isolinux for booting ISO.')
|
||||
else:
|
||||
# iso_cfg_ext_dir = os.path.join(multibootusb_host_dir(), "iso_cfg_ext_dir")
|
||||
_iso_cfg_ext_dir = iso_cfg_ext_dir()
|
||||
@ -126,7 +126,7 @@ def syslinux_distro_dir(usb_disk, iso_link, distro):
|
||||
log('Distro uses really old isolinux. Installing version 3 instead of 2.')
|
||||
config.syslinux_version = '3'
|
||||
|
||||
if distro == "generic" or distro == "alpine":
|
||||
if distro in ["generic", "alpine"]:
|
||||
install_dir = usb_mount
|
||||
distro_syslinux_install_dir = os.path.join(usb_mount, iso_linux_bin_dir.strip("/")).replace(usb_mount, "")
|
||||
distro_sys_install_bs = os.path.join(install_dir, iso_linux_bin_dir.strip("/"), distro + '.bs')
|
||||
@ -134,8 +134,8 @@ def syslinux_distro_dir(usb_disk, iso_link, distro):
|
||||
install_dir = os.path.join(usb_mount, "multibootusb", iso_basename(iso_link))
|
||||
distro_syslinux_install_dir = os.path.join(install_dir, iso_linux_bin_dir.strip("/")).replace(usb_mount, "")
|
||||
distro_sys_install_bs = os.path.join(install_dir, iso_linux_bin_dir.strip("/"), distro + '.bs')
|
||||
# log (distro_sys_install_bs)
|
||||
# log (distro_syslinux_install_dir)
|
||||
# log(distro_sys_install_bs)
|
||||
# log(distro_syslinux_install_dir)
|
||||
|
||||
if usb_fs in syslinux_fs:
|
||||
if config.syslinux_version == str(3):
|
||||
@ -155,22 +155,22 @@ def syslinux_distro_dir(usb_disk, iso_link, distro):
|
||||
subprocess.call('chmod +x ' + syslinux_path, shell=True) == 0
|
||||
sys_cmd = syslinux_path + option + quote(distro_syslinux_install_dir) + ' ' + usb_disk
|
||||
dd_cmd = 'dd if=' + usb_disk + ' ' + 'of=' + quote(distro_sys_install_bs) + ' count=1'
|
||||
log ("Executing ==> " + sys_cmd)
|
||||
log("Executing ==> " + sys_cmd)
|
||||
config.status_text = 'Installing distro specific syslinux...'
|
||||
if subprocess.call(sys_cmd, shell=True) == 0:
|
||||
config.status_text = 'Syslinux install on distro directory is successful...'
|
||||
log ("\nSyslinux install on distro directory is successful...\n")
|
||||
log ('Executing ==> ' + dd_cmd + '\n')
|
||||
log("\nSyslinux install on distro directory is successful...\n")
|
||||
log('Executing ==> ' + dd_cmd + '\n')
|
||||
config.status_text = 'Copying boot sector...'
|
||||
if subprocess.call(dd_cmd, shell=True) == 0:
|
||||
config.status_text = 'Bootsector copy is successful...'
|
||||
log ("\nBootsector copy is successful...\n")
|
||||
log("\nBootsector copy is successful...\n")
|
||||
else:
|
||||
config.status_text = 'Failed to copy boot sector...'
|
||||
log ("\nFailed to copy boot sector...\n")
|
||||
log("\nFailed to copy boot sector...\n")
|
||||
else:
|
||||
config.status_text = 'Failed to install syslinux on distro directory...'
|
||||
log ("\nFailed to install syslinux on distro directory...\n")
|
||||
log("\nFailed to install syslinux on distro directory...\n")
|
||||
|
||||
elif platform.system() == "Windows":
|
||||
syslinux_path = resource_path(os.path.join(multibootusb_host_dir(), "syslinux", "bin")) + \
|
||||
@ -183,10 +183,10 @@ def syslinux_distro_dir(usb_disk, iso_link, distro):
|
||||
config.status_text = 'Installing distro specific syslinux...'
|
||||
if subprocess.call(sys_cmd, shell=True) == 0:
|
||||
config.status_text = 'Syslinux install on distro directory is successful...'
|
||||
log ("\nSyslinux install was successful on distro directory...\n")
|
||||
log("\nSyslinux install was successful on distro directory...\n")
|
||||
else:
|
||||
config.status_text = 'Failed to install syslinux on distro directory...'
|
||||
log ("\nFailed to install syslinux on distro directory...\n")
|
||||
log("\nFailed to install syslinux on distro directory...\n")
|
||||
elif usb_fs in extlinux_fs:
|
||||
if platform.system() == "Linux":
|
||||
distro_syslinux_install_dir = os.path.join(install_dir, iso_linux_bin_dir.strip("/"))
|
||||
@ -195,18 +195,18 @@ def syslinux_distro_dir(usb_disk, iso_link, distro):
|
||||
dd_cmd = 'dd if=' + usb_disk + ' ' + 'of=' + quote(distro_sys_install_bs) + ' count=1'
|
||||
if os.access(syslinux_path, os.X_OK) is False:
|
||||
subprocess.call('chmod +x ' + syslinux_path, shell=True) == 0
|
||||
log ("Executing ==> " + ext_cmd)
|
||||
log("Executing ==> " + ext_cmd)
|
||||
if subprocess.call(ext_cmd, shell=True) == 0:
|
||||
log ("\nSyslinux install on distro directory is successful...\n")
|
||||
log ('Executing ==> ' + dd_cmd, '\n')
|
||||
log("\nSyslinux install on distro directory is successful...\n")
|
||||
log('Executing ==> ' + dd_cmd, '\n')
|
||||
if subprocess.call(dd_cmd, shell=True) == 0:
|
||||
log ("\nBootsector copy is successful...\n")
|
||||
log("\nBootsector copy is successful...\n")
|
||||
else:
|
||||
log ("\nFailed to install syslinux on distro directory...\n")
|
||||
log("\nFailed to install syslinux on distro directory...\n")
|
||||
|
||||
if __name__ == '__main__':
|
||||
if os.geteuid() != 0:
|
||||
log ('Please running this script with sudo/root/admin privilage.')
|
||||
log('Please running this script with sudo/root/admin privilage.')
|
||||
exit(1)
|
||||
else:
|
||||
syslinux_distro_dir('/dev/sdb1', '../../../DISTROS/2016/debian-live-8.3.0-amd64-lxde-desktop.iso', 'debian')
|
||||
|
@ -90,7 +90,7 @@ def delete_frm_file_list():
|
||||
if platform.system() == 'Linux':
|
||||
gen.log('Removed files from ' + config.uninstall_distro_dir_name)
|
||||
gen.log('Syncing....')
|
||||
os.system('sync')
|
||||
os.sync()
|
||||
|
||||
|
||||
|
||||
@ -107,7 +107,7 @@ def uninstall_distro():
|
||||
usb_mount = usb_details['mount_point']
|
||||
|
||||
if platform.system() == 'Linux':
|
||||
os.system('sync')
|
||||
os.sync()
|
||||
# remove 'immutable' from files on ext2/3/4 fs
|
||||
if usb_mount:
|
||||
subprocess.call("chattr -i -R %s/* 2>/dev/null" % usb_mount, shell=True)
|
||||
@ -115,13 +115,7 @@ def uninstall_distro():
|
||||
if os.path.exists(os.path.join(usb_mount, "multibootusb", config.uninstall_distro_dir_name, "iso_file_list.cfg")):
|
||||
with open(os.path.join(usb_mount, "multibootusb", config.uninstall_distro_dir_name, "iso_file_list.cfg"), "r") as f:
|
||||
config.iso_file_list = f.readlines()
|
||||
# gen.log iso_file_list
|
||||
|
||||
for path, subdirs, files in os.walk(os.path.join(usb_mount, "multibootusb", config.uninstall_distro_dir_name)):
|
||||
for name in files:
|
||||
if name.endswith('ldlinux.sys') or name.endswith('ldlinux.c32'):
|
||||
os.chmod(os.path.join(path, name), 0o777)
|
||||
os.unlink(os.path.join(path, name))
|
||||
if config.distro == "opensuse":
|
||||
if os.path.exists(os.path.join(usb_mount, config.uninstall_distro_dir_name + ".iso")):
|
||||
os.remove(os.path.join(usb_mount, config.uninstall_distro_dir_name + ".iso"))
|
||||
@ -139,7 +133,7 @@ def uninstall_distro():
|
||||
|
||||
if os.path.exists(os.path.join(usb_mount, "multibootusb", config.uninstall_distro_dir_name)):
|
||||
if platform.system() == 'Linux':
|
||||
os.system('sync')
|
||||
os.sync()
|
||||
shutil.rmtree(os.path.join(usb_mount, "multibootusb", config.uninstall_distro_dir_name))
|
||||
|
||||
delete_frm_file_list()
|
||||
@ -167,7 +161,7 @@ def update_sys_cfg_file():
|
||||
:return:
|
||||
"""
|
||||
if platform.system() == 'Linux':
|
||||
os.system('sync')
|
||||
os.sync()
|
||||
|
||||
sys_cfg_file = os.path.join(config.usb_mount, "multibootusb", "syslinux.cfg")
|
||||
if not os.path.exists(sys_cfg_file):
|
||||
@ -187,7 +181,7 @@ def update_grub_cfg_file():
|
||||
:return:
|
||||
"""
|
||||
if platform.system() == 'Linux':
|
||||
os.system('sync')
|
||||
os.sync()
|
||||
|
||||
grub_cfg_file = os.path.join(config.usb_mount, "multibootusb", "grub", "grub.cfg")
|
||||
if not os.path.exists(grub_cfg_file):
|
||||
@ -210,7 +204,7 @@ def uninstall_progress():
|
||||
usb_details = details(config.usb_disk)
|
||||
usb_mount = usb_details['mount_point']
|
||||
if platform.system() == 'Linux':
|
||||
os.system('sync')
|
||||
os.sync()
|
||||
|
||||
if os.path.exists(os.path.join(usb_mount, "multibootusb", config.uninstall_distro_dir_name, "multibootusb.cfg")):
|
||||
with open(os.path.join(usb_mount, "multibootusb", config.uninstall_distro_dir_name, "multibootusb.cfg"),
|
||||
|
@ -53,14 +53,14 @@ def update_distro_cfg_files(iso_link, usb_disk, distro, persistence=0):
|
||||
'ignore_bootid root=UUID=' + usb_uuid + ' live-media-path=/multibootusb/'
|
||||
+ iso_basename(iso_link) + '/casper', string)
|
||||
string = re.sub(r'ui gfxboot', '#ui gfxboot', string)
|
||||
if not persistence == 0:
|
||||
if persistence != 0:
|
||||
string = re.sub(r'boot=casper', 'boot=casper persistent persistent-path=/multibootusb/' +
|
||||
iso_basename(iso_link) + "/", string)
|
||||
|
||||
elif distro == "debian" or distro == "debian-install":
|
||||
elif distro in ["debian", "debian-install"]:
|
||||
string = re.sub(r'boot=live', 'boot=live ignore_bootid live-media-path=/multibootusb/' +
|
||||
iso_basename(iso_link) + '/live', string)
|
||||
if not persistence == 0:
|
||||
if persistence != 0:
|
||||
string = re.sub(r'boot=live', 'boot=live persistent persistent-path=/multibootusb/' +
|
||||
iso_basename(iso_link) + "/", string)
|
||||
elif distro == 'grml':
|
||||
@ -81,7 +81,7 @@ def update_distro_cfg_files(iso_link, usb_disk, distro, persistence=0):
|
||||
string = re.sub(r'initrd=', 'rd.live.dir=/multibootusb/' + iso_basename(iso_link) +
|
||||
'/LiveOS initrd=', string)
|
||||
|
||||
if not persistence == 0:
|
||||
if persistence != 0:
|
||||
if re.search(r'liveimg', string, re.I):
|
||||
string = re.sub(r'liveimg', 'liveimg overlay=UUID=' + usb_uuid, string)
|
||||
elif re.search(r'rd.live.image', string, re.I):
|
||||
@ -152,7 +152,7 @@ def update_distro_cfg_files(iso_link, usb_disk, distro, persistence=0):
|
||||
rows.append(line)
|
||||
|
||||
string = ''.join(rows)
|
||||
elif distro == "arch" or distro == "chakra":
|
||||
elif distro in ["arch", "chakra"]:
|
||||
string = re.sub(r'isolabel=\S*',
|
||||
'isodevice=/dev/disk/by-uuid/' + usb_uuid, string, flags=re.I)
|
||||
string = re.sub(r'isobasedir=',
|
||||
@ -168,7 +168,7 @@ def update_distro_cfg_files(iso_link, usb_disk, distro, persistence=0):
|
||||
string = re.sub(r'append',
|
||||
'append kdeosisobasedir=/multibootusb/' + iso_basename(iso_link) + '/kdeos/', string, flags=re.I)
|
||||
string = re.sub(r'ui gfxboot', '# ui gfxboot', string) # Bug in the isolinux package
|
||||
elif distro == "suse" or distro == "opensuse":
|
||||
elif distro in ["suse", "opensuse"]:
|
||||
if re.search(r'opensuse_12', string, re.I):
|
||||
string = re.sub(r'append',
|
||||
'append loader=syslinux isofrom_system=/dev/disk/by-uuid/' + usb_uuid + ":/" +
|
||||
@ -256,7 +256,7 @@ def update_distro_cfg_files(iso_link, usb_disk, distro, persistence=0):
|
||||
gen.log('EFI image does not exist. Copying now...')
|
||||
shutil.copy2(resource_path(os.path.join("data", "EFI", "BOOT", "bootx64.efi")),
|
||||
os.path.join(config.usb_mount, 'EFI', 'BOOT'))
|
||||
elif not gen.grub_efi_exist(efi_grub_img) is True:
|
||||
elif gen.grub_efi_exist(efi_grub_img) is False:
|
||||
gen.log('EFI image overwritten by distro install. Replacing it now...')
|
||||
shutil.copy2(resource_path(os.path.join("data", "EFI", "BOOT", "bootx64.efi")),
|
||||
os.path.join(config.usb_mount, 'EFI', 'BOOT'))
|
||||
@ -269,6 +269,8 @@ def update_mbusb_cfg_file(iso_link, usb_uuid, usb_mount, distro):
|
||||
Update main multibootusb suslinux.cfg file after distro is installed.
|
||||
:return:
|
||||
"""
|
||||
if platform.system() == 'Linux':
|
||||
os.sync()
|
||||
log('Updating multibootusb config file...')
|
||||
sys_cfg_file = os.path.join(usb_mount, "multibootusb", "syslinux.cfg")
|
||||
install_dir = os.path.join(usb_mount, "multibootusb", iso_basename(iso_link))
|
||||
@ -277,7 +279,7 @@ def update_mbusb_cfg_file(iso_link, usb_uuid, usb_mount, distro):
|
||||
if distro == "hbcd":
|
||||
if os.path.exists(os.path.join(usb_mount, "multibootusb", "menu.lst")):
|
||||
_config_file = os.path.join(usb_mount, "multibootusb", "menu.lst")
|
||||
config_file = open(_config_file,"w")
|
||||
config_file = open(_config_file, "w")
|
||||
string = re.sub(r'/HBCD', '/multibootusb/' + iso_basename(iso_link) + '/HBCD', _config_file)
|
||||
config_file.write(string)
|
||||
config_file.close()
|
||||
@ -358,7 +360,7 @@ def update_mbusb_cfg_file(iso_link, usb_uuid, usb_mount, distro):
|
||||
if isolinux_bin_exist(config.image_path) is True:
|
||||
if distro == "generic":
|
||||
distro_syslinux_install_dir = isolinux_bin_dir(iso_link)
|
||||
if not isolinux_bin_dir(iso_link) == "/":
|
||||
if isolinux_bin_dir(iso_link) != "/":
|
||||
distro_sys_install_bs = os.path.join(usb_mount, isolinux_bin_dir(iso_link)) + '/' + distro + '.bs'
|
||||
else:
|
||||
distro_sys_install_bs = '/' + distro + '.bs'
|
||||
|
@ -353,9 +353,9 @@ def win_disk_details(disk_drive):
|
||||
oFS = win32com.client.Dispatch("Scripting.FileSystemObject")
|
||||
d = oFS.GetDrive(oFS.GetDriveName(oFS.GetAbsolutePathName(selected_usb_part)))
|
||||
selected_usb_device = d.DriveLetter
|
||||
if d.DriveType is 1:
|
||||
if d.DriveType == 1:
|
||||
devtype = "Removable Disk"
|
||||
elif d.DriveType is 2:
|
||||
elif d.DriveType == 2:
|
||||
devtype = "Fixed Disk"
|
||||
label = (d.VolumeName).strip()
|
||||
if not label.strip():
|
||||
|
2
setup.py
2
setup.py
@ -46,7 +46,7 @@ setup(
|
||||
('/usr/share/multibootusb/data/tools/dd', ["data/tools/dd/dd.exe"]),
|
||||
('/usr/share/multibootusb/data/tools/dd', ["data/tools/dd/diskio.dll"]),
|
||||
('/usr/share/multibootusb/data/tools/mkfs', ["data/tools/mkfs/mke2fs.exe"]),
|
||||
('/usr/share/multibootusb/data/EFI', get_data('data/EFI')),
|
||||
('/usr/share/multibootusb/data/EFI/BOOT', get_data('data/EFI')),
|
||||
('/usr/share/multibootusb/data/multibootusb', ["data/multibootusb/chain.c32"]),
|
||||
('/usr/share/multibootusb/data/multibootusb', ["data/multibootusb/bg.png"]),
|
||||
('/usr/share/multibootusb/data/multibootusb', ["data/multibootusb/extlinux.cfg"]),
|
||||
|
Loading…
Reference in New Issue
Block a user