Merge branch 'master' of https://github.com/MikeMaximus/gbm
This commit is contained in:
@@ -1558,6 +1558,7 @@ Public Class frmGameManager
|
||||
Private Sub TriggerSelectedImportBackup()
|
||||
Dim sDefaultFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||
Dim oBackup As New mgrBackup
|
||||
Dim sConfirm As String = frmGameManager_ConfirmBackupImport
|
||||
Dim sFile As String
|
||||
Dim sFiles As String()
|
||||
|
||||
@@ -1580,7 +1581,16 @@ Public Class frmGameManager
|
||||
End If
|
||||
Next
|
||||
|
||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmBackupImport, oCurrentGame.CroppedName, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If sFiles.Length > 1 And Not CurrentGame.AppendTimeStamp Then
|
||||
mgrCommon.ShowMessage(frmGameManager_WarningImportBackupSaveMulti, MsgBoxStyle.Exclamation)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If sFiles.Length = 1 And Not CurrentGame.AppendTimeStamp And mgrManifest.DoManifestCheck(CurrentGame.ID, mgrSQLite.Database.Remote) Then
|
||||
sConfirm = frmGameManager_ConfirmBackupImportOverwriteSingle
|
||||
End If
|
||||
|
||||
If mgrCommon.ShowMessage(sConfirm, oCurrentGame.CroppedName, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
Me.TriggerImportBackup = True
|
||||
Me.Close()
|
||||
End If
|
||||
@@ -1944,11 +1954,7 @@ Public Class frmGameManager
|
||||
End Sub
|
||||
|
||||
Private Sub btnImportBackup_Click(sender As Object, e As EventArgs) Handles btnImportBackup.Click
|
||||
If CurrentGame.AppendTimeStamp Then
|
||||
TriggerSelectedImportBackup()
|
||||
Else
|
||||
mgrCommon.ShowMessage(frmGameManager_WarningImportBackupSaveMulti, MsgBoxStyle.Information)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub chkFolderSave_CheckedChanged(sender As Object, e As EventArgs) Handles chkFolderSave.CheckedChanged
|
||||
|
||||
Generated
+2
-2
@@ -517,9 +517,9 @@ Partial Class frmSettings
|
||||
Me.chkShowResolvedPaths.AutoSize = True
|
||||
Me.chkShowResolvedPaths.Location = New System.Drawing.Point(6, 65)
|
||||
Me.chkShowResolvedPaths.Name = "chkShowResolvedPaths"
|
||||
Me.chkShowResolvedPaths.Size = New System.Drawing.Size(154, 17)
|
||||
Me.chkShowResolvedPaths.Size = New System.Drawing.Size(238, 17)
|
||||
Me.chkShowResolvedPaths.TabIndex = 2
|
||||
Me.chkShowResolvedPaths.Text = "Show resolved save paths "
|
||||
Me.chkShowResolvedPaths.Text = "Show resolved save paths in Game Manager"
|
||||
Me.chkShowResolvedPaths.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkSessionTracking
|
||||
|
||||
@@ -215,6 +215,7 @@ Public Class mgrBackup
|
||||
|
||||
Public Sub ImportBackupFiles(ByVal hshImportList As Hashtable)
|
||||
Dim oGame As clsGame
|
||||
Dim bOverwriteCurrent As Boolean = False
|
||||
Dim bContinue As Boolean = True
|
||||
Dim sFileToImport As String
|
||||
Dim sBackupFile As String
|
||||
@@ -223,9 +224,13 @@ Public Class mgrBackup
|
||||
For Each de As DictionaryEntry In hshImportList
|
||||
sFileToImport = CStr(de.Key)
|
||||
oGame = DirectCast(de.Value, clsGame)
|
||||
If File.Exists(sFileToImport) Then
|
||||
|
||||
'Enter overwite mode if we are importing a single backup and "Save Multiple Backups" is not enabled.
|
||||
If hshImportList.Count = 1 And Not oGame.AppendTimeStamp Then bOverwriteCurrent = True
|
||||
|
||||
If File.Exists(sFileToImport) Then
|
||||
sBackupFile = oSettings.BackupFolder
|
||||
|
||||
If oSettings.CreateSubFolder Then
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame)
|
||||
bContinue = HandleSubFolder(oGame, sBackupFile)
|
||||
@@ -236,17 +241,35 @@ Public Class mgrBackup
|
||||
oBackup.MonitorID = oGame.ID
|
||||
oBackup.DateUpdated = File.GetLastWriteTime(sFileToImport)
|
||||
oBackup.UpdatedBy = mgrBackup_ImportedFile
|
||||
If bOverwriteCurrent Then
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & ".7z"
|
||||
Else
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & BuildFileTimeStamp(oBackup.DateUpdated) & ".7z"
|
||||
End If
|
||||
|
||||
oBackup.FileName = sBackupFile.Replace(Settings.BackupFolder & Path.DirectorySeparatorChar, String.Empty)
|
||||
|
||||
If bOverwriteCurrent Then
|
||||
If mgrCommon.CopyFile(sFileToImport, sBackupFile, True) Then
|
||||
oBackup.CheckSum = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||
If Not mgrManifest.DoUpdateLatestManifest(oBackup, mgrSQLite.Database.Remote) Then
|
||||
mgrManifest.DoManifestAdd(oBackup, mgrSQLite.Database.Remote)
|
||||
End If
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ImportSuccess, New String() {sFileToImport, oGame.Name}), False, ToolTipIcon.Info, True)
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorImportBackupCopy, sFileToImport), False, ToolTipIcon.Error, True)
|
||||
End If
|
||||
Else
|
||||
If mgrCommon.CopyFile(sFileToImport, sBackupFile, False) Then
|
||||
oBackup.CheckSum = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||
mgrManifest.DoManifestAdd(oBackup, mgrSQLite.Database.Remote)
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ImportSuccess, New String() {sFileToImport, oGame.Name}), False, ToolTipIcon.Error, True)
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ImportSuccess, New String() {sFileToImport, oGame.Name}), False, ToolTipIcon.Info, True)
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorImportBackupCopy, sFileToImport), False, ToolTipIcon.Error, True)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
Generated
+11
-2
@@ -1887,6 +1887,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Importing this backup file will overwrite the current backup file for [PARAM].[BR][BR]Do you want to continue? This will close the form..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_ConfirmBackupImportOverwriteSingle() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_ConfirmBackupImportOverwriteSingle", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Are you sure you want to delete [PARAM]? This cannot be undone.[BR][BR]This will not delete any backup files that already exist for this game..
|
||||
'''</summary>
|
||||
@@ -2473,7 +2482,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to The "Save multiple backups" option must be enabled on this configuration to import backup files..
|
||||
''' Looks up a localized string similar to The "Save multiple backups" option must be enabled on this configuration to import multiple backup files..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_WarningImportBackupSaveMulti() As String
|
||||
Get
|
||||
@@ -4651,7 +4660,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Show resolved save paths.
|
||||
''' Looks up a localized string similar to Show resolved save paths in Game Manager.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_chkShowResolvedPaths() As String
|
||||
Get
|
||||
|
||||
@@ -2222,7 +2222,7 @@
|
||||
<value>An error occured while building a list of environment variables.[BR][BR][PARAM]</value>
|
||||
</data>
|
||||
<data name="frmSettings_chkShowResolvedPaths" xml:space="preserve">
|
||||
<value>Show resolved save paths</value>
|
||||
<value>Show resolved save paths in Game Manager</value>
|
||||
</data>
|
||||
<data name="frmGameManager_7zBackup" xml:space="preserve">
|
||||
<value>7-Zip</value>
|
||||
@@ -2255,7 +2255,7 @@
|
||||
<value>[PARAM] is a reserved variable, you must enter a different name.</value>
|
||||
</data>
|
||||
<data name="frmGameManager_WarningImportBackupSaveMulti" xml:space="preserve">
|
||||
<value>The "Save multiple backups" option must be enabled on this configuration to import backup files.</value>
|
||||
<value>The "Save multiple backups" option must be enabled on this configuration to import multiple backup files.</value>
|
||||
</data>
|
||||
<data name="frmGameManager_cmsOfficialLinux" xml:space="preserve">
|
||||
<value>&Linux...</value>
|
||||
@@ -2266,4 +2266,7 @@
|
||||
<data name="frmGameManager_WarningWinConfigsInLinux" xml:space="preserve">
|
||||
<value>Official Windows configurations can be used in Linux for games running in Wine or Proton.[BR][BR]You do not need to modify these configurations, GBM will automatically do any required path conversions the first time the game is detected.[BR][BR]This message will only be shown once.</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ConfirmBackupImportOverwriteSingle" xml:space="preserve">
|
||||
<value>Importing this backup file will overwrite the current backup file for [PARAM].[BR][BR]Do you want to continue? This will close the form.</value>
|
||||
</data>
|
||||
</root>
|
||||
+3
-3
@@ -2,7 +2,7 @@ Game Backup Monitor v1.1.5 Readme
|
||||
http://mikemaximus.github.io/gbm-web/
|
||||
gamebackupmonitor@gmail.com
|
||||
|
||||
October 1st, 2018
|
||||
October 4th, 2018
|
||||
|
||||
New in 1.1.5
|
||||
|
||||
@@ -24,9 +24,9 @@ All Platforms:
|
||||
- GBM will no longer allow the creation of variables using reserved names, such as APPDATA.
|
||||
- Your configurations will be automatically updated to these new formats when upgrading to v1.1.5.
|
||||
- These changes will break game list compatability with other versions of GBM. Archived lists are available at http://mikemaximus.github.io/gbm-web/archive.html for those that wish to stay on an older version.
|
||||
- Added a new setting, "Show resolved save paths".
|
||||
- Added a new setting, "Show resolved save paths in Game Manager".
|
||||
- This new setting is enabled by default.
|
||||
- When enabled, GBM will display resolved save paths on the Game Manager. This is how GBM displayed paths prior to v1.1.5.
|
||||
- When enabled, GBM will display resolved save paths in the Game Manager. This is how GBM displayed paths prior to v1.1.5.
|
||||
- When disabled, GBM will display save paths with their variables when applicable.
|
||||
- Added a tooltip to applicable "Path" fields on the Game Manager.
|
||||
- This tooltip either displays either a resolved or unresolved path.
|
||||
|
||||
Reference in New Issue
Block a user