Skip to content

Commit

Permalink
Merge pull request #310 from MikeMaximus/v139
Browse files Browse the repository at this point in the history
V139
  • Loading branch information
MikeMaximus authored May 28, 2024
2 parents ac6f0df + d96b1c1 commit d260f61
Show file tree
Hide file tree
Showing 15 changed files with 66 additions and 44 deletions.
3 changes: 0 additions & 3 deletions GBM/Forms/frmGameManager.vb
Original file line number Diff line number Diff line change
Expand Up @@ -1927,9 +1927,6 @@ Public Class frmGameManager
tmFilterTimer = New Timer()
tmFilterTimer.Interval = 1000
tmFilterTimer.Enabled = False

'Handlers
AddHandler mgrSync.PushEnded, AddressOf LoadBackupData
End Sub

Private Sub frmGameManager_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Expand Down
11 changes: 4 additions & 7 deletions GBM/Forms/frmMain.vb
Original file line number Diff line number Diff line change
Expand Up @@ -1556,11 +1556,8 @@ Public Class frmMain
End Sub

Private Sub QueueSyncWatcher() Handles oFileWatcher.Changed
'This is the easiest (but probably sloppiest) way to block unnecessary sync calls after the remote db is updated by GBM itself.
If eCurrentStatus <> eStatus.Paused And eCurrentStatus <> eStatus.Monitoring Then
tmFileWatcherQueue.Stop()
tmFileWatcherQueue.Start()
End If
tmFileWatcherQueue.Stop()
tmFileWatcherQueue.Start()
End Sub

Private Sub HandleSyncWatcher() Handles tmFileWatcherQueue.Elapsed
Expand Down Expand Up @@ -1805,8 +1802,8 @@ Public Class frmMain
StartSyncWatcher()

AddHandler mgrSync.UpdateLog, AddressOf UpdateLog
AddHandler mgrSync.PushStarted, AddressOf StopSyncWatcher
AddHandler mgrSync.PushEnded, AddressOf StartSyncWatcher
AddHandler mgrSQLite.DatabaseOpened, AddressOf StopSyncWatcher
AddHandler mgrSQLite.DatabaseClosed, AddressOf StartSyncWatcher

bInitComplete = True
End If
Expand Down
16 changes: 8 additions & 8 deletions GBM/Game Backup Monitor.vbproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
Expand All @@ -13,7 +13,7 @@
<AssemblyName>GBM</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>WindowsForms</MyType>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<IsWebBootstrapper>false</IsWebBootstrapper>
Expand Down Expand Up @@ -110,11 +110,11 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>References\Mono.Data.Sqlite.dll</HintPath>
</Reference>
<Reference Include="NHotkey, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a76ffb086700b11c, processorArchitecture=MSIL">
<HintPath>..\packages\NHotkey.2.1.1\lib\net45\NHotkey.dll</HintPath>
<Reference Include="NHotkey, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a76ffb086700b11c, processorArchitecture=MSIL">
<HintPath>..\packages\NHotkey.3.0.0\lib\net462\NHotkey.dll</HintPath>
</Reference>
<Reference Include="NHotkey.WindowsForms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a76ffb086700b11c, processorArchitecture=MSIL">
<HintPath>..\packages\NHotkey.WindowsForms.2.1.1\lib\net45\NHotkey.WindowsForms.dll</HintPath>
<Reference Include="NHotkey.WindowsForms, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a76ffb086700b11c, processorArchitecture=MSIL">
<HintPath>..\packages\NHotkey.WindowsForms.3.0.0\lib\net462\NHotkey.WindowsForms.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
Expand All @@ -123,8 +123,8 @@
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="YamlDotNet, Version=13.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
<HintPath>..\packages\YamlDotNet.13.7.1\lib\net45\YamlDotNet.dll</HintPath>
<Reference Include="YamlDotNet, Version=15.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
<HintPath>..\packages\YamlDotNet.15.1.4\lib\net47\YamlDotNet.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions GBM/Managers/mgrCommon.vb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Imports System.Text.RegularExpressions
Public Class mgrCommon

'These need to be updated when upgrading the packaged 7z utility
Private Shared sUtility64Hash As String = "356BEA8B6E9EB84DFA0DD8674E7C03428C641A47789DF605C5BEA0730DE4AED2" 'v23.01 7za.exe x64
Private Shared sUtility32Hash As String = "F00836A63BE7EBF14E1B8C40100C59777FE3432506B330927EA1F1B7FD47EE44" 'v23.01 7za.exe x86
Private Shared sUtility64Hash As String = "3FEBE53A8C52113C24D6319A5013C89D644E081E488635640BFC72210A6C60AB" 'v24.06 7za.exe x64
Private Shared sUtility32Hash As String = "BB6B9F15FF2FC1B938693BE31965D50C23BD79244C013F0223F2E39FE08944CE" 'v24.06 7za.exe x86
Private Shared sBlackList As String() = {"dosbox", "scummvm", "java", "python", "python.real", "python2.7", "mono", "wine"}

Public Enum eSounds As Integer
Expand Down
28 changes: 25 additions & 3 deletions GBM/Managers/mgrMonitorList.vb
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,9 @@ Public Class mgrMonitorList
End If

'Handle Quick Filter
Dim sValidFields As String() = {"Name", "Process", "Parameter", "Path", "Version", "Company", "Comments"}
Dim bRefined As Boolean

If Not sQuickFilter = String.Empty Then
If eFilterType = frmFilter.eFilterType.BaseFilter And oFilters.Count = 0 Then
sSQL &= " WHERE "
Expand All @@ -489,10 +492,29 @@ Public Class mgrMonitorList
sSQL &= "MonitorID IN (SELECT MonitorID FROM gametags NATURAL JOIN tags WHERE tags.Name=@QuickTag COLLATE NOCASE)"
hshParams.Add("QuickTag", sQuickFilter.Remove(0, 1))
Else
sSQL &= "MonitorID IN (SELECT MonitorID FROM monitorlist WHERE Name LIKE @QuickName)"
hshParams.Add("QuickName", "%" & sQuickFilter & "%")
bRefined = False

'Use a refined search
For Each sField As String In sValidFields
If sQuickFilter.StartsWith(sField & ":") Then
bRefined = True
sSQL &= "MonitorID IN (SELECT MonitorID FROM monitorlist WHERE " & sField & " LIKE @QuickQuery)"
hshParams.Add("QuickQuery", "%" & sQuickFilter.Remove(0, sField.Length + 1) & "%")
End If
Next

'Use a wide search
If Not bRefined Then
sSQL &= "MonitorID IN (SELECT MonitorID FROM monitorlist WHERE "
For Each sField As String In sValidFields
sSQL &= sField & " LIKE @QuickQuery OR "
Next
sSQL &= "MonitorID IN (SELECT MonitorID FROM gametags NATURAL JOIN tags WHERE tags.Name=@QuickTag COLLATE NOCASE))"
hshParams.Add("QuickQuery", "%" & sQuickFilter & "%")
hshParams.Add("QuickTag", sQuickFilter)
End If
End If
End If
End If

'Handle Sorting
sSQL &= sSort
Expand Down
5 changes: 5 additions & 0 deletions GBM/Managers/mgrSQLite.vb
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ Public Class mgrSQLite
Private eDatabase As Database
Private db As SqliteConnection

Public Shared Event DatabaseOpened()
Public Shared Event DatabaseClosed()

Public Sub New(ByVal eSelectDB As Database)
Select Case eSelectDB
Case Database.Local
Expand Down Expand Up @@ -259,10 +262,12 @@ Public Class mgrSQLite
CreateDB()
db.Open()
End If
RaiseEvent DatabaseOpened()
End Sub

Public Sub Disconnect()
db.Close()
RaiseEvent DatabaseClosed()
End Sub

Private Sub RollBack(ByRef trans As SqliteTransaction)
Expand Down
6 changes: 0 additions & 6 deletions GBM/Managers/mgrSync.vb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ Public Class mgrSync
Private Shared Property SyncThread As Thread

Public Shared Event UpdateLog(sLogUpdate As String, bTrayUpdate As Boolean, objIcon As System.Windows.Forms.ToolTipIcon, bTimeStamp As Boolean)
Public Shared Event PushStarted()
Public Shared Event PushEnded()

'Sync Functions
Public Shared Sub DoListAddUpdateSync(ByVal hshGames As Hashtable, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local,
Expand Down Expand Up @@ -179,8 +177,6 @@ Public Class mgrSync
Dim oToItem As clsGame
Dim iChanges As Integer

If oSyncOptions.ToRemote Then RaiseEvent PushStarted()

If Not mgrSettings.DisableSyncMessages Then
If oSyncOptions.ToRemote Then
RaiseEvent UpdateLog(mgrMonitorList_SyncToMaster, False, ToolTipIcon.Info, True)
Expand Down Expand Up @@ -260,8 +256,6 @@ Public Class mgrSync
If Not mgrSettings.DisableSyncMessages Then
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrMonitorList_SyncChanges, (hshDeleteItems.Count + hshSyncItems.Count + iChanges).ToString), False, ToolTipIcon.Info, True)
End If

If oSyncOptions.ToRemote Then RaiseEvent PushEnded()
End Sub

'Other Functions
Expand Down
4 changes: 2 additions & 2 deletions GBM/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.3.8.*")>
<Assembly: AssemblyFileVersion("1.3.8.0")>
<Assembly: AssemblyVersion("1.3.9.*")>
<Assembly: AssemblyFileVersion("1.3.9.0")>

<Assembly: NeutralResourcesLanguageAttribute("en")>
Binary file modified GBM/Utilities/x64/7za.exe
Binary file not shown.
Binary file modified GBM/Utilities/x86/7za.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion GBM/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
</sharedListeners>
</system.diagnostics>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
6 changes: 3 additions & 3 deletions GBM/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NHotkey" version="2.1.1" targetFramework="net45" />
<package id="NHotkey.WindowsForms" version="2.1.1" targetFramework="net45" />
<package id="YamlDotNet" version="13.7.1" targetFramework="net45" />
<package id="NHotkey" version="3.0.0" targetFramework="net472" />
<package id="NHotkey.WindowsForms" version="3.0.0" targetFramework="net472" />
<package id="YamlDotNet" version="15.1.4" targetFramework="net472" />
</packages>
25 changes: 16 additions & 9 deletions GBM/readme.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
Game Backup Monitor v1.3.8 Readme
Game Backup Monitor v1.3.9 Readme
https://mikemaximus.github.io/gbm-web/
[email protected]

December 21, 2023
May 28, 2024

New in 1.3.8
New in 1.3.9

All Platforms:

- Updated YamlDotNet to 13.7.1.
- Game Backup Monitor is now built for .NET v4.8.
- Improved how GBM detects when other software has modified it's manifest database.
- Improved quick search (Main Window and Game Manager)
- The default quick search is now wide, using most text fields and tags.
- These fields currently include: Name, Process, Parameter, Path, Version, Company, Comments.
- You can now do a refined quick search by prepending it with the field name (case-sensitive) and a colon. Ex. Name:Doom or Company:Sega
- A refined tag search is still supported by prepending with a hashtag, Ex. #GOG
- You cannot combine refined searches in a single quick search, use the "Custom Filter" on the Game Manager for complex queries.
- Updated NHotkey to 3.0.0.
- Updated YamlDotNet to 15.1.4.

Windows:

- Updated SQLite to 3.44.2.
- Updated 7-Zip to 24.06.
- Updated SQLite to 3.45.3.
- Installers are now built with NSIS 3.10.

Linux:

- Stopped a ghost window from appearing on startup when the "Start Minimized" option is used.

The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html
Binary file modified GBM/x64/sqlite3.dll
Binary file not shown.
Binary file modified GBM/x86/sqlite3.dll
Binary file not shown.

0 comments on commit d260f61

Please sign in to comment.