diff --git a/GBM/Forms/frmSettings.Designer.vb b/GBM/Forms/frmSettings.Designer.vb
index dfce43d..33d6678 100644
--- a/GBM/Forms/frmSettings.Designer.vb
+++ b/GBM/Forms/frmSettings.Designer.vb
@@ -44,10 +44,14 @@ Partial Class frmSettings
Me.chkRestoreOnLaunch = New System.Windows.Forms.CheckBox()
Me.chkOverwriteWarning = New System.Windows.Forms.CheckBox()
Me.chkCreateFolder = New System.Windows.Forms.CheckBox()
+ Me.grp7z = New System.Windows.Forms.GroupBox()
+ Me.lblCompression = New System.Windows.Forms.Label()
+ Me.cboCompression = New System.Windows.Forms.ComboBox()
Me.grpGeneral.SuspendLayout()
Me.grpPaths.SuspendLayout()
Me.grpBackup.SuspendLayout()
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.grp7z.SuspendLayout()
Me.SuspendLayout()
'
'chkMonitorOnStartup
@@ -140,10 +144,10 @@ Partial Class frmSettings
Me.grpPaths.Controls.Add(Me.btnBackupFolder)
Me.grpPaths.Controls.Add(Me.lblBackupFolder)
Me.grpPaths.Controls.Add(Me.txtBackupFolder)
- Me.grpPaths.Location = New System.Drawing.Point(12, 360)
+ Me.grpPaths.Location = New System.Drawing.Point(12, 410)
Me.grpPaths.Name = "grpPaths"
Me.grpPaths.Size = New System.Drawing.Size(360, 60)
- Me.grpPaths.TabIndex = 2
+ Me.grpPaths.TabIndex = 3
Me.grpPaths.TabStop = False
Me.grpPaths.Text = "Paths"
'
@@ -175,7 +179,7 @@ Partial Class frmSettings
'btnSave
'
Me.btnSave.DialogResult = System.Windows.Forms.DialogResult.OK
- Me.btnSave.Location = New System.Drawing.Point(216, 426)
+ Me.btnSave.Location = New System.Drawing.Point(216, 476)
Me.btnSave.Name = "btnSave"
Me.btnSave.Size = New System.Drawing.Size(75, 23)
Me.btnSave.TabIndex = 3
@@ -185,7 +189,7 @@ Partial Class frmSettings
'btnCancel
'
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
- Me.btnCancel.Location = New System.Drawing.Point(297, 426)
+ Me.btnCancel.Location = New System.Drawing.Point(297, 476)
Me.btnCancel.Name = "btnCancel"
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
Me.btnCancel.TabIndex = 4
@@ -204,7 +208,7 @@ Partial Class frmSettings
Me.grpBackup.Controls.Add(Me.chkBackupConfirm)
Me.grpBackup.Location = New System.Drawing.Point(12, 183)
Me.grpBackup.Name = "grpBackup"
- Me.grpBackup.Size = New System.Drawing.Size(360, 171)
+ Me.grpBackup.Size = New System.Drawing.Size(360, 168)
Me.grpBackup.TabIndex = 1
Me.grpBackup.TabStop = False
Me.grpBackup.Text = "Backup and Restore"
@@ -276,11 +280,41 @@ Partial Class frmSettings
Me.chkCreateFolder.Text = "Create a sub-folder for each game"
Me.chkCreateFolder.UseVisualStyleBackColor = True
'
+ 'grp7z
+ '
+ Me.grp7z.Controls.Add(Me.cboCompression)
+ Me.grp7z.Controls.Add(Me.lblCompression)
+ Me.grp7z.Location = New System.Drawing.Point(12, 357)
+ Me.grp7z.Name = "grp7z"
+ Me.grp7z.Size = New System.Drawing.Size(360, 47)
+ Me.grp7z.TabIndex = 2
+ Me.grp7z.TabStop = False
+ Me.grp7z.Text = "7z Options"
+ '
+ 'lblCompression
+ '
+ Me.lblCompression.AutoSize = True
+ Me.lblCompression.Location = New System.Drawing.Point(6, 20)
+ Me.lblCompression.Name = "lblCompression"
+ Me.lblCompression.Size = New System.Drawing.Size(70, 13)
+ Me.lblCompression.TabIndex = 0
+ Me.lblCompression.Text = "Compression:"
+ '
+ 'cboCompression
+ '
+ Me.cboCompression.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
+ Me.cboCompression.FormattingEnabled = True
+ Me.cboCompression.Location = New System.Drawing.Point(88, 17)
+ Me.cboCompression.Name = "cboCompression"
+ Me.cboCompression.Size = New System.Drawing.Size(224, 21)
+ Me.cboCompression.TabIndex = 1
+ '
'frmSettings
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(384, 461)
+ Me.ClientSize = New System.Drawing.Size(384, 511)
+ Me.Controls.Add(Me.grp7z)
Me.Controls.Add(Me.grpBackup)
Me.Controls.Add(Me.btnCancel)
Me.Controls.Add(Me.btnSave)
@@ -292,7 +326,7 @@ Partial Class frmSettings
Me.Name = "frmSettings"
Me.ShowIcon = False
Me.ShowInTaskbar = False
- Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
+ Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Settings"
Me.grpGeneral.ResumeLayout(False)
Me.grpGeneral.PerformLayout()
@@ -301,6 +335,8 @@ Partial Class frmSettings
Me.grpBackup.ResumeLayout(False)
Me.grpBackup.PerformLayout()
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.grp7z.ResumeLayout(False)
+ Me.grp7z.PerformLayout()
Me.ResumeLayout(False)
End Sub
@@ -326,4 +362,7 @@ Partial Class frmSettings
Friend WithEvents lblMinutes As Label
Friend WithEvents nudSupressBackupThreshold As NumericUpDown
Friend WithEvents chkSupressBackup As CheckBox
+ Friend WithEvents grp7z As GroupBox
+ Friend WithEvents cboCompression As ComboBox
+ Friend WithEvents lblCompression As Label
End Class
diff --git a/GBM/Forms/frmSettings.vb b/GBM/Forms/frmSettings.vb
index 520a366..a36f79a 100644
--- a/GBM/Forms/frmSettings.vb
+++ b/GBM/Forms/frmSettings.vb
@@ -58,6 +58,7 @@ Public Class frmSettings
oSettings.TimeTracking = chkTimeTracking.Checked
oSettings.SupressBackup = chkSupressBackup.Checked
oSettings.SupressBackupThreshold = nudSupressBackupThreshold.Value
+ oSettings.CompressionLevel = cboCompression.SelectedValue
'We need to clear all checksums its turned off
If chkCheckSum.Checked = False And oSettings.CheckSum = True Then
@@ -111,24 +112,24 @@ Public Class frmSettings
chkSupressBackup.Checked = oSettings.SupressBackup
nudSupressBackupThreshold.Value = oSettings.SupressBackupThreshold
nudSupressBackupThreshold.Enabled = chkSupressBackup.Checked
+ cboCompression.SelectedValue = oSettings.CompressionLevel
End Sub
- Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles btnSave.Click
- If SaveSettings() Then
- bShutdown = True
- Me.Close()
- End If
- End Sub
+ Private Sub LoadCombos()
+ Dim oComboItems As New List(Of KeyValuePair(Of Integer, String))
- Private Sub btnCancel_Click(sender As System.Object, e As System.EventArgs) Handles btnCancel.Click
- bShutdown = True
- Me.Close()
- End Sub
+ 'cboCompression
+ cboCompression.ValueMember = "Key"
+ cboCompression.DisplayMember = "Value"
- Private Sub frmSettings_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
- If bShutdown = False Then
- e.Cancel = True
- End If
+ oComboItems.Add(New KeyValuePair(Of Integer, String)(0, frmSettings_cboCompression_None))
+ oComboItems.Add(New KeyValuePair(Of Integer, String)(1, frmSettings_cboCompression_Fastest))
+ oComboItems.Add(New KeyValuePair(Of Integer, String)(3, frmSettings_cboCompression_Fast))
+ oComboItems.Add(New KeyValuePair(Of Integer, String)(5, frmSettings_cboCompression_Normal))
+ oComboItems.Add(New KeyValuePair(Of Integer, String)(7, frmSettings_cboCompression_Maximum))
+ oComboItems.Add(New KeyValuePair(Of Integer, String)(9, frmSettings_cboCompression_Ultra))
+
+ cboCompression.DataSource = oComboItems
End Sub
Private Sub SetForm()
@@ -156,10 +157,31 @@ Public Class frmSettings
chkShowDetectionTips.Text = frmSettings_chkShowDetectionTips
chkStartToTray.Text = frmSettings_chkStartToTray
chkMonitorOnStartup.Text = frmSettings_chkMonitorOnStartup
+ grp7z.Text = frmSettings_grp7z
+ lblCompression.Text = frmSettings_lblCompression
+ End Sub
+
+ Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles btnSave.Click
+ If SaveSettings() Then
+ bShutdown = True
+ Me.Close()
+ End If
+ End Sub
+
+ Private Sub btnCancel_Click(sender As System.Object, e As System.EventArgs) Handles btnCancel.Click
+ bShutdown = True
+ Me.Close()
+ End Sub
+
+ Private Sub frmSettings_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
+ If bShutdown = False Then
+ e.Cancel = True
+ End If
End Sub
Private Sub frmSettings_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
SetForm()
+ LoadCombos()
LoadSettings()
End Sub
diff --git a/GBM/Managers/mgrBackup.vb b/GBM/Managers/mgrBackup.vb
index 9f36ec8..2a2c590 100644
--- a/GBM/Managers/mgrBackup.vb
+++ b/GBM/Managers/mgrBackup.vb
@@ -168,7 +168,7 @@ Public Class mgrBackup
End If
If Directory.Exists(sSavePath) Then
- prs7z.StartInfo.Arguments = "a -t7z " & "-i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
+ prs7z.StartInfo.Arguments = "a -bb1 -bt -t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
prs7z.StartInfo.UseShellExecute = False
prs7z.StartInfo.RedirectStandardOutput = True
diff --git a/GBM/Managers/mgrSQLite.vb b/GBM/Managers/mgrSQLite.vb
index 99448b9..decdbfc 100644
--- a/GBM/Managers/mgrSQLite.vb
+++ b/GBM/Managers/mgrSQLite.vb
@@ -73,7 +73,7 @@ Public Class mgrSQLite
sSql = "CREATE TABLE settings (SettingsID INTEGER NOT NULL PRIMARY KEY, MonitorOnStartup BOOLEAN NOT NULL, StartToTray BOOLEAN NOT NULL, ShowDetectionToolTips BOOLEAN NOT NULL, " &
"DisableConfirmation BOOLEAN NOT NULL, CreateSubFolder BOOLEAN NOT NULL, ShowOverwriteWarning BOOLEAN NOT NULL, RestoreOnLaunch BOOLEAN NOT NULL, " &
"BackupFolder TEXT NOT NULL, Sync BOOLEAN NOT NULL, CheckSum BOOLEAN NOT NULL, StartWithWindows BOOLEAN NOT NULL, TimeTracking BOOLEAN NOT NULL, " &
- "SupressBackup BOOLEAN NOT NULL, SupressBackupThreshold INTEGER NOT NULL);"
+ "SupressBackup BOOLEAN NOT NULL, SupressBackupThreshold INTEGER NOT NULL, CompressionLevel INTEGER NOT NULL);"
'Add Tables (Monitor List)
sSql &= "CREATE TABLE monitorlist (MonitorID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
@@ -506,6 +506,29 @@ Public Class mgrSQLite
End If
End If
+ '0.96 Upgrade
+ If GetDatabaseVersion() < 96 Then
+ If eDatabase = Database.Local Then
+ 'Backup DB before starting
+ BackupDB("v95")
+
+ 'Add new setting
+ sSQL = "ALTER TABLE settings ADD COLUMN CompressionLevel INTEGER NOT NULL DEFAULT 5;"
+
+ sSQL &= "PRAGMA user_version=96"
+
+ RunParamQuery(sSQL, New Hashtable)
+ End If
+ If eDatabase = Database.Remote Then
+ 'Backup DB before starting
+ BackupDB("v95")
+
+ sSQL = "PRAGMA user_version=96"
+
+ RunParamQuery(sSQL, New Hashtable)
+ End If
+ End If
+
End Sub
Public Function GetDBSize() As Long
diff --git a/GBM/Managers/mgrSettings.vb b/GBM/Managers/mgrSettings.vb
index 2c2ab32..123ac15 100644
--- a/GBM/Managers/mgrSettings.vb
+++ b/GBM/Managers/mgrSettings.vb
@@ -14,6 +14,7 @@ Public Class mgrSettings
Private bTimeTracking As Boolean = True
Private bSupressBackup As Boolean = False
Private iSupressBackupThreshold As Integer = 10
+ Private iCompressionLevel As Integer = 5
Private sBackupFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).TrimEnd(New Char() {"\", "/"})
Property StartWithWindows As Boolean
@@ -133,6 +134,15 @@ Public Class mgrSettings
End Set
End Property
+ Property CompressionLevel As Integer
+ Get
+ Return iCompressionLevel
+ End Get
+ Set(value As Integer)
+ iCompressionLevel = value
+ End Set
+ End Property
+
Property BackupFolder As String
Get
Return sBackupFolder
@@ -152,7 +162,7 @@ Public Class mgrSettings
sSQL = "INSERT INTO settings VALUES (1, @MonitorOnStartup, @StartToTray, @ShowDetectionToolTips, @DisableConfirmation, "
sSQL &= "@CreateSubFolder, @ShowOverwriteWarning, @RestoreOnLaunch, @BackupFolder, @Sync, @CheckSum, @StartWithWindows, "
- sSQL &= "@TimeTracking, @SupressBackup, @SupressBackupThreshold)"
+ sSQL &= "@TimeTracking, @SupressBackup, @SupressBackupThreshold, @CompressionLevel)"
hshParams.Add("MonitorOnStartup", MonitorOnStartup)
hshParams.Add("StartToTray", StartToTray)
@@ -168,6 +178,7 @@ Public Class mgrSettings
hshParams.Add("TimeTracking", TimeTracking)
hshParams.Add("SupressBackup", SupressBackup)
hshParams.Add("SupressBackupThreshold", SupressBackupThreshold)
+ hshParams.Add("CompressionLevel", CompressionLevel)
oDatabase.RunParamQuery(sSQL, hshParams)
End Sub
@@ -197,6 +208,7 @@ Public Class mgrSettings
TimeTracking = CBool(dr("TimeTracking"))
SupressBackup = CBool(dr("SupressBackup"))
SupressBackupThreshold = CInt(dr("SupressBackupThreshold"))
+ CompressionLevel = CInt(dr("CompressionLevel"))
Next
oDatabase.Disconnect()
diff --git a/GBM/My Project/Resources.Designer.vb b/GBM/My Project/Resources.Designer.vb
index c2a6b92..cc7904b 100644
--- a/GBM/My Project/Resources.Designer.vb
+++ b/GBM/My Project/Resources.Designer.vb
@@ -2913,6 +2913,60 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Fast.
+ '''
+ Friend ReadOnly Property frmSettings_cboCompression_Fast() As String
+ Get
+ Return ResourceManager.GetString("frmSettings_cboCompression_Fast", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to Fastest.
+ '''
+ Friend ReadOnly Property frmSettings_cboCompression_Fastest() As String
+ Get
+ Return ResourceManager.GetString("frmSettings_cboCompression_Fastest", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to Maximum.
+ '''
+ Friend ReadOnly Property frmSettings_cboCompression_Maximum() As String
+ Get
+ Return ResourceManager.GetString("frmSettings_cboCompression_Maximum", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to None.
+ '''
+ Friend ReadOnly Property frmSettings_cboCompression_None() As String
+ Get
+ Return ResourceManager.GetString("frmSettings_cboCompression_None", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to Normal.
+ '''
+ Friend ReadOnly Property frmSettings_cboCompression_Normal() As String
+ Get
+ Return ResourceManager.GetString("frmSettings_cboCompression_Normal", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to Ultra.
+ '''
+ Friend ReadOnly Property frmSettings_cboCompression_Ultra() As String
+ Get
+ Return ResourceManager.GetString("frmSettings_cboCompression_Ultra", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Disable backup confirmation.
'''
@@ -3039,6 +3093,15 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to 7z Options.
+ '''
+ Friend ReadOnly Property frmSettings_grp7z() As String
+ Get
+ Return ResourceManager.GetString("frmSettings_grp7z", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Backup and Restore.
'''
@@ -3067,7 +3130,7 @@ Namespace My.Resources
End Property
'''
- ''' Looks up a localized string similar to Backup Folder.
+ ''' Looks up a localized string similar to Backup Folder:.
'''
Friend ReadOnly Property frmSettings_lblBackupFolder() As String
Get
@@ -3075,6 +3138,15 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Compression:.
+ '''
+ Friend ReadOnly Property frmSettings_lblCompression() As String
+ Get
+ Return ResourceManager.GetString("frmSettings_lblCompression", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to minutes.
'''
diff --git a/GBM/My Project/Resources.resx b/GBM/My Project/Resources.resx
index 5ce2b59..9b7e707 100644
--- a/GBM/My Project/Resources.resx
+++ b/GBM/My Project/Resources.resx
@@ -1133,7 +1133,7 @@
Paths
- Backup Folder
+ Backup Folder:
minutes
@@ -1513,4 +1513,28 @@
An error has occured writing the text file.[BR][BR][PARAM]
+
+ Fast
+
+
+ Fastest
+
+
+ Maximum
+
+
+ None
+
+
+ Normal
+
+
+ Ultra
+
+
+ 7z Options
+
+
+ Compression:
+
\ No newline at end of file
diff --git a/GBM/Utilities/x64/7za.dll b/GBM/Utilities/x64/7za.dll
index f912e7d..444c4ff 100644
Binary files a/GBM/Utilities/x64/7za.dll and b/GBM/Utilities/x64/7za.dll differ
diff --git a/GBM/Utilities/x64/7za.exe b/GBM/Utilities/x64/7za.exe
index f887f0a..881b7dd 100644
Binary files a/GBM/Utilities/x64/7za.exe and b/GBM/Utilities/x64/7za.exe differ
diff --git a/GBM/Utilities/x64/7zxa.dll b/GBM/Utilities/x64/7zxa.dll
index cbaeaf3..f72ab63 100644
Binary files a/GBM/Utilities/x64/7zxa.dll and b/GBM/Utilities/x64/7zxa.dll differ
diff --git a/GBM/Utilities/x86/7za.dll b/GBM/Utilities/x86/7za.dll
index fc0782e..46f6e8e 100644
Binary files a/GBM/Utilities/x86/7za.dll and b/GBM/Utilities/x86/7za.dll differ
diff --git a/GBM/Utilities/x86/7za.exe b/GBM/Utilities/x86/7za.exe
index c8ec3ab..710bda2 100644
Binary files a/GBM/Utilities/x86/7za.exe and b/GBM/Utilities/x86/7za.exe differ
diff --git a/GBM/Utilities/x86/7zxa.dll b/GBM/Utilities/x86/7zxa.dll
index dd6e133..afa96d4 100644
Binary files a/GBM/Utilities/x86/7zxa.dll and b/GBM/Utilities/x86/7zxa.dll differ