enable ISO convert feature with over than 4GB image

This commit is contained in:
Kevin Kim
2021-04-19 17:53:20 +09:00
parent d92694c678
commit 881b2d5acf
2 changed files with 13 additions and 4 deletions

7
debian/changelog vendored
View File

@@ -1,3 +1,10 @@
systemback (1.9.4hamonikr10) jin; urgency=low
* Update systemback/systemback.cpp
- enable ISO convert feature with over than 4GB image
-- HamoniKR <pkg@hamonikr.org> Mon, 19 Apr 2021 17:52:57 +0900
systemback (1.9.4hamonikr9) jin; urgency=low
* Update systemback/systemback.cpp

View File

@@ -5460,7 +5460,8 @@ void systemback::on_livelist_currentItemChanged(QLWI *crrnt)
if(! ui->livedelete->isEnabled()) ui->livedelete->setEnabled(true);
ullong isize(sb::fsize(sb::sdir[2] % '/' % sb::left(crrnt->text(), sb::instr(crrnt->text(), " ") - 1) % ".sblive"));
if(isize && isize < 4294967295 && isize * 2 + 104857600 < sb::dfree(sb::sdir[2]) && ! sb::exist(sb::sdir[2] % '/' % sb::left(crrnt->text(), sb::instr(crrnt->text(), " ") - 1) % ".iso"))
// if(isize && isize < 4294967295 && isize * 2 + 104857600 < sb::dfree(sb::sdir[2]) && ! sb::exist(sb::sdir[2] % '/' % sb::left(crrnt->text(), sb::instr(crrnt->text(), " ") - 1) % ".iso"))
if(isize && isize < 34359738368 && isize * 2 + 104857600 < sb::dfree(sb::sdir[2]) && ! sb::exist(sb::sdir[2] % '/' % sb::left(crrnt->text(), sb::instr(crrnt->text(), " ") - 1) % ".iso"))
{
if(! ui->liveconvert->isEnabled()) ui->liveconvert->setEnabled(true);
}
@@ -7462,7 +7463,8 @@ void systemback::on_livenew_clicked()
{
ullong isize(sb::fsize(sb::sdir[2] % '/' % ifname % ".sblive"));
if(isize < 4294967295 && isize + 52428800 < sb::dfree(sb::sdir[2]))
// if(isize < 4294967295 && isize + 52428800 < sb::dfree(sb::sdir[2]))
if(isize < 34359738368 && isize + 52428800 < sb::dfree(sb::sdir[2]))
{
pset(20, " 4/3+1"),
sb::Progress = -1;
@@ -7471,7 +7473,7 @@ void systemback::on_livenew_clicked()
// if(sb::exec("genisoimage -r -V H-LIVE -cache-inodes -J -l -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c isolinux/boot.cat -o \"" % sb::sdir[2] % "\"/" % ifname % ".iso \"" % sb::sdir[2] % "\"/.sblivesystemcreate", sb::Prgrss))
if(sb::exec("genisoimage -r -V H-LIVE -cache-inodes -J -l -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c isolinux/boot.cat -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -o \"" % sb::sdir[2] % "\"/" % ifname % ".iso \"" % sb::sdir[2] % "\"/.sblivesystemcreate", sb::Prgrss))
if(sb::exec("genisoimage -iso-level 3 -allow-limited-size -r -V H-LIVE -cache-inodes -J -l -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c isolinux/boot.cat -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -o \"" % sb::sdir[2] % "\"/" % ifname % ".iso \"" % sb::sdir[2] % "\"/.sblivesystemcreate", sb::Prgrss))
{
if(sb::isfile(sb::sdir[2] % '/' % ifname % ".iso")) sb::remove(sb::sdir[2] % '/' % ifname % ".iso");
return err(312);
@@ -7510,7 +7512,7 @@ void systemback::on_liveconvert_clicked()
sb::Progress = -1,
ui->progressbar->setValue(0);
// if(sb::exec("genisoimage -r -V H-LIVE -cache-inodes -J -l -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c isolinux/boot.cat -o \"" % path % "\".iso \"" % sb::sdir[2] % "\"/.sblivesystemconvert", sb::Prgrss)) return err(325);
if(sb::exec("genisoimage -r -V H-LIVE -cache-inodes -J -l -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c isolinux/boot.cat -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -o \"" % path % "\".iso \"" % sb::sdir[2] % "\"/.sblivesystemconvert", sb::Prgrss)) return err(325);
if(sb::exec("genisoimage -iso-level 3 -allow-limited-size -r -V H-LIVE -cache-inodes -J -l -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c isolinux/boot.cat -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -o \"" % path % "\".iso \"" % sb::sdir[2] % "\"/.sblivesystemconvert", sb::Prgrss)) return err(325);
if(sb::exec("isohybrid \"" % path % "\".iso") || ! cfmod(path % ".iso", 0666)) return err();
sb::remove(sb::sdir[2] % "/.sblivesystemconvert");
if(intrrpt) return err();