Compare commits
42 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ed067e36f | ||
|
|
bca2fe2239 | ||
|
|
fa5d03ef52 | ||
|
|
998a680999 | ||
|
|
f5972da9eb | ||
|
|
794b0f9908 | ||
|
|
daa5f928bf | ||
|
|
72e3ccb661 | ||
|
|
9e7a4b5efc | ||
|
|
692deaaef9 | ||
|
|
a3572abb3d | ||
|
|
2680f857a9 | ||
|
|
1e2f4de816 | ||
|
|
b9b959f96c | ||
|
|
2ae705be18 | ||
|
|
ccade84b65 | ||
|
|
017c5def56 | ||
|
|
1f9dc18c49 | ||
|
|
bc1630a122 | ||
|
|
478721dbd1 | ||
|
|
8ad4810011 | ||
|
|
93bc974cc3 | ||
|
|
c9463c3a36 | ||
|
|
8b2c5f376b | ||
|
|
9e329476a2 | ||
|
|
626fca3e1e | ||
|
|
039f91cd6f | ||
|
|
f98a98af99 | ||
|
|
d9bd7f38f5 | ||
|
|
4e2ab9a0fb | ||
|
|
218ce3f367 | ||
|
|
b3cfab7ee6 | ||
|
|
39440e1f98 | ||
|
|
9b9d3f9125 | ||
|
|
7eab3b8841 | ||
|
|
539009c5de | ||
|
|
01b46107ad | ||
|
|
a5d2ce2255 | ||
|
|
c0764d0c08 | ||
|
|
35ea6fb74b | ||
|
|
a51a7bea89 | ||
|
|
b5f3408261 |
@@ -6,6 +6,8 @@
|
||||
Private sPath As String
|
||||
Private bAbsolutePath As Boolean
|
||||
Private bFolderSave As Boolean
|
||||
Private bAppendTimeStamp As Boolean
|
||||
Private iBackupLimit As Integer
|
||||
Private sFileType As String
|
||||
Private sExcludeList As String
|
||||
Private bMonitorOnly As Boolean
|
||||
@@ -76,6 +78,24 @@
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property AppendTimeStamp As Boolean
|
||||
Set(value As Boolean)
|
||||
bAppendTimeStamp = value
|
||||
End Set
|
||||
Get
|
||||
Return bAppendTimeStamp
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property BackupLimit As Integer
|
||||
Set(value As Integer)
|
||||
iBackupLimit = value
|
||||
End Set
|
||||
Get
|
||||
Return iBackupLimit
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property FileType As String
|
||||
Set(value As String)
|
||||
sFileType = value
|
||||
|
||||
@@ -47,6 +47,12 @@
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property FileSafeName As String
|
||||
Get
|
||||
Return mgrPath.ValidateFileNameForOS(sName)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property FileName As String
|
||||
Get
|
||||
If mgrCommon.IsUnix Then
|
||||
|
||||
+10
-12
@@ -9,7 +9,7 @@ Public Class clsGame
|
||||
Private bFolderSave As Boolean = False
|
||||
Private sFileType As String = String.Empty
|
||||
Private bAppendTimeStamp As Boolean = False
|
||||
Private iBackupLimit As Integer = 2
|
||||
Private iBackupLimit As Integer = 0
|
||||
Private bCleanFolder As Boolean = False
|
||||
Private sExcludeList As String = String.Empty
|
||||
Private sProcessPath As String = String.Empty
|
||||
@@ -31,7 +31,7 @@ Public Class clsGame
|
||||
Company = 2
|
||||
Version = 4
|
||||
Icon = 16
|
||||
TimeStamp = 32
|
||||
Unused = 32 'Do not remove to maintain compatability, re-use for a future field.
|
||||
MonitorGame = 64
|
||||
End Enum
|
||||
|
||||
@@ -340,10 +340,13 @@ Public Class clsGame
|
||||
If FolderSave <> oGame.FolderSave Then
|
||||
Return False
|
||||
End If
|
||||
If CleanFolder <> oGame.CleanFolder Then
|
||||
If AppendTimeStamp <> oGame.AppendTimeStamp Then
|
||||
Return False
|
||||
End If
|
||||
If AppendTimeStamp <> oGame.AppendTimeStamp Then
|
||||
If BackupLimit <> oGame.BackupLimit Then
|
||||
Return False
|
||||
End If
|
||||
If CleanFolder <> oGame.CleanFolder Then
|
||||
Return False
|
||||
End If
|
||||
If Hours <> oGame.Hours Then
|
||||
@@ -380,14 +383,6 @@ Public Class clsGame
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If (eSyncFields And eOptionalSyncFields.TimeStamp) = eOptionalSyncFields.TimeStamp Then
|
||||
If AppendTimeStamp <> oGame.AppendTimeStamp Then
|
||||
Return False
|
||||
End If
|
||||
If BackupLimit <> oGame.BackupLimit Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If (eSyncFields And eOptionalSyncFields.Version) = eOptionalSyncFields.Version Then
|
||||
If Version <> oGame.Version Then
|
||||
Return False
|
||||
@@ -430,6 +425,9 @@ Public Class clsGame
|
||||
If FolderSave <> oGame.FolderSave Then
|
||||
Return False
|
||||
End If
|
||||
If AppendTimeStamp <> oGame.AppendTimeStamp Then
|
||||
Return False
|
||||
End If
|
||||
If MonitorOnly <> oGame.MonitorOnly Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
Generated
-2
@@ -267,11 +267,9 @@ Partial Class frmGameManager
|
||||
'nudLimit
|
||||
'
|
||||
Me.nudLimit.Location = New System.Drawing.Point(330, 155)
|
||||
Me.nudLimit.Minimum = New Decimal(New Integer() {2, 0, 0, 0})
|
||||
Me.nudLimit.Name = "nudLimit"
|
||||
Me.nudLimit.Size = New System.Drawing.Size(40, 20)
|
||||
Me.nudLimit.TabIndex = 17
|
||||
Me.nudLimit.Value = New Decimal(New Integer() {2, 0, 0, 0})
|
||||
Me.nudLimit.Visible = False
|
||||
'
|
||||
'btnExclude
|
||||
|
||||
+99
-38
@@ -175,40 +175,33 @@ Public Class frmGameManager
|
||||
Return sPath
|
||||
End Function
|
||||
|
||||
Private Sub CheckManifestandUpdate(ByVal oOriginalApp As clsGame, ByVal oNewApp As clsGame)
|
||||
Private Sub CheckManifestandUpdate(ByVal oOriginalApp As clsGame, ByVal oNewApp As clsGame, ByVal bUseGameID As Boolean)
|
||||
Dim oBackupItems As List(Of clsBackup)
|
||||
Dim sDirectory As String
|
||||
Dim sNewDirectory As String
|
||||
Dim sFileName As String
|
||||
Dim sNewFileName As String
|
||||
Dim sNewAppItem As String
|
||||
Dim sOriginalAppItem As String
|
||||
|
||||
'If there is a valid change, check and update the manifest
|
||||
If (oNewApp.ID <> oOriginalApp.ID) Or (oNewApp.FileSafeName <> oOriginalApp.FileSafeName) Then
|
||||
'Choose how to perform file & folder renames
|
||||
If bUseGameID Then
|
||||
sNewAppItem = oNewApp.ID
|
||||
sOriginalAppItem = oOriginalApp.ID
|
||||
Else
|
||||
sNewAppItem = oNewApp.FileSafeName
|
||||
sOriginalAppItem = oOriginalApp.FileSafeName
|
||||
End If
|
||||
|
||||
'If there is an ID change, check and update the manifest
|
||||
If oNewApp.ID <> oOriginalApp.ID Then
|
||||
'Local
|
||||
If mgrManifest.DoManifestCheck(oOriginalApp.ID, mgrSQLite.Database.Local) Then
|
||||
oBackupItems = mgrManifest.DoManifestGetByMonitorID(oOriginalApp.ID, mgrSQLite.Database.Local)
|
||||
'The local manifest will only have one entry per game, therefore this runs only once
|
||||
For Each oBackupItem As clsBackup In oBackupItems
|
||||
'Rename Current Backup File & Folder
|
||||
sFileName = BackupFolder & oBackupItem.FileName
|
||||
|
||||
'Rename Backup File
|
||||
sNewFileName = Path.GetDirectoryName(sFileName) & Path.DirectorySeparatorChar & Path.GetFileName(sFileName).Replace(oOriginalApp.ID, oNewApp.ID)
|
||||
If File.Exists(sFileName) And Not sFileName = sNewFileName Then
|
||||
FileSystem.Rename(sFileName, sNewFileName)
|
||||
End If
|
||||
|
||||
'Rename Directory
|
||||
sDirectory = Path.GetDirectoryName(sFileName)
|
||||
sNewDirectory = sDirectory.Replace(oOriginalApp.ID, oNewApp.ID)
|
||||
If sDirectory <> sNewDirectory Then
|
||||
If Directory.Exists(sDirectory) And Not sDirectory = sNewDirectory Then
|
||||
FileSystem.Rename(sDirectory, sNewDirectory)
|
||||
End If
|
||||
End If
|
||||
|
||||
oBackupItem.MonitorID = oNewApp.ID
|
||||
oBackupItem.FileName = oBackupItem.FileName.Replace(oOriginalApp.ID, oNewApp.ID)
|
||||
oBackupItem.FileName = oBackupItem.FileName.Replace(sOriginalAppItem, sNewAppItem)
|
||||
mgrManifest.DoManifestUpdateByManifestID(oBackupItem, mgrSQLite.Database.Local)
|
||||
Next
|
||||
End If
|
||||
@@ -218,10 +211,24 @@ Public Class frmGameManager
|
||||
oBackupItems = mgrManifest.DoManifestGetByMonitorID(oOriginalApp.ID, mgrSQLite.Database.Remote)
|
||||
|
||||
For Each oBackupItem As clsBackup In oBackupItems
|
||||
'Rename Current Backup File
|
||||
sFileName = BackupFolder & oBackupItem.FileName
|
||||
sNewFileName = Path.GetDirectoryName(sFileName) & Path.DirectorySeparatorChar & Path.GetFileName(sFileName).Replace(sOriginalAppItem, sNewAppItem)
|
||||
If File.Exists(sFileName) And Not sFileName = sNewFileName Then
|
||||
FileSystem.Rename(sFileName, sNewFileName)
|
||||
End If
|
||||
|
||||
oBackupItem.MonitorID = oNewApp.ID
|
||||
oBackupItem.FileName = oBackupItem.FileName.Replace(oOriginalApp.ID, oNewApp.ID)
|
||||
oBackupItem.FileName = oBackupItem.FileName.Replace(sOriginalAppItem, sNewAppItem)
|
||||
mgrManifest.DoManifestUpdateByManifestID(oBackupItem, mgrSQLite.Database.Remote)
|
||||
Next
|
||||
|
||||
'Rename folder if there is one
|
||||
sDirectory = BackupFolder & sOriginalAppItem
|
||||
sNewDirectory = sDirectory.Replace(sOriginalAppItem, sNewAppItem)
|
||||
If Directory.Exists(sDirectory) And Not sDirectory = sNewDirectory Then
|
||||
FileSystem.Rename(sDirectory, sNewDirectory)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -375,7 +382,7 @@ Public Class frmGameManager
|
||||
If sNewPath <> String.Empty Then
|
||||
txtIcon.Text = sNewPath
|
||||
If IO.File.Exists(sNewPath) Then
|
||||
pbIcon.Image = Image.FromFile(sNewPath)
|
||||
pbIcon.Image = mgrCommon.SafeIconFromFile(sNewPath)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -675,6 +682,36 @@ Public Class frmGameManager
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub VerifyBackups(ByVal oApp As clsGame)
|
||||
Dim oCurrentBackup As clsBackup
|
||||
Dim oCurrentBackups As List(Of clsBackup)
|
||||
Dim oBackupsRemoved As New List(Of clsBackup)
|
||||
|
||||
oCurrentBackups = mgrManifest.DoManifestGetByMonitorID(oApp.ID, mgrSQLite.Database.Remote)
|
||||
|
||||
Cursor.Current = Cursors.WaitCursor
|
||||
|
||||
For Each oCurrentBackup In oCurrentBackups
|
||||
If Not File.Exists(BackupFolder & oCurrentBackup.FileName) Then
|
||||
oBackupsRemoved.Add(oCurrentBackup)
|
||||
mgrManifest.DoManifestDeleteByManifestID(oCurrentBackup, mgrSQLite.Database.Remote)
|
||||
End If
|
||||
Next
|
||||
|
||||
If oBackupsRemoved.Count > 0 Then
|
||||
For Each oCurrentBackup In oBackupsRemoved
|
||||
oCurrentBackups.Remove(oCurrentBackup)
|
||||
If oCurrentBackups.Count = 0 Then
|
||||
mgrManifest.DoManifestDeleteByMonitorID(oCurrentBackup, mgrSQLite.Database.Local)
|
||||
End If
|
||||
Next
|
||||
LoadBackupData()
|
||||
GetBackupInfo(oApp)
|
||||
End If
|
||||
|
||||
Cursor.Current = Cursors.Default
|
||||
End Sub
|
||||
|
||||
Private Sub GetBackupInfo(ByVal oApp As clsGame)
|
||||
Dim oBackupInfo As clsBackup
|
||||
Dim oCurrentBackup As clsBackup
|
||||
@@ -757,7 +794,7 @@ Public Class frmGameManager
|
||||
|
||||
For Each oBackup In oBackupData
|
||||
'Delete the specific remote manifest entry
|
||||
mgrManifest.DoManifestDeletebyManifestID(oBackup, mgrSQLite.Database.Remote)
|
||||
mgrManifest.DoManifestDeleteByManifestID(oBackup, mgrSQLite.Database.Remote)
|
||||
'Delete referenced backup file from the backup folder
|
||||
mgrCommon.DeleteFile(BackupFolder & oBackup.FileName)
|
||||
'Check for sub-directory and delete if empty (we need to do this every pass just in case the user had a mix of settings at one point)
|
||||
@@ -765,7 +802,7 @@ Public Class frmGameManager
|
||||
Next
|
||||
|
||||
'Delete local manifest entry
|
||||
mgrManifest.DoManifestDeletebyMonitorID(CurrentBackupItem, mgrSQLite.Database.Local)
|
||||
mgrManifest.DoManifestDeleteByMonitorID(CurrentBackupItem, mgrSQLite.Database.Local)
|
||||
|
||||
LoadBackupData()
|
||||
FillData()
|
||||
@@ -831,7 +868,7 @@ Public Class frmGameManager
|
||||
|
||||
'Icon
|
||||
If IO.File.Exists(oApp.Icon) Then
|
||||
pbIcon.Image = Image.FromFile(oApp.Icon)
|
||||
pbIcon.Image = mgrCommon.SafeIconFromFile(oApp.Icon)
|
||||
Else
|
||||
pbIcon.Image = Icon_Unknown
|
||||
End If
|
||||
@@ -847,14 +884,14 @@ Public Class frmGameManager
|
||||
End Sub
|
||||
|
||||
Private Sub FillTagsbyID(ByVal sID As String)
|
||||
Dim hshTags As Hashtable
|
||||
Dim slTags As SortedList
|
||||
Dim oTag As clsTag
|
||||
Dim sTags As String = String.Empty
|
||||
Dim cTrim() As Char = {",", " "}
|
||||
|
||||
hshTags = mgrGameTags.GetTagsByGame(sID)
|
||||
slTags = mgrGameTags.GetTagsByGame(sID)
|
||||
|
||||
For Each de As DictionaryEntry In hshTags
|
||||
For Each de As DictionaryEntry In slTags
|
||||
oTag = DirectCast(de.Value, clsTag)
|
||||
sTags &= "#" & oTag.Name & ", "
|
||||
Next
|
||||
@@ -913,7 +950,7 @@ Public Class frmGameManager
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub ModeChange()
|
||||
Private Sub ModeChange(Optional ByVal bNoFocusChange As Boolean = False)
|
||||
IsLoading = True
|
||||
|
||||
Select Case eCurrentMode
|
||||
@@ -1060,7 +1097,7 @@ Public Class frmGameManager
|
||||
btnExport.Enabled = True
|
||||
End Select
|
||||
|
||||
lstGames.Focus()
|
||||
If Not bNoFocusChange Then lstGames.Focus()
|
||||
|
||||
IsLoading = False
|
||||
End Sub
|
||||
@@ -1082,28 +1119,34 @@ Public Class frmGameManager
|
||||
If chkMonitorOnly.Checked Then
|
||||
chkFolderSave.Enabled = False
|
||||
chkTimeStamp.Enabled = False
|
||||
lblLimit.Enabled = False
|
||||
nudLimit.Enabled = False
|
||||
lblSavePath.Enabled = False
|
||||
txtSavePath.Enabled = False
|
||||
btnSavePathBrowse.Enabled = False
|
||||
btnInclude.Enabled = False
|
||||
btnExclude.Enabled = False
|
||||
chkCleanFolder.Enabled = False
|
||||
Else
|
||||
chkFolderSave.Enabled = True
|
||||
chkTimeStamp.Enabled = True
|
||||
lblLimit.Enabled = True
|
||||
nudLimit.Enabled = True
|
||||
lblSavePath.Enabled = True
|
||||
txtSavePath.Enabled = True
|
||||
btnSavePathBrowse.Enabled = True
|
||||
btnInclude.Enabled = True
|
||||
btnExclude.Enabled = True
|
||||
FolderSaveModeChange()
|
||||
VerifyCleanFolder()
|
||||
End If
|
||||
VerifyCleanFolder()
|
||||
End Sub
|
||||
|
||||
Private Sub TimeStampModeChange()
|
||||
If chkTimeStamp.Checked Then
|
||||
nudLimit.Visible = True
|
||||
lblLimit.Visible = True
|
||||
nudLimit.Value = 5
|
||||
nudLimit.Value = 0
|
||||
Else
|
||||
nudLimit.Visible = False
|
||||
nudLimit.Value = nudLimit.Minimum
|
||||
@@ -1249,7 +1292,7 @@ Public Class frmGameManager
|
||||
Case eModes.Edit
|
||||
If CoreValidatation(oApp, False) Then
|
||||
bSuccess = True
|
||||
CheckManifestandUpdate(oCurrentGame, oApp)
|
||||
CheckManifestandUpdate(oCurrentGame, oApp, oSettings.UseGameID)
|
||||
mgrMonitorList.DoListUpdate(oApp, CurrentGame.ID)
|
||||
eCurrentMode = eModes.View
|
||||
End If
|
||||
@@ -1294,7 +1337,7 @@ Public Class frmGameManager
|
||||
|
||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmGameDelete, oApp.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrMonitorList.DoListDelete(oApp.ID)
|
||||
mgrMonitorList.SyncMonitorLists(Settings)
|
||||
mgrMonitorList.SyncMonitorLists(Settings,, False)
|
||||
LoadData()
|
||||
eCurrentMode = eModes.Disabled
|
||||
ModeChange()
|
||||
@@ -1309,7 +1352,7 @@ Public Class frmGameManager
|
||||
|
||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmMultiGameDelete, sMonitorIDs.Count, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrMonitorList.DoListDeleteMulti(sMonitorIDs)
|
||||
mgrMonitorList.SyncMonitorLists(Settings)
|
||||
mgrMonitorList.SyncMonitorLists(Settings,, False)
|
||||
LoadData()
|
||||
eCurrentMode = eModes.Disabled
|
||||
ModeChange()
|
||||
@@ -1479,7 +1522,6 @@ Public Class frmGameManager
|
||||
If lstGames.SelectedItems.Count > 0 Then
|
||||
RestoreList.Clear()
|
||||
|
||||
|
||||
For Each oData In lstGames.SelectedItems
|
||||
If oRemoteBackupData.Contains(oData.Key) Then
|
||||
oGame = DirectCast(GameData(oData.Key), clsGame)
|
||||
@@ -1494,6 +1536,12 @@ Public Class frmGameManager
|
||||
For Each de As DictionaryEntry In RestoreList
|
||||
oGame = DirectCast(de.Key, clsGame)
|
||||
Next
|
||||
|
||||
'FIXME: This is a really lazy fix. This whole function needs a rewrite at some point.
|
||||
'Replace backup entry with currently selected backup item in case the user wants to restore an older backup.
|
||||
RestoreList.Clear()
|
||||
RestoreList.Add(oGame, oCurrentBackupItem)
|
||||
|
||||
If Not mgrRestore.CheckManifest(oGame.Name) Then
|
||||
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmRestoreAnyway, oGame.Name)
|
||||
Else
|
||||
@@ -1785,6 +1833,10 @@ Public Class frmGameManager
|
||||
TimeStampModeChange()
|
||||
End Sub
|
||||
|
||||
Private Sub cboRemoteBackup_Enter(sender As Object, e As EventArgs) Handles cboRemoteBackup.Enter, cboRemoteBackup.Click
|
||||
If Not oCurrentGame Is Nothing Then VerifyBackups(oCurrentGame)
|
||||
End Sub
|
||||
|
||||
Private Sub cboRemoteBackup_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboRemoteBackup.SelectedIndexChanged
|
||||
If Not bIsLoading Then
|
||||
UpdateBackupInfo(DirectCast(cboRemoteBackup.SelectedItem, KeyValuePair(Of String, String)).Key)
|
||||
@@ -1812,7 +1864,14 @@ Public Class frmGameManager
|
||||
End Sub
|
||||
|
||||
Private Sub txtQuickFilter_TextChanged(sender As Object, e As EventArgs) Handles txtQuickFilter.TextChanged
|
||||
If Not eCurrentMode = eModes.Disabled Then
|
||||
eCurrentMode = eModes.Disabled
|
||||
ModeChange(True)
|
||||
lstGames.ClearSelected()
|
||||
End If
|
||||
|
||||
If Not tmFilterTimer.Enabled Then
|
||||
lstGames.Enabled = False
|
||||
tmFilterTimer.Enabled = True
|
||||
tmFilterTimer.Start()
|
||||
End If
|
||||
@@ -1827,6 +1886,7 @@ Public Class frmGameManager
|
||||
FormatAndFillList()
|
||||
tmFilterTimer.Stop()
|
||||
tmFilterTimer.Enabled = False
|
||||
lstGames.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub frmGameManager_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
|
||||
@@ -1836,4 +1896,5 @@ Public Class frmGameManager
|
||||
Private Sub chkMonitorOnly_CheckedChanged(sender As Object, e As EventArgs) Handles chkMonitorOnly.CheckedChanged
|
||||
MonitorOnlyModeChange()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
+46
-16
@@ -526,7 +526,7 @@ Public Class frmMain
|
||||
sIcon = fbBrowser.FileName
|
||||
If File.Exists(sIcon) Then
|
||||
oProcess.GameInfo.Icon = sIcon
|
||||
pbIcon.Image = Image.FromFile(sIcon)
|
||||
pbIcon.Image = mgrCommon.SafeIconFromFile(sIcon)
|
||||
mgrMonitorList.DoListUpdate(oProcess.GameInfo)
|
||||
End If
|
||||
End If
|
||||
@@ -577,6 +577,25 @@ Public Class frmMain
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SetGameIcon()
|
||||
Dim ic As Icon
|
||||
Dim oBitmap As Bitmap
|
||||
|
||||
Try
|
||||
'Grab icon from the executable
|
||||
ic = System.Drawing.Icon.ExtractAssociatedIcon(oProcess.FoundProcess.MainModule.FileName)
|
||||
oBitmap = New Bitmap(ic.ToBitmap)
|
||||
ic.Dispose()
|
||||
|
||||
'Set the icon, we need to use an intermediary object to prevent file locking
|
||||
pbIcon.Image = oBitmap
|
||||
|
||||
Catch ex As Exception
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_ErrorGameIcon), False, ToolTipIcon.Error)
|
||||
UpdateLog(mgrCommon.FormatString(App_GenericError, ex.Message), False,, False)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub SetGameInfo(Optional ByVal bMulti As Boolean = False)
|
||||
Dim sFileName As String = String.Empty
|
||||
Dim sFileVersion As String = String.Empty
|
||||
@@ -586,6 +605,20 @@ Public Class frmMain
|
||||
lblStatus1.Text = String.Empty
|
||||
lblStatus2.Text = String.Empty
|
||||
lblStatus3.Text = String.Empty
|
||||
pbIcon.Image = Icon_Unknown
|
||||
|
||||
'Set Game Icon
|
||||
If Not mgrCommon.IsUnix Then SetGameIcon()
|
||||
|
||||
Try
|
||||
'Set Game Details
|
||||
sFileName = oProcess.FoundProcess.MainModule.FileName
|
||||
sFileVersion = oProcess.FoundProcess.MainModule.FileVersionInfo.FileVersion
|
||||
sCompanyName = oProcess.FoundProcess.MainModule.FileVersionInfo.CompanyName
|
||||
Catch ex As Exception
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_ErrorGameDetails), False, ToolTipIcon.Error)
|
||||
UpdateLog(mgrCommon.FormatString(App_GenericError, ex.Message), False,, False)
|
||||
End Try
|
||||
|
||||
'Get Game Details
|
||||
If bMulti Then
|
||||
@@ -595,28 +628,19 @@ Public Class frmMain
|
||||
pbTime.Visible = False
|
||||
lblTimeSpent.Visible = False
|
||||
pbIcon.Image = Icon_Unknown
|
||||
lblStatus1.Text = frmMain_NoDetails
|
||||
If sFileName = String.Empty Then
|
||||
lblStatus1.Text = frmMain_NoDetails
|
||||
Else
|
||||
lblStatus1.Text = sFileName
|
||||
End If
|
||||
Else
|
||||
bAllowIcon = True
|
||||
bAllowDetails = True
|
||||
lblGameTitle.Text = oProcess.GameInfo.Name
|
||||
|
||||
Try
|
||||
Dim ic As Icon = System.Drawing.Icon.ExtractAssociatedIcon(oProcess.FoundProcess.MainModule.FileName)
|
||||
pbIcon.Image = ic.ToBitmap
|
||||
|
||||
'Set Game Details
|
||||
sFileName = oProcess.FoundProcess.MainModule.FileName
|
||||
sFileVersion = oProcess.FoundProcess.MainModule.FileVersionInfo.FileVersion
|
||||
sCompanyName = oProcess.FoundProcess.MainModule.FileVersionInfo.CompanyName
|
||||
|
||||
Catch ex As Exception
|
||||
pbIcon.Image = Icon_Unknown
|
||||
End Try
|
||||
|
||||
'Check for a custom icon & details
|
||||
If File.Exists(oProcess.GameInfo.Icon) Then
|
||||
pbIcon.Image = Image.FromFile(oProcess.GameInfo.Icon)
|
||||
pbIcon.Image = mgrCommon.SafeIconFromFile(oProcess.GameInfo.Icon)
|
||||
End If
|
||||
If sFileName = String.Empty Then
|
||||
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
||||
@@ -1046,6 +1070,12 @@ Public Class frmMain
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'Check Special Paths
|
||||
If Not mgrPath.CheckSpecialPaths Then
|
||||
bInitFail = True
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'Local Database Check
|
||||
VerifyDBVersion(mgrSQLite.Database.Local)
|
||||
LocalDatabaseCheck()
|
||||
|
||||
@@ -68,7 +68,7 @@ Public Class frmSessions
|
||||
dgSessions.Rows.Add(New Object() {dr("MonitorID"), dr("Name"), dr("Start"), dStart, dr("End"), dEnd, dHours})
|
||||
Next
|
||||
|
||||
lblTotalHours.Text = mgrCommon.FormatString(frmSessions_lblTotalHours, dTotalHours)
|
||||
lblTotalHours.Text = mgrCommon.FormatString(frmSessions_lblTotalHours, Math.Round(dTotalHours, 2))
|
||||
|
||||
dgSessions.AutoResizeColumns()
|
||||
End Sub
|
||||
@@ -290,9 +290,21 @@ Public Class frmSessions
|
||||
|
||||
Select Case iDataTypeCol
|
||||
Case iDataType.DecimalType
|
||||
iCompareResult = If(CDec(dgRow1.Cells(iSortCol).Value) < CDec(dgRow2.Cells(iSortCol).Value), -1, 1)
|
||||
If (CDec(dgRow1.Cells(iSortCol).Value) = CDec(dgRow2.Cells(iSortCol).Value)) Then
|
||||
iCompareResult = 0
|
||||
ElseIf (CDec(dgRow1.Cells(iSortCol).Value) < CDec(dgRow2.Cells(iSortCol).Value)) Then
|
||||
iCompareResult = -1
|
||||
Else
|
||||
iCompareResult = 1
|
||||
End If
|
||||
Case iDataType.IntType
|
||||
iCompareResult = If(CInt(dgRow1.Cells(iSortCol).Value) < CInt(dgRow2.Cells(iSortCol).Value), -1, 1)
|
||||
If (CInt(dgRow1.Cells(iSortCol).Value) = CInt(dgRow2.Cells(iSortCol).Value)) Then
|
||||
iCompareResult = 0
|
||||
ElseIf (CInt(dgRow1.Cells(iSortCol).Value) < CInt(dgRow2.Cells(iSortCol).Value)) Then
|
||||
iCompareResult = -1
|
||||
Else
|
||||
iCompareResult = 1
|
||||
End If
|
||||
Case iDataType.StringType
|
||||
iCompareResult = String.Compare(CStr(dgRow1.Cells(iSortCol).Value), CStr(dgRow2.Cells(iSortCol).Value))
|
||||
Case iDataType.DateTimeType
|
||||
|
||||
Generated
+9
-22
@@ -28,7 +28,6 @@ Partial Class frmSyncFields
|
||||
Me.chkVersion = New System.Windows.Forms.CheckBox()
|
||||
Me.chkCompany = New System.Windows.Forms.CheckBox()
|
||||
Me.chkGamePath = New System.Windows.Forms.CheckBox()
|
||||
Me.chkTimeStamp = New System.Windows.Forms.CheckBox()
|
||||
Me.btnCancel = New System.Windows.Forms.Button()
|
||||
Me.btnSave = New System.Windows.Forms.Button()
|
||||
Me.grpFields.SuspendLayout()
|
||||
@@ -41,10 +40,9 @@ Partial Class frmSyncFields
|
||||
Me.grpFields.Controls.Add(Me.chkVersion)
|
||||
Me.grpFields.Controls.Add(Me.chkCompany)
|
||||
Me.grpFields.Controls.Add(Me.chkGamePath)
|
||||
Me.grpFields.Controls.Add(Me.chkTimeStamp)
|
||||
Me.grpFields.Location = New System.Drawing.Point(12, 12)
|
||||
Me.grpFields.Name = "grpFields"
|
||||
Me.grpFields.Size = New System.Drawing.Size(195, 162)
|
||||
Me.grpFields.Size = New System.Drawing.Size(195, 135)
|
||||
Me.grpFields.TabIndex = 0
|
||||
Me.grpFields.TabStop = False
|
||||
Me.grpFields.Text = "Available Fields"
|
||||
@@ -52,7 +50,7 @@ Partial Class frmSyncFields
|
||||
'chkMonitorGame
|
||||
'
|
||||
Me.chkMonitorGame.AutoSize = True
|
||||
Me.chkMonitorGame.Location = New System.Drawing.Point(6, 134)
|
||||
Me.chkMonitorGame.Location = New System.Drawing.Point(6, 111)
|
||||
Me.chkMonitorGame.Name = "chkMonitorGame"
|
||||
Me.chkMonitorGame.Size = New System.Drawing.Size(109, 17)
|
||||
Me.chkMonitorGame.TabIndex = 5
|
||||
@@ -62,7 +60,7 @@ Partial Class frmSyncFields
|
||||
'chkIcon
|
||||
'
|
||||
Me.chkIcon.AutoSize = True
|
||||
Me.chkIcon.Location = New System.Drawing.Point(6, 111)
|
||||
Me.chkIcon.Location = New System.Drawing.Point(6, 88)
|
||||
Me.chkIcon.Name = "chkIcon"
|
||||
Me.chkIcon.Size = New System.Drawing.Size(148, 17)
|
||||
Me.chkIcon.TabIndex = 4
|
||||
@@ -72,7 +70,7 @@ Partial Class frmSyncFields
|
||||
'chkVersion
|
||||
'
|
||||
Me.chkVersion.AutoSize = True
|
||||
Me.chkVersion.Location = New System.Drawing.Point(6, 88)
|
||||
Me.chkVersion.Location = New System.Drawing.Point(6, 65)
|
||||
Me.chkVersion.Name = "chkVersion"
|
||||
Me.chkVersion.Size = New System.Drawing.Size(61, 17)
|
||||
Me.chkVersion.TabIndex = 3
|
||||
@@ -82,7 +80,7 @@ Partial Class frmSyncFields
|
||||
'chkCompany
|
||||
'
|
||||
Me.chkCompany.AutoSize = True
|
||||
Me.chkCompany.Location = New System.Drawing.Point(6, 65)
|
||||
Me.chkCompany.Location = New System.Drawing.Point(6, 42)
|
||||
Me.chkCompany.Name = "chkCompany"
|
||||
Me.chkCompany.Size = New System.Drawing.Size(70, 17)
|
||||
Me.chkCompany.TabIndex = 2
|
||||
@@ -92,27 +90,17 @@ Partial Class frmSyncFields
|
||||
'chkGamePath
|
||||
'
|
||||
Me.chkGamePath.AutoSize = True
|
||||
Me.chkGamePath.Location = New System.Drawing.Point(6, 42)
|
||||
Me.chkGamePath.Location = New System.Drawing.Point(6, 19)
|
||||
Me.chkGamePath.Name = "chkGamePath"
|
||||
Me.chkGamePath.Size = New System.Drawing.Size(180, 17)
|
||||
Me.chkGamePath.TabIndex = 1
|
||||
Me.chkGamePath.Text = "Game Path (Not Recommended)"
|
||||
Me.chkGamePath.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkTimeStamp
|
||||
'
|
||||
Me.chkTimeStamp.AutoSize = True
|
||||
Me.chkTimeStamp.Location = New System.Drawing.Point(6, 19)
|
||||
Me.chkTimeStamp.Name = "chkTimeStamp"
|
||||
Me.chkTimeStamp.Size = New System.Drawing.Size(133, 17)
|
||||
Me.chkTimeStamp.TabIndex = 0
|
||||
Me.chkTimeStamp.Text = "Save multiple backups"
|
||||
Me.chkTimeStamp.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnCancel
|
||||
'
|
||||
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||
Me.btnCancel.Location = New System.Drawing.Point(132, 180)
|
||||
Me.btnCancel.Location = New System.Drawing.Point(132, 153)
|
||||
Me.btnCancel.Name = "btnCancel"
|
||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 2
|
||||
@@ -122,7 +110,7 @@ Partial Class frmSyncFields
|
||||
'btnSave
|
||||
'
|
||||
Me.btnSave.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.btnSave.Location = New System.Drawing.Point(52, 180)
|
||||
Me.btnSave.Location = New System.Drawing.Point(52, 153)
|
||||
Me.btnSave.Name = "btnSave"
|
||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnSave.TabIndex = 1
|
||||
@@ -133,7 +121,7 @@ Partial Class frmSyncFields
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(219, 211)
|
||||
Me.ClientSize = New System.Drawing.Size(219, 186)
|
||||
Me.Controls.Add(Me.btnCancel)
|
||||
Me.Controls.Add(Me.btnSave)
|
||||
Me.Controls.Add(Me.grpFields)
|
||||
@@ -157,7 +145,6 @@ Partial Class frmSyncFields
|
||||
Friend WithEvents chkVersion As CheckBox
|
||||
Friend WithEvents chkCompany As CheckBox
|
||||
Friend WithEvents chkGamePath As CheckBox
|
||||
Friend WithEvents chkTimeStamp As CheckBox
|
||||
Friend WithEvents btnCancel As Button
|
||||
Friend WithEvents btnSave As Button
|
||||
End Class
|
||||
|
||||
@@ -26,9 +26,6 @@ Public Class frmSyncFields
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.MonitorGame) = clsGame.eOptionalSyncFields.MonitorGame Then
|
||||
chkMonitorGame.Checked = True
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.TimeStamp) = clsGame.eOptionalSyncFields.TimeStamp Then
|
||||
chkTimeStamp.Checked = True
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.Version) = clsGame.eOptionalSyncFields.Version Then
|
||||
chkVersion.Checked = True
|
||||
End If
|
||||
@@ -47,7 +44,6 @@ Public Class frmSyncFields
|
||||
chkVersion.Text = frmSyncFields_chkVersion
|
||||
chkCompany.Text = frmSyncFields_chkCompany
|
||||
chkGamePath.Text = frmSyncFields_chkGamePath
|
||||
chkTimeStamp.Text = frmSyncFields_chkTimeStamp
|
||||
End Sub
|
||||
|
||||
Private Sub frmSyncFields_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
@@ -65,14 +61,6 @@ Public Class frmSyncFields
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub chkTimeStamp_CheckedChanged(sender As Object, e As EventArgs) Handles chkTimeStamp.CheckedChanged
|
||||
If chkTimeStamp.Checked Then
|
||||
SyncFields = clsGame.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.TimeStamp)
|
||||
Else
|
||||
SyncFields = clsGame.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.TimeStamp)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub chkGamePath_CheckedChanged(sender As Object, e As EventArgs) Handles chkGamePath.CheckedChanged
|
||||
If chkGamePath.Checked Then
|
||||
SyncFields = clsGame.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.GamePath)
|
||||
|
||||
@@ -116,6 +116,7 @@ Public Class mgrBackup
|
||||
Public Function CheckBackupPrereq(ByVal oGame As clsGame) As Boolean
|
||||
Dim sBackupFile As String = oSettings.BackupFolder
|
||||
Dim sSavePath As String
|
||||
Dim sOverwriteMessage As String
|
||||
Dim lAvailableSpace As Long
|
||||
Dim lFolderSize As Long
|
||||
|
||||
@@ -142,21 +143,30 @@ Public Class mgrBackup
|
||||
End If
|
||||
End If
|
||||
|
||||
If mgrRestore.CheckManifest(oGame.ID) Then
|
||||
If mgrCommon.ShowMessage(mgrBackup_ConfirmManifestConflict, oGame.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
RaiseEvent UpdateLog(mgrBackup_ErrorManifestConflict, False, ToolTipIcon.Error, True)
|
||||
Return False
|
||||
'A manifest check is only required when "Save Multiple Backups" is disabled
|
||||
If Not oGame.AppendTimeStamp Then
|
||||
If mgrRestore.CheckManifest(oGame.ID) Then
|
||||
If mgrCommon.ShowMessage(mgrBackup_ConfirmManifestConflict, oGame.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
RaiseEvent UpdateLog(mgrBackup_ErrorManifestConflict, False, ToolTipIcon.Error, True)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If oSettings.ShowOverwriteWarning And File.Exists(sBackupFile) And Not oGame.AppendTimeStamp Then
|
||||
If mgrCommon.ShowMessage(mgrBackup_ConfirmOverwrite, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
If oGame.AbsolutePath Then
|
||||
sOverwriteMessage = mgrBackup_ConfirmOverwrite
|
||||
Else
|
||||
sOverwriteMessage = mgrBackup_ConfirmOverwriteRelative
|
||||
End If
|
||||
|
||||
If mgrCommon.ShowMessage(sOverwriteMessage, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorOverwriteAbort, oGame.Name), False, ToolTipIcon.Error, True)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
Return True
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub CheckOldBackups(ByVal oGame As clsGame)
|
||||
@@ -223,7 +233,7 @@ Public Class mgrBackup
|
||||
End If
|
||||
|
||||
If oGame.AppendTimeStamp Then
|
||||
CheckOldBackups(oGame)
|
||||
If oGame.BackupLimit > 0 Then CheckOldBackups(oGame)
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & sTimeStamp & ".7z"
|
||||
Else
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & ".7z"
|
||||
|
||||
+29
-10
@@ -9,8 +9,8 @@ Imports System.Runtime.Serialization.Formatters.Binary
|
||||
Public Class mgrCommon
|
||||
|
||||
'These need to be updated when upgrading the packaged 7z utility
|
||||
Private Shared sUtility64Hash As String = "F558DFBB7F2BF5D9A002AC68843A2E79E4EC045EDD7F56213562ACFA75CC77AD" 'v18.01 7za.exe x64
|
||||
Private Shared sUtility32Hash As String = "E6855553350FA6FB23E05839C7F3EF140DAD29D9A0E3495DE4D1B17A9FBF5CA4" 'v18.01 7za.exe x86
|
||||
Private Shared sUtility64Hash As String = "8BC2A3D6C37C4DB9BD487AD35039AE0DC8A1DDF2C3B1F0B76B3E678FEBB9F223" 'v18.05 7za.exe x64
|
||||
Private Shared sUtility32Hash As String = "77613CCA716EDF68B9D5BAB951463ED7FADE5BC0EC465B36190A76299C50F117" 'v18.05 7za.exe x86
|
||||
|
||||
Public Shared ReadOnly Property UtilityHash As String
|
||||
Get
|
||||
@@ -65,6 +65,18 @@ Public Class mgrCommon
|
||||
Return oFormatter.Deserialize(oStream)
|
||||
End Function
|
||||
|
||||
Public Shared Function SafeIconFromFile(ByVal sPath As String) As Image
|
||||
Dim oImage As Image
|
||||
Dim oReturnImage As Image
|
||||
Dim oImageSize As Size = New Size(48, 48)
|
||||
|
||||
oImage = Image.FromFile(sPath)
|
||||
oReturnImage = New Bitmap(oImage, oImageSize)
|
||||
oImage.Dispose()
|
||||
|
||||
Return oReturnImage
|
||||
End Function
|
||||
|
||||
Public Shared Function IsAddress(ByVal sURL As String) As Boolean
|
||||
If (sURL.IndexOf("http://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Or (sURL.IndexOf("https://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Then
|
||||
Return True
|
||||
@@ -434,15 +446,22 @@ Public Class mgrCommon
|
||||
Dim oDir As DirectoryInfo
|
||||
Dim sDir As String = sBackupFolder & oBackup.MonitorID
|
||||
|
||||
'Delete sub directory if it's empty
|
||||
'Check if the sub-folder is an ID or Name
|
||||
If oBackup.FileName.StartsWith(oBackup.MonitorID & Path.DirectorySeparatorChar) Then
|
||||
If Directory.Exists(sDir) Then
|
||||
'Check if there's any sub-directories or files remaining
|
||||
oDir = New DirectoryInfo(sDir)
|
||||
If oDir.GetDirectories.Length = 0 And oDir.GetFiles.Length = 0 Then
|
||||
'Folder is empty, delete the empty sub-folder
|
||||
If Directory.Exists(sDir) Then DeleteDirectory(sDir)
|
||||
End If
|
||||
sDir = sBackupFolder & oBackup.MonitorID
|
||||
ElseIf oBackup.FileName.StartsWith(oBackup.FileSafeName & Path.DirectorySeparatorChar) Then
|
||||
sDir = sBackupFolder & oBackup.FileSafeName
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'Delete sub directory if it's empty
|
||||
If Directory.Exists(sDir) Then
|
||||
'Check if there's any sub-directories or files remaining
|
||||
oDir = New DirectoryInfo(sDir)
|
||||
If oDir.GetDirectories.Length = 0 And oDir.GetFiles.Length = 0 Then
|
||||
'Folder is empty, delete the empty sub-folder
|
||||
If Directory.Exists(sDir) Then DeleteDirectory(sDir)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -76,11 +76,11 @@
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Function GetTagsByGame(ByVal sMonitorID As String) As Hashtable
|
||||
Public Shared Function GetTagsByGame(ByVal sMonitorID As String) As SortedList
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim hshList As New Hashtable
|
||||
Dim slList As New SortedList
|
||||
Dim hshParams As New Hashtable
|
||||
Dim oTag As clsTag
|
||||
|
||||
@@ -94,10 +94,10 @@
|
||||
oTag = New clsTag
|
||||
oTag.ID = CStr(dr("TagID"))
|
||||
oTag.Name = CStr(dr("Name"))
|
||||
hshList.Add(oTag.Name, oTag)
|
||||
slList.Add(oTag.Name, oTag)
|
||||
Next
|
||||
|
||||
Return hshList
|
||||
Return slList
|
||||
End Function
|
||||
|
||||
Public Shared Function GetTagsByGameForExport(ByVal sMonitorID As String) As List(Of Tag)
|
||||
@@ -108,7 +108,7 @@
|
||||
Dim hshParams As New Hashtable
|
||||
Dim oTag As Tag
|
||||
|
||||
sSQL = "SELECT TagID, tags.Name FROM gametags NATURAL JOIN tags WHERE MonitorID = @ID"
|
||||
sSQL = "SELECT TagID, tags.Name FROM gametags NATURAL JOIN tags WHERE MonitorID = @ID ORDER BY tags.Name ASC"
|
||||
|
||||
hshParams.Add("ID", sMonitorID)
|
||||
|
||||
|
||||
@@ -373,8 +373,6 @@ Public Class mgrMonitorList
|
||||
Dim sVersion As String
|
||||
Dim sCompany As String
|
||||
Dim sMonitorGame As String
|
||||
Dim sTimeStamp As String
|
||||
Dim sBackupLimit As String
|
||||
|
||||
'Setup SQL for optional fields
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.Company) = clsGame.eOptionalSyncFields.Company Then
|
||||
@@ -397,13 +395,6 @@ Public Class mgrMonitorList
|
||||
Else
|
||||
sMonitorGame = "COALESCE((SELECT Enabled FROM monitorlist WHERE MonitorID=@ID),1)"
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.TimeStamp) = clsGame.eOptionalSyncFields.TimeStamp Then
|
||||
sTimeStamp = "@TimeStamp"
|
||||
sBackupLimit = "@BackupLimit"
|
||||
Else
|
||||
sTimeStamp = "COALESCE((SELECT TimeStamp FROM monitorlist WHERE MonitorID=@ID),0)"
|
||||
sBackupLimit = "COALESCE((SELECT BackupLimit FROM monitorlist WHERE MonitorID=@ID),2)"
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.Version) = clsGame.eOptionalSyncFields.Version Then
|
||||
sVersion = "@Version"
|
||||
Else
|
||||
@@ -412,9 +403,9 @@ Public Class mgrMonitorList
|
||||
|
||||
sSQL = "INSERT OR REPLACE INTO monitorlist (MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder, Parameter, Comments, IsRegEx) "
|
||||
sSQL &= "VALUES (@ID, @Name, @Process, @Path, @AbsolutePath, @FolderSave, @FileType, "
|
||||
sSQL &= sTimeStamp & ", @ExcludeList, " & sGamePath & ", "
|
||||
sSQL &= "@TimeStamp, @ExcludeList, " & sGamePath & ", "
|
||||
sSQL &= sIcon & ", @Hours, " & sVersion & ", "
|
||||
sSQL &= sCompany & ", " & sMonitorGame & ", @MonitorOnly, " & sBackupLimit & ", @CleanFolder, @Parameter, @Comments, @IsRegEx);"
|
||||
sSQL &= sCompany & ", " & sMonitorGame & ", @MonitorOnly, @BackupLimit, @CleanFolder, @Parameter, @Comments, @IsRegEx);"
|
||||
|
||||
For Each oGame As clsGame In hshGames.Values
|
||||
hshParams = New Hashtable
|
||||
@@ -426,6 +417,8 @@ Public Class mgrMonitorList
|
||||
hshParams.Add("Path", oGame.TruePath)
|
||||
hshParams.Add("AbsolutePath", oGame.AbsolutePath)
|
||||
hshParams.Add("FolderSave", oGame.FolderSave)
|
||||
hshParams.Add("TimeStamp", oGame.AppendTimeStamp)
|
||||
hshParams.Add("BackupLimit", oGame.BackupLimit)
|
||||
hshParams.Add("FileType", oGame.FileType)
|
||||
hshParams.Add("ExcludeList", oGame.ExcludeList)
|
||||
hshParams.Add("Hours", oGame.Hours)
|
||||
@@ -448,10 +441,6 @@ Public Class mgrMonitorList
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.MonitorGame) = clsGame.eOptionalSyncFields.MonitorGame Then
|
||||
hshParams.Add("Enabled", oGame.Enabled)
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.TimeStamp) = clsGame.eOptionalSyncFields.TimeStamp Then
|
||||
hshParams.Add("TimeStamp", oGame.AppendTimeStamp)
|
||||
hshParams.Add("BackupLimit", oGame.BackupLimit)
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.Version) = clsGame.eOptionalSyncFields.Version Then
|
||||
hshParams.Add("Version", oGame.Version)
|
||||
End If
|
||||
@@ -491,7 +480,7 @@ Public Class mgrMonitorList
|
||||
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub SyncMonitorLists(ByVal oSettings As mgrSettings, Optional ByVal bToRemote As Boolean = True)
|
||||
Public Shared Sub SyncMonitorLists(ByVal oSettings As mgrSettings, Optional ByVal bToRemote As Boolean = True, Optional ByVal bSyncProtection As Boolean = True)
|
||||
Dim hshCompareFrom As Hashtable
|
||||
Dim hshCompareTo As Hashtable
|
||||
Dim hshSyncItems As Hashtable
|
||||
@@ -520,11 +509,15 @@ Public Class mgrMonitorList
|
||||
End If
|
||||
|
||||
'Sync Wipe Protection
|
||||
If hshCompareFrom.Count = 0 And hshCompareTo.Count > 0 Then
|
||||
If mgrCommon.ShowMessage(mgrMonitorList_WarningSyncProtection, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
'We will always show this one in the log regardless of setting
|
||||
RaiseEvent UpdateLog(mgrMonitorList_ErrorSyncCancel, False, ToolTipIcon.Warning, True)
|
||||
Exit Sub
|
||||
If bSyncProtection Then
|
||||
If hshCompareFrom.Count = 0 And hshCompareTo.Count > 0 Then
|
||||
Cursor.Current = Cursors.Default
|
||||
If mgrCommon.ShowMessage(mgrMonitorList_WarningSyncProtection, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
'We will always show this one in the log regardless of setting
|
||||
RaiseEvent UpdateLog(mgrMonitorList_ErrorSyncCancel, False, ToolTipIcon.Warning, True)
|
||||
Exit Sub
|
||||
End If
|
||||
Cursor.Current = Cursors.WaitCursor
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -778,6 +771,8 @@ Public Class mgrMonitorList
|
||||
If Not IsDBNull(dr("Path")) Then oGame.Path = CStr(dr("Path"))
|
||||
oGame.AbsolutePath = CBool(dr("AbsolutePath"))
|
||||
oGame.FolderSave = CBool(dr("FolderSave"))
|
||||
oGame.AppendTimeStamp = CBool(dr("TimeStamp"))
|
||||
oGame.BackupLimit = CInt(dr("BackupLimit"))
|
||||
If Not IsDBNull(dr("FileType")) Then oGame.FileType = CStr(dr("FileType"))
|
||||
If Not IsDBNull(dr("ExcludeList")) Then oGame.ExcludeList = CStr(dr("ExcludeList"))
|
||||
oGame.MonitorOnly = CBool(dr("MonitorOnly"))
|
||||
|
||||
+40
-12
@@ -202,6 +202,28 @@ Public Class mgrPath
|
||||
Return sResult
|
||||
End Function
|
||||
|
||||
Public Shared Function CheckSpecialPaths() As Boolean
|
||||
Dim hshEnvs As New Hashtable
|
||||
Dim bNoError As Boolean = True
|
||||
|
||||
hshEnvs.Add("Documents", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))
|
||||
hshEnvs.Add("AppDataRoaming", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData))
|
||||
hshEnvs.Add("AppDataLocal", Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData))
|
||||
If Not mgrCommon.IsUnix Then
|
||||
hshEnvs.Add("UserData", Environment.GetFolderPath(Environment.SpecialFolder.UserProfile))
|
||||
hshEnvs.Add("PublicDocuments", Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments))
|
||||
End If
|
||||
|
||||
For Each de As DictionaryEntry In hshEnvs
|
||||
If de.Value = String.Empty Then
|
||||
mgrCommon.ShowMessage(mgrPath_SpecialPathError, de.Key, MsgBoxStyle.Critical)
|
||||
bNoError = False
|
||||
End If
|
||||
Next
|
||||
|
||||
Return bNoError
|
||||
End Function
|
||||
|
||||
Public Shared Function ReplaceSpecialPaths(sValue As String) As String
|
||||
Dim sMyDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||
Dim sPublicDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)
|
||||
@@ -246,39 +268,45 @@ Public Class mgrPath
|
||||
|
||||
Public Shared Function ReverseSpecialPaths(sValue As String) As String
|
||||
Dim sMyDocs As String = "*mydocs*"
|
||||
Dim sEnvMyDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||
Dim sPublicDocs As String = "*publicdocs*"
|
||||
Dim sAppDataRoaming As String = "*appdatalocal*"
|
||||
Dim sAppDataLocal As String = "*appdataroaming*"
|
||||
Dim sEnvPublicDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)
|
||||
Dim sAppDataLocal As String = "*appdatalocal*"
|
||||
Dim sEnvAppDataLocal As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
|
||||
Dim sAppDataRoaming As String = "*appdataroaming*"
|
||||
Dim sEnvAppDataRoaming As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
|
||||
Dim sCurrentUser As String = "*currentuser*"
|
||||
Dim sEnvCurrentUser As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
|
||||
Dim oCustomVariable As clsPathVariable
|
||||
|
||||
|
||||
For Each oCustomVariable In hshCustomVariables.Values
|
||||
If sValue.Contains(oCustomVariable.Path) Then
|
||||
Return sValue.Replace(oCustomVariable.Path, oCustomVariable.FormattedName)
|
||||
End If
|
||||
Next
|
||||
|
||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) Then
|
||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), sAppDataLocal)
|
||||
If sValue.Contains(sEnvAppDataRoaming) Then
|
||||
Return sValue.Replace(sEnvAppDataRoaming, sAppDataRoaming)
|
||||
End If
|
||||
|
||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)) Then
|
||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), sAppDataRoaming)
|
||||
If sValue.Contains(sEnvAppDataLocal) Then
|
||||
Return sValue.Replace(sEnvAppDataLocal, sAppDataLocal)
|
||||
End If
|
||||
|
||||
'This needs to be tested last for Unix compatability
|
||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)) Then
|
||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), sMyDocs)
|
||||
If sValue.Contains(sEnvMyDocs) Then
|
||||
Return sValue.Replace(sEnvMyDocs, sMyDocs)
|
||||
End If
|
||||
|
||||
'Don't use these in Unix
|
||||
If Not mgrCommon.IsUnix Then
|
||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)) Then
|
||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments), sPublicDocs)
|
||||
If sValue.Contains(sEnvPublicDocs) Then
|
||||
Return sValue.Replace(sEnvPublicDocs, sPublicDocs)
|
||||
End If
|
||||
|
||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)) Then
|
||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), sCurrentUser)
|
||||
If sValue.Contains(sEnvCurrentUser) Then
|
||||
Return sValue.Replace(sEnvCurrentUser, sCurrentUser)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Public Class mgrSettings
|
||||
Private s7zArguments As String = String.Empty
|
||||
Private s7zLocation As String = String.Empty
|
||||
Private sBackupFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).TrimEnd(New Char() {"\", "/"})
|
||||
Private eSyncFields As clsGame.eOptionalSyncFields = clsGame.eOptionalSyncFields.None Or clsGame.eOptionalSyncFields.TimeStamp
|
||||
Private eSyncFields As clsGame.eOptionalSyncFields = clsGame.eOptionalSyncFields.None
|
||||
Private eMessages As eSuppressMessages = eSuppressMessages.None
|
||||
Private bAutoSaveLog As Boolean = False
|
||||
Private bBackupOnLaunch As Boolean = True
|
||||
|
||||
@@ -33,6 +33,8 @@ Public Class mgrXML
|
||||
oGame.AbsolutePath = g.AbsolutePath
|
||||
oGame.Path = g.Path
|
||||
oGame.FolderSave = g.FolderSave
|
||||
oGame.AppendTimeStamp = g.AppendTimeStamp
|
||||
oGame.BackupLimit = g.BackupLimit
|
||||
oGame.FileType = g.FileType
|
||||
oGame.ExcludeList = g.ExcludeList
|
||||
oGame.MonitorOnly = g.MonitorOnly
|
||||
|
||||
@@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.1.0.*")>
|
||||
<Assembly: AssemblyFileVersion("1.1.0.0")>
|
||||
<Assembly: AssemblyVersion("1.1.4.*")>
|
||||
<Assembly: AssemblyFileVersion("1.1.4.0")>
|
||||
|
||||
<Assembly: NeutralResourcesLanguageAttribute("en")>
|
||||
Generated
+39
-12
@@ -2698,7 +2698,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Items are semi-colon delimited..
|
||||
''' Looks up a localized string similar to Items are colon delimited..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmIncludeExclude_RawEditInfo() As String
|
||||
Get
|
||||
@@ -2877,15 +2877,6 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to This tool removes orphaned backup information from the local manifest based on the current backup folder. Data can become orphaned when backups are deleted by various computers that share the same backup folder on a cloud or network.[BR][BR]When alternating between different backup folders you should NOT use this tool.[BR][BR]Do you wish to proceed?.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_ConfirmManifestClean() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmMain_ConfirmManifestClean", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Do you wish to cancel the monitoring of [PARAM]?[BR][BR]Warning: When monitoring is cancelled, session time is NOT saved..
|
||||
'''</summary>
|
||||
@@ -3084,6 +3075,24 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to An error occured while obtaining the details of the detected game..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_ErrorGameDetails() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmMain_ErrorGameDetails", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to An error occured while extracting the executable icon..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_ErrorGameIcon() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmMain_ErrorGameIcon", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to An unexpected error occured while initializing GBM.[BR][BR][PARAM][BR][BR]Do you wish to continue anyway? (Not Recommended).
|
||||
'''</summary>
|
||||
@@ -3562,7 +3571,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to A manaul backup of [PARAM] was triggered..
|
||||
''' Looks up a localized string similar to A manual backup of [PARAM] was triggered..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_ManualBackup() As String
|
||||
Get
|
||||
@@ -5620,7 +5629,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to The manifest shows the backup folder contains a backup for [PARAM] that has not been restored on this computer.[BR][BR]Do you want to overwrite this file anyway?.
|
||||
''' Looks up a localized string similar to The manifest shows the backup folder contains a more recent backup for [PARAM] that has not been restored on this computer.[BR][BR]Do you want to overwrite this file anyway?.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property mgrBackup_ConfirmManifestConflict() As String
|
||||
Get
|
||||
@@ -5637,6 +5646,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to A file with the same name already exists in the backup folder.[BR][BR]This game stores saves in a relative location, you may need to restore the current backup if the game was recently re-installed.[BR][BR]Do you want to overwrite this file?.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property mgrBackup_ConfirmOverwriteRelative() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("mgrBackup_ConfirmOverwriteRelative", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Backup aborted due to lack of disk space..
|
||||
'''</summary>
|
||||
@@ -6051,6 +6069,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to An error occured while determining a required system path. [BR][BR]The environment value for [PARAM] is empty.[BR][BR]The application will now exit..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property mgrPath_SpecialPathError() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("mgrPath_SpecialPathError", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] backup restored..
|
||||
'''</summary>
|
||||
|
||||
@@ -133,9 +133,6 @@
|
||||
<data name="frmMain_ManifestTotalRemoved" xml:space="preserve">
|
||||
<value>[PARAM] entries were removed from the local manifest.</value>
|
||||
</data>
|
||||
<data name="frmMain_ConfirmManifestClean" xml:space="preserve">
|
||||
<value>This tool removes orphaned backup information from the local manifest based on the current backup folder. Data can become orphaned when backups are deleted by various computers that share the same backup folder on a cloud or network.[BR][BR]When alternating between different backup folders you should NOT use this tool.[BR][BR]Do you wish to proceed?</value>
|
||||
</data>
|
||||
<data name="frmMain_ConfirmRebuild" xml:space="preserve">
|
||||
<value>This will rebuild all databases and shrink them to an optimal size.[BR]This should only be used if your gbm.s3db files are becoming very large.[BR][BR]Do you wish to continue?</value>
|
||||
</data>
|
||||
@@ -269,7 +266,7 @@
|
||||
<value>Last Game: [PARAM]</value>
|
||||
</data>
|
||||
<data name="frmMain_ManualBackup" xml:space="preserve">
|
||||
<value>A manaul backup of [PARAM] was triggered.</value>
|
||||
<value>A manual backup of [PARAM] was triggered.</value>
|
||||
</data>
|
||||
<data name="frmMain_MasterListChanged" xml:space="preserve">
|
||||
<value>The master game list has been changed by a program other than GBM.</value>
|
||||
@@ -986,7 +983,7 @@
|
||||
<value>Individual Files</value>
|
||||
</data>
|
||||
<data name="frmIncludeExclude_RawEditInfo" xml:space="preserve">
|
||||
<value>Items are semi-colon delimited.</value>
|
||||
<value>Items are colon delimited.</value>
|
||||
</data>
|
||||
<data name="frmIncludeExclude_RawEditTitle" xml:space="preserve">
|
||||
<value>[PARAM] Raw Edit</value>
|
||||
@@ -1283,7 +1280,7 @@
|
||||
<value>[PARAM] backup completed with warnings.</value>
|
||||
</data>
|
||||
<data name="mgrBackup_ConfirmManifestConflict" xml:space="preserve">
|
||||
<value>The manifest shows the backup folder contains a backup for [PARAM] that has not been restored on this computer.[BR][BR]Do you want to overwrite this file anyway?</value>
|
||||
<value>The manifest shows the backup folder contains a more recent backup for [PARAM] that has not been restored on this computer.[BR][BR]Do you want to overwrite this file anyway?</value>
|
||||
</data>
|
||||
<data name="mgrBackup_ConfirmOverwrite" xml:space="preserve">
|
||||
<value>A file with the same name already exists in the backup folder.[BR][BR]Do you want to overwrite this file?</value>
|
||||
@@ -2188,4 +2185,16 @@
|
||||
<data name="frmSettings_lstSettings_Startup" xml:space="preserve">
|
||||
<value>Startup</value>
|
||||
</data>
|
||||
<data name="mgrBackup_ConfirmOverwriteRelative" xml:space="preserve">
|
||||
<value>A file with the same name already exists in the backup folder.[BR][BR]This game stores saves in a relative location, you may need to restore the current backup if the game was recently re-installed.[BR][BR]Do you want to overwrite this file?</value>
|
||||
</data>
|
||||
<data name="mgrPath_SpecialPathError" xml:space="preserve">
|
||||
<value>An error occured while determining a required system path. [BR][BR]The environment value for [PARAM] is empty.[BR][BR]The application will now exit.</value>
|
||||
</data>
|
||||
<data name="frmMain_ErrorGameDetails" xml:space="preserve">
|
||||
<value>An error occured while obtaining the details of the detected game.</value>
|
||||
</data>
|
||||
<data name="frmMain_ErrorGameIcon" xml:space="preserve">
|
||||
<value>An error occured while extracting the executable icon.</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 170 KiB After Width: | Height: | Size: 358 KiB |
+12
-85
@@ -1,98 +1,25 @@
|
||||
Game Backup Monitor v1.1.0 Readme
|
||||
Game Backup Monitor v1.1.4 Readme
|
||||
http://mikemaximus.github.io/gbm-web/
|
||||
gamebackupmonitor@gmail.com
|
||||
|
||||
April 1, 2018
|
||||
August 25th, 2018
|
||||
|
||||
New in 1.1.0
|
||||
|
||||
Disclaimer:
|
||||
|
||||
Version 1.1.0 makes fundamental changes to how GBM works with game configurations and backup data, in addition to many other updates. Read the changes below carefully before upgrading.
|
||||
|
||||
I've done my best to make sure the upgrade process allows everyone to continue using their existing data and configurations.
|
||||
|
||||
However, users who are sharing a backup folder between multiple PCs may experience data loss at some point due to the changes in this version. Please read "Known Issue #1" in this file for details.
|
||||
New in 1.1.4
|
||||
|
||||
All Platforms:
|
||||
|
||||
- Core Design Changes (Game Configuration)
|
||||
- Game ID is now exposed to the user and can be changed. This feature is mainly for developer and contributer usage.
|
||||
- Game ID is generated automatically by GBM or acquired from an import, the user doesn't need to set it unless they want to.
|
||||
- Game ID (instead of Game Name) can now be used to name backup files and folders.
|
||||
- GBM will continue to use the name by default for ease of use.
|
||||
- This behavior can be toggled in the "Backup and Restore" section of Settings.
|
||||
- Using the game Name for backup files has a minor risk associated with it. See "Known Issue #2 and #4" for more details.
|
||||
- Game Name can now contain any character.
|
||||
- When a game is deleted via Game Manager (or sync), all backup manifest entries for that particular game are now deleted. The backup files themselves are not.
|
||||
- The Game Manager now syncs changes to the remote database immediately, instead of only when closed.
|
||||
- Changed method of handling required OS environment paths and added a new path check on startup.
|
||||
- Incorrect conflict warnings will no longer be shown in some situations when running a backup configuration with "Save Multiple Backups" enabled.
|
||||
- Fixed the precision of "Total Hours" on the Session Viewer, it now always rounds to 2 decimal places.
|
||||
|
||||
- Feature Additions & Changes
|
||||
- Added Regular Expression support for game detection.
|
||||
- This feature allows GBM to detect games based on a pattern instead of a single process name.
|
||||
- This allows GBM to better support games that run from multiple executables and games that use interpreters or emulators.
|
||||
- Use the new "Regular Expression" checkbox on the Game Manager and enter the pattern in the "Process" field.
|
||||
- GBM will validate patterns and offer to help troubleshoot (using regexr.com) when validation fails.
|
||||
- Added the ability to start another process (or multiple processes) whenever a game is detected. (Thanks for the suggestion Naliel Supremo)
|
||||
- This is useful to automatically start utilities, such as custom control schemes or overlays when a specific game is detected.
|
||||
- The "Process Manager" allows you to manage any programs you'd like to launch.
|
||||
- The "Processes..." button on the Game Manager allows you to assign processes to any selected game.
|
||||
- A process can be set to end when the game is closed.
|
||||
- Processes and related settings are specific to the local machine only. They are not synced to the backup folder and are not part of the import/export.
|
||||
- Added "Backup GBM data files on launch" to the settings. A long overdue feature, this will backup both the remote and local databases (as gbm.s3db.launch.bak) each time GBM starts.
|
||||
- This new setting is enabled by default.
|
||||
- Only one backup is kept, the prior one will be overwritten.
|
||||
- Added the ability to display messages or warnings that can be suppressed after one view. These messages can be reset via the Settings screen.
|
||||
- The "Enable Sync" feature is now mandatory and the option been removed from Settings.
|
||||
- The "Clean Local Manifest" feature has been removed. It is not required because manfiest entries are no longer orphaned by design. Existing orphaned entries will be removed during the v1.1.0 database upgrade.
|
||||
- Added "Sync Game IDs" feature. This allows the user to update their game configuration identifiers to match the official list or an export file.
|
||||
- This is mainly an optional upgrade tool for users with existing data from older versions. It allows the import feature to properly recognize and update game configurations.
|
||||
- The sync is based on similarly named game configurations, therefore it's not 100% effective. Some games may be missed and require manual changes.
|
||||
- If you share a backup folder with multiple PCs, this feature will cause some data loss when the new IDs are synced to the other PCs. See "Known Issue #1"
|
||||
- Added "Disable sync event messages" to the settings. This will remove all sync related information messages in the log.
|
||||
- This new setting is enabled by default.
|
||||
- Sync messages can cause a lot of useless clutter in the log and are not useful to most users.
|
||||
- Re-organized the Setting screen to clear up some space for the future.
|
||||
Windows:
|
||||
|
||||
- Import / Export Changes
|
||||
- GBM now uses the Game ID to determine if a game is new or has an updated configuration.
|
||||
- GBM will offer to "Sync Game IDs" when importing from the official list after upgrading to v1.1.0.
|
||||
- This allows the import to recognize and update your configurations from older versions.
|
||||
- This offer only appears once and only appears for users that have upgraded from an older version.
|
||||
- Added icons to the import list to indicate a "New" or "Updated" game.
|
||||
- GBM will no longer keep an open file handle on detected processes and custom icons.
|
||||
|
||||
- Updated session CSV export to adhere to RFC 4180. It now handles commas, quotes and line breaks correctly.
|
||||
Linux:
|
||||
|
||||
Windows Only:
|
||||
|
||||
- Updated 7-Zip to v18.01
|
||||
|
||||
Linux Only:
|
||||
|
||||
- GBM now uses notify-send (libnotify) if it's available to display notifications on Linux.
|
||||
- Mono style notifications will be displayed if notify-send is not available.
|
||||
- The GBM icon will be displayed on notifications if it's been installed via the makefile or a package installer.
|
||||
|
||||
Known Issues:
|
||||
|
||||
1. If one or more Game IDs are changed (manually or via Game ID Sync) on one computer and these changes are synced to another PC sharing the same backup folder, the following data will be lost.
|
||||
- The local session data on that PC for the changed game(s) will be lost.
|
||||
- The local backup manifest data for the changed game(s) on that PC will be lost. GBM will see any backups for the changed game(s) as new and will handle them accordingly.
|
||||
- Any processes assigned to the changed games(s) on that PC will be lost.
|
||||
Once your PCs are back in sync, this will no longer be an issue unless you are constantly changing your Game IDs, which is not recommended.
|
||||
2. Backup files are not being renamed or removed when a new backup is created.
|
||||
- This happens on the first backup after toggling between using the Name or ID for your file names. It's best to choose one setting and stick with it.
|
||||
3. The error "The requested operation requires elevation" occurs when GBM tries to launch a process associated with a game.
|
||||
- This means the process you're trying to launch with GBM requires administrator privilege.
|
||||
- Click the blue "user" icon on the bottom left of the GBM window to quickly switch to administrator mode.
|
||||
4. Game configurations using the same name, and configurations that end up with the same name when special characters are stripped will overwrite each other's backup files.
|
||||
- For most users this should be a non-issue. Toggle "Use Game ID for folder and file names" to on in the Settings screen if this is a problem for you.
|
||||
|
||||
Important Notices:
|
||||
|
||||
1. Configurations on the official game lists are no longer compatible with older GBM versions.
|
||||
- Configurations can now use Regular Expressions to detect when a game is running, which old versions of GBM will not understand how to handle.
|
||||
- Configurations can now use any character in the game name, which may cause backups to fail in old versions of GBM.
|
||||
- The last official lists compatible with v1.0.7 and prior versions are archived and available to download from http://mikemaximus.github.io/gbm-web/archive.html for users who wish to stay on an older version.
|
||||
- Sorting by "Hours" in the Session Viewer will no longer crash GBM on certain systems.
|
||||
- GBM no longer attempts to get icons from a Linux binary.
|
||||
- Removed compression from GBM icon to prevent issues with recent versions of imagemagick.
|
||||
|
||||
The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html
|
||||
Binary file not shown.
Binary file not shown.
@@ -9,7 +9,9 @@ Game Backup Monitor is a simple, but flexible application that detects games as
|
||||
**Platform**: Windows (.NET 4) & Linux (Mono)
|
||||
|
||||
[About Game Backup Monitor](http://mikemaximus.github.io/gbm-web/about.html) <br />
|
||||
[Contribute to Game Backup Monitor](http://mikemaximus.github.io/gbm-web/contribute.html) <br />
|
||||
[Game Backup Monitor FAQ](http://mikemaximus.github.io/gbm-web/faq.html) <br />
|
||||
[Game Backup Monitor Manual](http://mikemaximus.github.io/gbm-web/manual.html) <br />
|
||||
[List of Preconfigured Games](http://mikemaximus.github.io/gbm-web/GBM_Official.xml) <br /> <br />
|
||||
[Preconfigured Windows Games](http://mikemaximus.github.io/gbm-web/GBM_Official.xml) <br />
|
||||
[Preconfigured Linux Games](http://mikemaximus.github.io/gbm-web/GBM_Official_Linux.xml) <br /> <br />
|
||||
Updates regarding this project are available via the [Game Backup Monitor web site](http://mikemaximus.github.io/gbm-web/).
|
||||
|
||||
@@ -1,22 +1,45 @@
|
||||
#!/bin/sh -e
|
||||
#check for all dependencies
|
||||
for prog in mono readlink df 7za;do
|
||||
[ -n "`whereis -b ${prog} | cut -sd' ' -f2`" ] || (echo "Please install ${prog}" && exit 1);
|
||||
done
|
||||
for lib in libsqlite3;do
|
||||
[ -n "`ldconfig -p | grep ${lib}`" ] || (echo "Please install ${lib}" && exit 1);
|
||||
done
|
||||
dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
||||
echo "Located in ${dir}";
|
||||
gbmpath='./';
|
||||
#locate GBM.exe
|
||||
if [ "${dir}" = '/usr/bin' ] && [ -s '/usr/share/gbm/GBM.exe' ]; then
|
||||
gbmpath='/usr/share/gbm/';
|
||||
elif [ "${dir}" = '/usr/local/bin' ] && [ -s '/usr/local/share/gbm/GBM.exe' ]; then
|
||||
gbmpath='/usr/local/share/gbm/';
|
||||
elif [ ! -s './GBM.exe' ]; then
|
||||
echo 'GBM.exe not found';
|
||||
exit 2;
|
||||
# prepare
|
||||
if [ -z "${XDG_DATA_HOME}" ]; then
|
||||
XDG_DATA_HOME="${HOME}/.local/share"
|
||||
fi
|
||||
mkdir -p "${XDG_DATA_HOME}/gbm"
|
||||
pidfile="${XDG_DATA_HOME}/gbm/pid"
|
||||
|
||||
# check whether pid file exists and process is running
|
||||
if ( ! [ -e "${pidfile}" ] || ! pgrep -F "${pidfile}" ); then
|
||||
|
||||
# check for all dependencies
|
||||
for prog in mono readlink df 7za;do
|
||||
[ -n "`whereis -b ${prog} | cut -sd' ' -f2`" ] || (echo "Please install ${prog}" && exit 1);
|
||||
done
|
||||
for lib in libsqlite3;do
|
||||
[ -n "`ldconfig -p | grep ${lib}`" ] || (echo "Please install ${lib}" && exit 1);
|
||||
done
|
||||
|
||||
# directory this script is located in
|
||||
dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
||||
echo "Located in ${dir}";
|
||||
gbmpath='./';
|
||||
|
||||
# locate GBM.exe
|
||||
if [ "${dir}" = '/usr/bin' ] && [ -s '/usr/share/gbm/GBM.exe' ]; then
|
||||
gbmpath='/usr/share/gbm/';
|
||||
elif [ "${dir}" = '/usr/local/bin' ] && [ -s '/usr/local/share/gbm/GBM.exe' ]; then
|
||||
gbmpath='/usr/local/share/gbm/';
|
||||
elif [ ! -s './GBM.exe' ]; then
|
||||
echo 'GBM.exe not found';
|
||||
exit 2;
|
||||
fi
|
||||
|
||||
# pass our arguments to GBM and run it in background
|
||||
mono --desktop "${gbmpath}GBM.exe" "$@" &
|
||||
# store pid and wait for process to end
|
||||
echo $! > "${pidfile}"
|
||||
wait $!
|
||||
rm "${pidfile}"
|
||||
exit $?;
|
||||
else
|
||||
echo "GBM is already running"
|
||||
exit 1;
|
||||
fi
|
||||
mono --desktop ${gbmpath}'GBM.exe' "$@";
|
||||
exit $?;
|
||||
|
||||
Reference in New Issue
Block a user