Skip to content

Commit

Permalink
- Added ability to create a zip file after conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Speedvicio committed Mar 25, 2020
1 parent 26515d1 commit edd3a4a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Laziass/LazyAss.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Laziass/LazyAss.resx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@
<metadata name="BackgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>180, 17</value>
</metadata>
<data name="RadioButton5.ToolTip" xml:space="preserve">
<value>Bchunk Extraction (Alternative)
PROS - Really good speed extraction
Expand Down
10 changes: 10 additions & 0 deletions Laziass/LazyAss.vb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Imports System.ComponentModel
Imports System.IO
Imports System.IO.Compression
Imports BizHawk.Emulation.DiscSystem
Imports DiscTools

Expand Down Expand Up @@ -1315,7 +1316,10 @@ Public Class LazyAss
"Time Elapsed: " & duration.Duration.ToString)
If LogSave.Checked = True Then SaveLog()

If CreateZip.Checked = True Then MakeZip()

MsgBox("Conversion Done!", vbInformation + MsgBoxStyle.OkOnly)

Try
If DI.GetFiles.GetLength(0) > 4 Then
If File.Exists(OutputPath.Text & RippedName.Text & "\" & RippedName.Text & "_backup.cue") And
Expand All @@ -1342,6 +1346,12 @@ Public Class LazyAss

End Sub

Private Sub MakeZip()
Dim startPath As String = Path.Combine(OutputPath.Text, RippedName.Text)
Dim zipPath As String = Path.Combine(OutputPath.Text, RippedName.Text & ".zip")
ZipFile.CreateFromDirectory(startPath, zipPath, CompressionLevel.Optimal, False)
End Sub

Private Sub SaveLog()
If File.Exists(Application.StartupPath & "\LogOut.txt") Then File.Delete(Application.StartupPath & "\LogOut.txt")
LogOut.SaveFile(Application.StartupPath & "\LogOut.txt",
Expand Down
1 change: 1 addition & 0 deletions Laziass/LazyAss.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
Expand Down

0 comments on commit edd3a4a

Please sign in to comment.