Skip to content

Commit

Permalink
Fixed "file not found" error when generating ISO, and updated ISOLINU…
Browse files Browse the repository at this point in the history
…X from 3.71 to 6.03
  • Loading branch information
zdimension committed Dec 10, 2015
1 parent c1a85ec commit 133f72d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
23 changes: 21 additions & 2 deletions SharpBoot/GenIsoFrm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public void Generate()
ChangeProgressBar(45, 100);
if (!_usb)
{
ext.ExtractionFinished += delegate { ChangeProgress(50, 100, Strings.Extracting.FormatEx("Mkisofs")); };
ChangeProgress(50, 100, Strings.Extracting.FormatEx("Mkisofs"));

ext.Extract(Path.Combine(archs, "mkisofs.7z"), Path.Combine(f, "mkisofs"));
}
Expand Down Expand Up @@ -370,7 +370,26 @@ public void Generate()
p.Exited += delegate { GenF(f); };

Thread.Sleep(500);
p.Start();
while(true)
{
if (!File.Exists(mkisofsexe))
{
if (!Directory.Exists(archs)) Directory.CreateDirectory(archs);
File.WriteAllBytes(Path.Combine(archs, "mkisofs.7z"), Resources.mkisofs);
ext.Extract(Path.Combine(archs, "mkisofs.7z"), Path.Combine(f, "mkisofs"));
}
else break;
Thread.Sleep(500);

}
try
{
p.Start();
}
catch (FileNotFoundException e)
{

}
/*p.BeginOutputReadLine();
using (var reader = p.StandardOutput)
Expand Down
11 changes: 6 additions & 5 deletions SharpBoot/ISOInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,16 @@ public static void UpdateISOs()
var appsxml = wc.DownloadString("https://www.zdimension.tk/sharpboot/apps.php?s");
appsxml = wc.DownloadString("https://www.zdimension.tk/sharpboot/apps.php?s");

if (appsxml.Contains("</apps>"))
while (!appsxml.Contains("</apps>"))
{
appsxml = wc.DownloadString("https://www.zdimension.tk/sharpboot/apps.php?s");
}
Settings.Default.AppsXml = appsxml;

Settings.Default.AppsXml = appsxml;
Settings.Default.LastAppsUpdate = DateTime.Now;

Settings.Default.LastAppsUpdate = DateTime.Now;
Settings.Default.Save();

Settings.Default.Save();
}
}
catch
{
Expand Down
2 changes: 1 addition & 1 deletion SharpBoot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private static void Application_ThreadException(object sender, ThreadExceptionEv
{
if (e.Exception is FileNotFoundException)
MessageBox.Show(((FileNotFoundException)e.Exception).FileName);
MessageBox.Show(e.Exception.Message, "Thread exception");
MessageBox.Show(e.Exception.Message + "\n" + e.Exception.StackTrace, "Thread exception");
}

public static string GetVersion()
Expand Down
Binary file modified SharpBoot/Resources/syslinux.7z
Binary file not shown.

0 comments on commit 133f72d

Please sign in to comment.