Skip to content

Commit

Permalink
Added setup.exe support and qemu device boot failure fix for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
mbusb committed Apr 23, 2017
1 parent f832975 commit e73e882
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Version - 8.6.0
---------------

==> A very big thanks to Alin Trăistaru. All credits goes to him for redesigning of GUI and code cleanups <==
==> A very big thanks to "Alin Trăistaru (alindt)". All credits goes to him for redesigning of GUI and code cleanups <==
-------------------------------------------------------------------------------------------------------------

* Fresh and friendly user interface (GUI)
Expand Down
Binary file removed EFI/BOOT/bootx64.efi
Binary file not shown.
1 change: 0 additions & 1 deletion EFI/BOOT/multibootusb_grub2.txt

This file was deleted.

34 changes: 33 additions & 1 deletion build_pkg
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import platform
if platform.system() == "Windows":
pyinstaller_path = 'D:\multibootusb\pyinstaller\pyinstaller.py'
release_dir = 'D:\\multibootusb\\release'
nsis = '\"C:\\Program Files (x86)\\NSIS\\makensis.exe\"'
else:
from os.path import expanduser
home = expanduser("~")
Expand Down Expand Up @@ -132,6 +133,36 @@ class pkg():
print("\n\n\nWindows binary has been created and can be found here::")
print((os.path.join("dist", "multibootusb-" + self.version + ".exe\n\n\n")))
result = True
elif self.pkg_name == "setup_exe":
import re
if not platform.system() == "Windows":
print("You can generate windows setup file from windows host only.")
else:
# subprocess.call('python ' + pyinstaller_path + ' --upx-dir C:\\upx multibootusb.spec', shell=True) == 0 and \
# os.path.exists(os.path.join("dist", 'multibootusb-' + self.version + ".exe")):
# pyinstaller.exe --onefile --windowed --icon=app.ico app.py
if subprocess.call('python ' + pyinstaller_path + ' --onedir --uac-admin --windowed --icon=' +
os.path.join("data", "tools", "multibootusb.ico") + ' multibootusb', shell=True) == 0:
print('Successfully created one dir distribution package...\nCopying data directory...')
shutil.copytree('data', os.path.join('dist', 'multibootusb', 'data'))
if os.path.exists(os.path.join('dist', 'multibootusb', 'data')):
print('Data directory successfully copied..')

with open("multibootusb.nsi", "rt") as fin:
with open("multibootusb_new.nsi", "wt") as fout:
for line in fin:
if line.startswith('Name'):
fout.write('Name \"multibootusb ' + self.version + '\"')
elif line.startswith('OutFile'):
fout.write('OutFile \"multibootusb-' + self.version + '-setup.exe\"')
else:
fout.write(line)
if subprocess.call(nsis + ' multibootusb_new.nsi', shell=True) == 0:
os.remove('multibootusb_new.nsi')
shutil.copy2('multibootusb-' + self.version + '-setup.exe',
os.path.join(self.release_upload_dir, "Windows"))
print('Successfully created the setup.exe package...')

elif self.pkg_name == 'install':
if subprocess.call("python3", "install.py", shell=True) == 0:
print("Installation is successful.")
Expand Down Expand Up @@ -233,6 +264,7 @@ def usage():
print ("Invalid option(s)\n"
"Possible options are ::\n"
"\033[94mexe\033[0m <-- For making Windows/ Linux standalone executable using pyinstaller\n"
"\033[94msetup_exe\033[0m<-- For making Windows setup file using pyinstaller\n"
"\033[94mdeb\033[0m <-- For making creating package for debian/ubuntu\n"
"\033[94mrpm\033[0m <-- For creating package for fedora/redhat/centos\n"
"\033[94msuse\033[0m <-- For creating package for OpenSuse\n"
Expand Down Expand Up @@ -260,7 +292,7 @@ if __name__ == '__main__':
else:
argv = argv[1]
if argv == "all":
all_arug = ["clean", "exe", "deb", "rpm", "suse", "mageia", "src"]
all_arug = ["clean", "exe", "deb", "rpm", "suse", "mageia", "src", "setup_exe"]
for package_name in all_arug:
print(("Creating package for argument " + package_name))
build = pkg(package_name)
Expand Down
2 changes: 2 additions & 0 deletions multibootusb.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
;NSIS script for creating multibootusb setup file

Name "multibootusb 8.5.0"

OutFile "multibootusb-8.5.0-setup.exe"


SetCompressor lzma

;--------------------------------
Expand Down
5 changes: 4 additions & 1 deletion scripts/qemu.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ def on_Qemu_Boot_usb_Click(self):
QtWidgets.QMessageBox.information(self, 'No disk...', 'No USB disk selected.\n\nPlease choose a disk first.')
else:
qemu = self.check_qemu_exist()
qemu_usb_disk = config.usb_disk
if platform.system() == 'Linux' and config.usb_disk[-1].isdigit() is True:
qemu_usb_disk = config.usb_disk[:-1]
else:
qemu_usb_disk = config.usb_disk

if qemu is None:
log("ERROR: USB Boot: qemu not found!")
Expand Down

0 comments on commit e73e882

Please sign in to comment.