27 Commits

Author SHA1 Message Date
MikeMaximus
85588686cd Updated readme.txt for v106 2018-01-15 11:28:07 -06:00
Michael J. Seiferling
2cab8b7ec4 Stop resetting filters on session delete 2018-01-05 22:52:15 -06:00
MikeMaximus
93361bcd87 Fixed ignoring sessions 2018-01-01 10:57:23 -06:00
MikeMaximus
a89fdceb1a Fixed bad practice issues with sessions 2018-01-01 09:56:12 -06:00
MikeMaximus
fa2910e184 Updated version and copyright 2018-01-01 09:06:57 -06:00
MikeMaximus
ef6df6e89e Updated credits.txt 2018-01-01 09:05:29 -06:00
MikeMaximus
36af55cacc Added Start with Windows setting admin warning 2017-12-29 14:21:27 -06:00
MikeMaximus
f6a5d7bba1 Update makefile
Change deb DESTDIR
2017-12-29 14:05:12 -06:00
MikeMaximus
27917f5859 Merge pull request #118 from basxto/master
Add debian package
2017-12-29 14:01:35 -06:00
MikeMaximus
2c8e0a1275 Fix for session delete 2017-12-28 13:18:10 -06:00
MikeMaximus
04f7b76456 Reset settings form to normal DPI 2017-12-27 20:05:34 -06:00
MikeMaximus
477c1fa623 Changes for issue #117 2017-12-27 19:51:54 -06:00
MikeMaximus
a5d7d6697a Changes for issue #115 2017-12-27 17:03:00 -06:00
MikeMaximus
b1e6e7a9e6 Changes for issue #116 2017-12-27 16:23:50 -06:00
Sebastian Riedel
c8db7ae4e4 Correct run path for package manager installation 2017-12-27 15:31:06 +01:00
Sebastian Riedel
f9a9074e56 Adapt to changed package directory name 2017-12-27 14:42:02 +01:00
Sebastian Riedel
77df7cf3dc Merge branch 'deb' 2017-12-27 14:34:37 +01:00
Sebastian Riedel
1122499609 Update icon and application database after install 2017-12-27 14:33:31 +01:00
Sebastian Riedel
ecedda0779 Build .deb package with 'make deb' 2017-12-19 01:24:12 +01:00
MikeMaximus
40e36aaafd Merge pull request #113 from basxto/master
Start GBM via script
2017-12-18 15:41:36 -06:00
Sebastian Riedel
3c72799ceb Fix script path detection 2017-12-18 22:36:35 +01:00
Sebastian Riedel
0779132be9 Avoid wrong paths 2017-12-18 21:25:03 +01:00
Sebastian Riedel
35cb711ca1 Remove BASHisms from start script 2017-12-18 21:14:41 +01:00
Sebastian Riedel
aacda9eeb9 Use changeable paths 2017-12-15 01:20:10 +01:00
Sebastian Riedel
1ec5439c5d Fix checking for needed libraries 2017-12-14 23:19:55 +01:00
Sebastian Riedel
ebd7081b29 Merge github.com:MikeMaximus/gbm 2017-12-10 03:20:35 +01:00
Sebastian Riedel
03becc209c Run GBM.exe with a script 2017-11-19 22:31:55 +01:00
17 changed files with 301 additions and 141 deletions
Vendored
+1 -2
View File
@@ -188,5 +188,4 @@ _Pvt_Extensions/
ModelManifest.xml ModelManifest.xml
/.vs/slnx.sqlite /.vs/slnx.sqlite
/.vs/VSWorkspaceState.json /.vs/VSWorkspaceState.json
/.vs/Game Backup Monitor/v15/sqlite3/storage.ide /.vs/Game Backup Monitor/v15
/.vs/Game Backup Monitor/v15/sqlite3/storage.ide-journal
+30 -17
View File
@@ -1,9 +1,8 @@
Public Class clsSession Public Class clsSession
Private sMonitorID As String Private sMonitorID As String
Private dStart As DateTime Private iStart As Int64
Private dEnd As DateTime Private iEnd As Int64
Private sComputerName As String = My.Computer.Name
Public Property MonitorID As String Public Property MonitorID As String
Set(value As String) Set(value As String)
@@ -14,31 +13,45 @@
End Get End Get
End Property End Property
Public Property SessionStart As DateTime Public Property SessionStart As Int64
Set(value As Int64)
iStart = value
End Set
Get
Return iStart
End Get
End Property
Public WriteOnly Property SessionStartFromDate As DateTime
Set(value As DateTime) Set(value As DateTime)
dStart = value iStart = mgrCommon.DateToUnix(value)
End Set End Set
End Property
Public ReadOnly Property SessionStartFormatted As DateTime
Get Get
Return dStart Return mgrCommon.UnixToDate(iStart)
End Get End Get
End Property End Property
Public Property SessionEnd As DateTime Public Property SessionEnd As Int64
Set(value As Int64)
iEnd = value
End Set
Get
Return iEnd
End Get
End Property
Public WriteOnly Property SessionEndFromDate As DateTime
Set(value As DateTime) Set(value As DateTime)
dEnd = value iEnd = mgrCommon.DateToUnix(value)
End Set End Set
Get
Return dEnd
End Get
End Property End Property
Public Property ComputerName As String Public ReadOnly Property SessionEndFormatted As DateTime
Set(value As String)
sComputerName = value
End Set
Get Get
Return sComputerName Return mgrCommon.UnixToDate(iEnd)
End Get End Get
End Property End Property
End Class End Class
+11 -8
View File
@@ -294,7 +294,7 @@ Public Class frmMain
OperationStarted(False) OperationStarted(False)
If oProcess.GameInfo.MonitorOnly = False Then If oProcess.GameInfo.MonitorOnly = False Then
If SupressBackup() Then If SupressSession() Then
bDoBackup = False bDoBackup = False
UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.Name), False) UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.Name), False)
SetLastAction(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.CroppedName)) SetLastAction(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.CroppedName))
@@ -715,17 +715,20 @@ Public Class frmMain
End Sub End Sub
Private Sub HandleSession() Private Sub HandleSession()
Dim oSession As New clsSession Dim oSession As clsSession
'Record Session If Not SupressSession() Then
oSession.MonitorID = oProcess.GameInfo.ID 'Record Session
oSession.SessionStart = oProcess.StartTime oSession = New clsSession
oSession.SessionEnd = oProcess.EndTime oSession.MonitorID = oProcess.GameInfo.ID
oSession.SessionStartFromDate = oProcess.StartTime
oSession.SessionEndFromDate = oProcess.EndTime
mgrSessions.AddSession(oSession) mgrSessions.AddSession(oSession)
End If
End Sub End Sub
Private Function SupressBackup() As Boolean Private Function SupressSession() As Boolean
Dim iSession As Integer Dim iSession As Integer
If oSettings.SupressBackup Then If oSettings.SupressBackup Then
iSession = Math.Ceiling(oProcess.TimeSpent.TotalMinutes) iSession = Math.Ceiling(oProcess.TimeSpent.TotalMinutes)
+70 -7
View File
@@ -1,19 +1,41 @@
Imports GBM.My.Resources Imports GBM.My.Resources
Imports System.Globalization Imports System.Globalization
Imports System.ComponentModel
Public Class frmSessions Public Class frmSessions
Private bInitFinished As Boolean = False Private bInitFinished As Boolean = False
Private WithEvents tmFilterTimer As Timer Private WithEvents tmFilterTimer As Timer
Private bStartSortAsc As Boolean = True
Private iStartDataCol As Integer
Private iStartDisplayCol As Integer
Private bEndSortAsc As Boolean = True
Private iEndDataCol As Integer
Private iEndDisplayCol As Integer
Private Sub FormatGrid() Private Sub FormatGrid()
'Build Columns
dgSessions.Columns.Add("MonitorID", frmSessions_ColumnMonitorID) dgSessions.Columns.Add("MonitorID", frmSessions_ColumnMonitorID)
dgSessions.Columns.Add("Name", frmSessions_ColumnGameName) dgSessions.Columns.Add("Name", frmSessions_ColumnGameName)
dgSessions.Columns.Add("StartUnix", frmSessions_ColumnStart)
dgSessions.Columns.Add("Start", frmSessions_ColumnStart) dgSessions.Columns.Add("Start", frmSessions_ColumnStart)
dgSessions.Columns.Add("EndUnix", frmSessions_ColumnEnd)
dgSessions.Columns.Add("End", frmSessions_ColumnEnd) dgSessions.Columns.Add("End", frmSessions_ColumnEnd)
'Hide the ID 'Get Column Indexes
iStartDataCol = dgSessions.Columns.IndexOf(dgSessions.Columns("StartUnix"))
iStartDisplayCol = dgSessions.Columns.IndexOf(dgSessions.Columns("Start"))
iEndDataCol = dgSessions.Columns.IndexOf(dgSessions.Columns("EndUnix"))
iEndDisplayCol = dgSessions.Columns.IndexOf(dgSessions.Columns("End"))
'Set Sorting
dgSessions.Columns("Start").SortMode = DataGridViewColumnSortMode.Programmatic
dgSessions.Columns("End").SortMode = DataGridViewColumnSortMode.Programmatic
'Hide Columns
dgSessions.Columns("MonitorID").Visible = False dgSessions.Columns("MonitorID").Visible = False
dgSessions.Columns("StartUnix").Visible = False
dgSessions.Columns("EndUnix").Visible = False
End Sub End Sub
Private Sub LoadData() Private Sub LoadData()
@@ -30,7 +52,7 @@ Public Class frmSessions
dgSessions.Rows.Clear() dgSessions.Rows.Clear()
For Each dr As DataRow In oData.Tables(0).Rows For Each dr As DataRow In oData.Tables(0).Rows
dgSessions.Rows.Add(New Object() {dr("MonitorID"), dr("Name"), mgrCommon.UnixToDate(dr("Start")), mgrCommon.UnixToDate(dr("End"))}) dgSessions.Rows.Add(New Object() {dr("MonitorID"), dr("Name"), dr("Start"), mgrCommon.UnixToDate(dr("Start")), dr("End"), mgrCommon.UnixToDate(dr("End"))})
Next Next
dgSessions.AutoResizeColumns() dgSessions.AutoResizeColumns()
@@ -51,14 +73,18 @@ Public Class frmSessions
tmFilterTimer.Interval = 1000 tmFilterTimer.Interval = 1000
tmFilterTimer.Enabled = False tmFilterTimer.Enabled = False
End Sub End Sub
Private Sub ResetFilterFields() Private Sub ResetFilterFields()
Dim dtMinDate As DateTime = mgrSessions.GetMinimumDateTime Dim dtMinDate As DateTime = mgrSessions.GetMinimumDateTime
Dim dtMaxDate As DateTime = mgrSessions.GetMaximumDateTime Dim dtMaxDate As DateTime = mgrSessions.GetMaximumDateTime
Dim dtRecent As DateTime = dtMaxDate.Subtract(TimeSpan.FromDays(7))
Dim sDateTimeFormat = CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern & " " & CultureInfo.CurrentCulture.DateTimeFormat.LongTimePattern Dim sDateTimeFormat = CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern & " " & CultureInfo.CurrentCulture.DateTimeFormat.LongTimePattern
If dtRecent < dtMinDate Then
dtRecent = dtMinDate
End If
bInitFinished = False bInitFinished = False
'Init Date Fields 'Init Date Fields
@@ -75,7 +101,7 @@ Public Class frmSessions
dtpEnd.MaxDate = dtMaxDate dtpEnd.MaxDate = dtMaxDate
End If End If
dtpStart.Value = dtMinDate dtpStart.Value = dtRecent
dtpEnd.Value = dtMaxDate dtpEnd.Value = dtMaxDate
'Init Text Filter 'Init Text Filter
@@ -85,6 +111,7 @@ Public Class frmSessions
End Sub End Sub
Private Sub Reset() Private Sub Reset()
ClearManualSortGlyphs()
ResetFilterFields() ResetFilterFields()
LoadData() LoadData()
End Sub End Sub
@@ -96,8 +123,8 @@ Public Class frmSessions
For Each dgvRow As DataGridViewRow In dgSessions.SelectedRows For Each dgvRow As DataGridViewRow In dgSessions.SelectedRows
oSession = New clsSession oSession = New clsSession
oSession.MonitorID = dgvRow.Cells(0).Value oSession.MonitorID = dgvRow.Cells(0).Value
oSession.SessionStart = dgvRow.Cells(2).Value oSession.SessionStart = CInt(dgvRow.Cells(iStartDataCol).Value)
oSession.SessionEnd = dgvRow.Cells(3).Value oSession.SessionEnd = CInt(dgvRow.Cells(iEndDataCol).Value)
oSessions.Add(oSession) oSessions.Add(oSession)
Next Next
@@ -106,6 +133,38 @@ Public Class frmSessions
End If End If
End Sub End Sub
Private Sub ClearManualSortGlyphs()
dgSessions.Columns(iStartDisplayCol).HeaderCell.SortGlyphDirection = SortOrder.None
dgSessions.Columns(iEndDisplayCol).HeaderCell.SortGlyphDirection = SortOrder.None
End Sub
Private Function GetSortOrder(ByVal bToggle As Boolean, ByVal iCol As Integer) As ListSortDirection
Dim oSortType As ListSortDirection
If bToggle Then
oSortType = ListSortDirection.Ascending
dgSessions.Columns(iCol).HeaderCell.SortGlyphDirection = SortOrder.Ascending
Else
oSortType = ListSortDirection.Descending
dgSessions.Columns(iCol).HeaderCell.SortGlyphDirection = SortOrder.Descending
End If
Return oSortType
End Function
Private Sub HandleSort(ByVal iCol As Integer)
ClearManualSortGlyphs()
Select Case iCol
Case iStartDisplayCol
bStartSortAsc = Not bStartSortAsc
dgSessions.Sort(dgSessions.Columns(iCol), GetSortOrder(bStartSortAsc, iCol))
Case iEndDisplayCol
bEndSortAsc = Not bEndSortAsc
dgSessions.Sort(dgSessions.Columns(iCol), GetSortOrder(bEndSortAsc, iCol))
End Select
End Sub
Private Sub frmSession_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub frmSession_Load(sender As Object, e As EventArgs) Handles MyBase.Load
SetForm() SetForm()
ResetFilterFields() ResetFilterFields()
@@ -146,8 +205,12 @@ Public Class frmSessions
If dgSessions.SelectedRows.Count > 0 Then If dgSessions.SelectedRows.Count > 0 Then
If mgrCommon.ShowMessage(frmSessions_ConfirmDelete, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then If mgrCommon.ShowMessage(frmSessions_ConfirmDelete, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
DeleteSession() DeleteSession()
Reset() LoadData()
End If End If
End If End If
End Sub End Sub
Private Sub dgSessions_ColumnHeaderMouseClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles dgSessions.ColumnHeaderMouseClick
HandleSort(e.ColumnIndex)
End Sub
End Class End Class
+61 -61
View File
@@ -50,9 +50,6 @@ Partial Class frmSettings
Me.lbl7zProduct = New System.Windows.Forms.Label() Me.lbl7zProduct = New System.Windows.Forms.Label()
Me.btnDefaults = New System.Windows.Forms.Button() Me.btnDefaults = New System.Windows.Forms.Button()
Me.pnlBackup = New System.Windows.Forms.Panel() Me.pnlBackup = New System.Windows.Forms.Panel()
Me.lblMinutes = New System.Windows.Forms.Label()
Me.nudSupressBackupThreshold = New System.Windows.Forms.NumericUpDown()
Me.chkSupressBackup = New System.Windows.Forms.CheckBox()
Me.chkBackupConfirm = New System.Windows.Forms.CheckBox() Me.chkBackupConfirm = New System.Windows.Forms.CheckBox()
Me.chkOverwriteWarning = New System.Windows.Forms.CheckBox() Me.chkOverwriteWarning = New System.Windows.Forms.CheckBox()
Me.grpBackupHandling = New System.Windows.Forms.GroupBox() Me.grpBackupHandling = New System.Windows.Forms.GroupBox()
@@ -63,19 +60,22 @@ Partial Class frmSettings
Me.grp7zAdvanced = New System.Windows.Forms.GroupBox() Me.grp7zAdvanced = New System.Windows.Forms.GroupBox()
Me.grp7zInformation = New System.Windows.Forms.GroupBox() Me.grp7zInformation = New System.Windows.Forms.GroupBox()
Me.pnlGeneral = New System.Windows.Forms.Panel() Me.pnlGeneral = New System.Windows.Forms.Panel()
Me.lblMinutes = New System.Windows.Forms.Label()
Me.nudSupressBackupThreshold = New System.Windows.Forms.NumericUpDown()
Me.chkSupressBackup = New System.Windows.Forms.CheckBox()
Me.grpGameData = New System.Windows.Forms.GroupBox() Me.grpGameData = New System.Windows.Forms.GroupBox()
Me.lstSettings = New System.Windows.Forms.ListBox()
Me.chkSessionTracking = New System.Windows.Forms.CheckBox() Me.chkSessionTracking = New System.Windows.Forms.CheckBox()
Me.lstSettings = New System.Windows.Forms.ListBox()
Me.grpStartup.SuspendLayout() Me.grpStartup.SuspendLayout()
Me.grpFolderOptions.SuspendLayout() Me.grpFolderOptions.SuspendLayout()
Me.grp7zGeneral.SuspendLayout() Me.grp7zGeneral.SuspendLayout()
Me.pnlBackup.SuspendLayout() Me.pnlBackup.SuspendLayout()
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).BeginInit()
Me.grpBackupHandling.SuspendLayout() Me.grpBackupHandling.SuspendLayout()
Me.pnl7z.SuspendLayout() Me.pnl7z.SuspendLayout()
Me.grp7zAdvanced.SuspendLayout() Me.grp7zAdvanced.SuspendLayout()
Me.grp7zInformation.SuspendLayout() Me.grp7zInformation.SuspendLayout()
Me.pnlGeneral.SuspendLayout() Me.pnlGeneral.SuspendLayout()
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).BeginInit()
Me.grpGameData.SuspendLayout() Me.grpGameData.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
@@ -124,10 +124,10 @@ Partial Class frmSettings
'chkAutoSaveLog 'chkAutoSaveLog
' '
Me.chkAutoSaveLog.AutoSize = True Me.chkAutoSaveLog.AutoSize = True
Me.chkAutoSaveLog.Location = New System.Drawing.Point(12, 228) Me.chkAutoSaveLog.Location = New System.Drawing.Point(12, 251)
Me.chkAutoSaveLog.Name = "chkAutoSaveLog" Me.chkAutoSaveLog.Name = "chkAutoSaveLog"
Me.chkAutoSaveLog.Size = New System.Drawing.Size(231, 17) Me.chkAutoSaveLog.Size = New System.Drawing.Size(231, 17)
Me.chkAutoSaveLog.TabIndex = 3 Me.chkAutoSaveLog.TabIndex = 5
Me.chkAutoSaveLog.Text = "Autosave log when max length is exceeded" Me.chkAutoSaveLog.Text = "Autosave log when max length is exceeded"
Me.chkAutoSaveLog.UseVisualStyleBackColor = True Me.chkAutoSaveLog.UseVisualStyleBackColor = True
' '
@@ -136,7 +136,7 @@ Partial Class frmSettings
Me.btnOptionalFields.Location = New System.Drawing.Point(103, 61) Me.btnOptionalFields.Location = New System.Drawing.Point(103, 61)
Me.btnOptionalFields.Name = "btnOptionalFields" Me.btnOptionalFields.Name = "btnOptionalFields"
Me.btnOptionalFields.Size = New System.Drawing.Size(134, 23) Me.btnOptionalFields.Size = New System.Drawing.Size(134, 23)
Me.btnOptionalFields.TabIndex = 2 Me.btnOptionalFields.TabIndex = 3
Me.btnOptionalFields.Text = "Choose &Optional Fields..." Me.btnOptionalFields.Text = "Choose &Optional Fields..."
Me.btnOptionalFields.UseVisualStyleBackColor = True Me.btnOptionalFields.UseVisualStyleBackColor = True
' '
@@ -156,17 +156,17 @@ Partial Class frmSettings
Me.chkSync.Location = New System.Drawing.Point(6, 65) Me.chkSync.Location = New System.Drawing.Point(6, 65)
Me.chkSync.Name = "chkSync" Me.chkSync.Name = "chkSync"
Me.chkSync.Size = New System.Drawing.Size(98, 17) Me.chkSync.Size = New System.Drawing.Size(98, 17)
Me.chkSync.TabIndex = 1 Me.chkSync.TabIndex = 2
Me.chkSync.Text = "Enable syncing" Me.chkSync.Text = "Enable syncing"
Me.chkSync.UseVisualStyleBackColor = True Me.chkSync.UseVisualStyleBackColor = True
' '
'chkShowDetectionTips 'chkShowDetectionTips
' '
Me.chkShowDetectionTips.AutoSize = True Me.chkShowDetectionTips.AutoSize = True
Me.chkShowDetectionTips.Location = New System.Drawing.Point(12, 205) Me.chkShowDetectionTips.Location = New System.Drawing.Point(12, 228)
Me.chkShowDetectionTips.Name = "chkShowDetectionTips" Me.chkShowDetectionTips.Name = "chkShowDetectionTips"
Me.chkShowDetectionTips.Size = New System.Drawing.Size(159, 17) Me.chkShowDetectionTips.Size = New System.Drawing.Size(159, 17)
Me.chkShowDetectionTips.TabIndex = 2 Me.chkShowDetectionTips.TabIndex = 4
Me.chkShowDetectionTips.Text = "Show detection notifications" Me.chkShowDetectionTips.Text = "Show detection notifications"
Me.chkShowDetectionTips.UseVisualStyleBackColor = True Me.chkShowDetectionTips.UseVisualStyleBackColor = True
' '
@@ -337,9 +337,6 @@ Partial Class frmSettings
' '
'pnlBackup 'pnlBackup
' '
Me.pnlBackup.Controls.Add(Me.lblMinutes)
Me.pnlBackup.Controls.Add(Me.nudSupressBackupThreshold)
Me.pnlBackup.Controls.Add(Me.chkSupressBackup)
Me.pnlBackup.Controls.Add(Me.chkBackupConfirm) Me.pnlBackup.Controls.Add(Me.chkBackupConfirm)
Me.pnlBackup.Controls.Add(Me.chkOverwriteWarning) Me.pnlBackup.Controls.Add(Me.chkOverwriteWarning)
Me.pnlBackup.Controls.Add(Me.grpBackupHandling) Me.pnlBackup.Controls.Add(Me.grpBackupHandling)
@@ -349,37 +346,10 @@ Partial Class frmSettings
Me.pnlBackup.Size = New System.Drawing.Size(367, 314) Me.pnlBackup.Size = New System.Drawing.Size(367, 314)
Me.pnlBackup.TabIndex = 3 Me.pnlBackup.TabIndex = 3
' '
'lblMinutes
'
Me.lblMinutes.AutoSize = True
Me.lblMinutes.Location = New System.Drawing.Point(286, 228)
Me.lblMinutes.Name = "lblMinutes"
Me.lblMinutes.Size = New System.Drawing.Size(43, 13)
Me.lblMinutes.TabIndex = 14
Me.lblMinutes.Text = "minutes"
'
'nudSupressBackupThreshold
'
Me.nudSupressBackupThreshold.Location = New System.Drawing.Point(229, 226)
Me.nudSupressBackupThreshold.Maximum = New Decimal(New Integer() {999, 0, 0, 0})
Me.nudSupressBackupThreshold.Name = "nudSupressBackupThreshold"
Me.nudSupressBackupThreshold.Size = New System.Drawing.Size(51, 20)
Me.nudSupressBackupThreshold.TabIndex = 5
'
'chkSupressBackup
'
Me.chkSupressBackup.AutoSize = True
Me.chkSupressBackup.Location = New System.Drawing.Point(6, 228)
Me.chkSupressBackup.Name = "chkSupressBackup"
Me.chkSupressBackup.Size = New System.Drawing.Size(217, 17)
Me.chkSupressBackup.TabIndex = 4
Me.chkSupressBackup.Text = "Backup only when session time exceeds"
Me.chkSupressBackup.UseVisualStyleBackColor = True
'
'chkBackupConfirm 'chkBackupConfirm
' '
Me.chkBackupConfirm.AutoSize = True Me.chkBackupConfirm.AutoSize = True
Me.chkBackupConfirm.Location = New System.Drawing.Point(6, 180) Me.chkBackupConfirm.Location = New System.Drawing.Point(14, 180)
Me.chkBackupConfirm.Name = "chkBackupConfirm" Me.chkBackupConfirm.Name = "chkBackupConfirm"
Me.chkBackupConfirm.Size = New System.Drawing.Size(160, 17) Me.chkBackupConfirm.Size = New System.Drawing.Size(160, 17)
Me.chkBackupConfirm.TabIndex = 2 Me.chkBackupConfirm.TabIndex = 2
@@ -389,7 +359,7 @@ Partial Class frmSettings
'chkOverwriteWarning 'chkOverwriteWarning
' '
Me.chkOverwriteWarning.AutoSize = True Me.chkOverwriteWarning.AutoSize = True
Me.chkOverwriteWarning.Location = New System.Drawing.Point(6, 204) Me.chkOverwriteWarning.Location = New System.Drawing.Point(14, 203)
Me.chkOverwriteWarning.Name = "chkOverwriteWarning" Me.chkOverwriteWarning.Name = "chkOverwriteWarning"
Me.chkOverwriteWarning.Size = New System.Drawing.Size(139, 17) Me.chkOverwriteWarning.Size = New System.Drawing.Size(139, 17)
Me.chkOverwriteWarning.TabIndex = 3 Me.chkOverwriteWarning.TabIndex = 3
@@ -402,9 +372,9 @@ Partial Class frmSettings
Me.grpBackupHandling.Controls.Add(Me.chkRestoreNotify) Me.grpBackupHandling.Controls.Add(Me.chkRestoreNotify)
Me.grpBackupHandling.Controls.Add(Me.chkAutoMark) Me.grpBackupHandling.Controls.Add(Me.chkAutoMark)
Me.grpBackupHandling.Location = New System.Drawing.Point(6, 88) Me.grpBackupHandling.Location = New System.Drawing.Point(6, 88)
Me.grpBackupHandling.Margin = New System.Windows.Forms.Padding(2) Me.grpBackupHandling.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2)
Me.grpBackupHandling.Name = "grpBackupHandling" Me.grpBackupHandling.Name = "grpBackupHandling"
Me.grpBackupHandling.Padding = New System.Windows.Forms.Padding(2) Me.grpBackupHandling.Padding = New System.Windows.Forms.Padding(2, 2, 2, 2)
Me.grpBackupHandling.Size = New System.Drawing.Size(354, 87) Me.grpBackupHandling.Size = New System.Drawing.Size(354, 87)
Me.grpBackupHandling.TabIndex = 1 Me.grpBackupHandling.TabIndex = 1
Me.grpBackupHandling.TabStop = False Me.grpBackupHandling.TabStop = False
@@ -414,7 +384,7 @@ Partial Class frmSettings
' '
Me.chkAutoRestore.AutoSize = True Me.chkAutoRestore.AutoSize = True
Me.chkAutoRestore.Location = New System.Drawing.Point(8, 41) Me.chkAutoRestore.Location = New System.Drawing.Point(8, 41)
Me.chkAutoRestore.Margin = New System.Windows.Forms.Padding(2) Me.chkAutoRestore.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2)
Me.chkAutoRestore.Name = "chkAutoRestore" Me.chkAutoRestore.Name = "chkAutoRestore"
Me.chkAutoRestore.Size = New System.Drawing.Size(190, 17) Me.chkAutoRestore.Size = New System.Drawing.Size(190, 17)
Me.chkAutoRestore.TabIndex = 1 Me.chkAutoRestore.TabIndex = 1
@@ -425,7 +395,7 @@ Partial Class frmSettings
' '
Me.chkRestoreNotify.AutoSize = True Me.chkRestoreNotify.AutoSize = True
Me.chkRestoreNotify.Location = New System.Drawing.Point(8, 19) Me.chkRestoreNotify.Location = New System.Drawing.Point(8, 19)
Me.chkRestoreNotify.Margin = New System.Windows.Forms.Padding(2) Me.chkRestoreNotify.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2)
Me.chkRestoreNotify.Name = "chkRestoreNotify" Me.chkRestoreNotify.Name = "chkRestoreNotify"
Me.chkRestoreNotify.Size = New System.Drawing.Size(216, 17) Me.chkRestoreNotify.Size = New System.Drawing.Size(216, 17)
Me.chkRestoreNotify.TabIndex = 0 Me.chkRestoreNotify.TabIndex = 0
@@ -479,6 +449,9 @@ Partial Class frmSettings
' '
'pnlGeneral 'pnlGeneral
' '
Me.pnlGeneral.Controls.Add(Me.lblMinutes)
Me.pnlGeneral.Controls.Add(Me.nudSupressBackupThreshold)
Me.pnlGeneral.Controls.Add(Me.chkSupressBackup)
Me.pnlGeneral.Controls.Add(Me.chkAutoSaveLog) Me.pnlGeneral.Controls.Add(Me.chkAutoSaveLog)
Me.pnlGeneral.Controls.Add(Me.grpGameData) Me.pnlGeneral.Controls.Add(Me.grpGameData)
Me.pnlGeneral.Controls.Add(Me.chkShowDetectionTips) Me.pnlGeneral.Controls.Add(Me.chkShowDetectionTips)
@@ -488,6 +461,33 @@ Partial Class frmSettings
Me.pnlGeneral.Size = New System.Drawing.Size(367, 314) Me.pnlGeneral.Size = New System.Drawing.Size(367, 314)
Me.pnlGeneral.TabIndex = 1 Me.pnlGeneral.TabIndex = 1
' '
'lblMinutes
'
Me.lblMinutes.AutoSize = True
Me.lblMinutes.Location = New System.Drawing.Point(232, 205)
Me.lblMinutes.Name = "lblMinutes"
Me.lblMinutes.Size = New System.Drawing.Size(43, 13)
Me.lblMinutes.TabIndex = 17
Me.lblMinutes.Text = "minutes"
'
'nudSupressBackupThreshold
'
Me.nudSupressBackupThreshold.Location = New System.Drawing.Point(176, 203)
Me.nudSupressBackupThreshold.Maximum = New Decimal(New Integer() {999, 0, 0, 0})
Me.nudSupressBackupThreshold.Name = "nudSupressBackupThreshold"
Me.nudSupressBackupThreshold.Size = New System.Drawing.Size(51, 20)
Me.nudSupressBackupThreshold.TabIndex = 3
'
'chkSupressBackup
'
Me.chkSupressBackup.AutoSize = True
Me.chkSupressBackup.Location = New System.Drawing.Point(12, 204)
Me.chkSupressBackup.Name = "chkSupressBackup"
Me.chkSupressBackup.Size = New System.Drawing.Size(158, 17)
Me.chkSupressBackup.TabIndex = 2
Me.chkSupressBackup.Text = "Ignore sessions shorter than"
Me.chkSupressBackup.UseVisualStyleBackColor = True
'
'grpGameData 'grpGameData
' '
Me.grpGameData.Controls.Add(Me.chkSessionTracking) Me.grpGameData.Controls.Add(Me.chkSessionTracking)
@@ -501,6 +501,16 @@ Partial Class frmSettings
Me.grpGameData.TabStop = False Me.grpGameData.TabStop = False
Me.grpGameData.Text = "Game Data" Me.grpGameData.Text = "Game Data"
' '
'chkSessionTracking
'
Me.chkSessionTracking.AutoSize = True
Me.chkSessionTracking.Location = New System.Drawing.Point(6, 42)
Me.chkSessionTracking.Name = "chkSessionTracking"
Me.chkSessionTracking.Size = New System.Drawing.Size(138, 17)
Me.chkSessionTracking.TabIndex = 1
Me.chkSessionTracking.Text = "Enable session tracking"
Me.chkSessionTracking.UseVisualStyleBackColor = True
'
'lstSettings 'lstSettings
' '
Me.lstSettings.FormattingEnabled = True Me.lstSettings.FormattingEnabled = True
@@ -509,16 +519,6 @@ Partial Class frmSettings
Me.lstSettings.Size = New System.Drawing.Size(162, 303) Me.lstSettings.Size = New System.Drawing.Size(162, 303)
Me.lstSettings.TabIndex = 0 Me.lstSettings.TabIndex = 0
' '
'chkSessionTracking
'
Me.chkSessionTracking.AutoSize = True
Me.chkSessionTracking.Location = New System.Drawing.Point(6, 42)
Me.chkSessionTracking.Name = "chkSessionTracking"
Me.chkSessionTracking.Size = New System.Drawing.Size(138, 17)
Me.chkSessionTracking.TabIndex = 3
Me.chkSessionTracking.Text = "Enable session tracking"
Me.chkSessionTracking.UseVisualStyleBackColor = True
'
'frmSettings 'frmSettings
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -547,7 +547,6 @@ Partial Class frmSettings
Me.grp7zGeneral.PerformLayout() Me.grp7zGeneral.PerformLayout()
Me.pnlBackup.ResumeLayout(False) Me.pnlBackup.ResumeLayout(False)
Me.pnlBackup.PerformLayout() Me.pnlBackup.PerformLayout()
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).EndInit()
Me.grpBackupHandling.ResumeLayout(False) Me.grpBackupHandling.ResumeLayout(False)
Me.grpBackupHandling.PerformLayout() Me.grpBackupHandling.PerformLayout()
Me.pnl7z.ResumeLayout(False) Me.pnl7z.ResumeLayout(False)
@@ -556,6 +555,7 @@ Partial Class frmSettings
Me.grp7zInformation.ResumeLayout(False) Me.grp7zInformation.ResumeLayout(False)
Me.pnlGeneral.ResumeLayout(False) Me.pnlGeneral.ResumeLayout(False)
Me.pnlGeneral.PerformLayout() Me.pnlGeneral.PerformLayout()
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).EndInit()
Me.grpGameData.ResumeLayout(False) Me.grpGameData.ResumeLayout(False)
Me.grpGameData.PerformLayout() Me.grpGameData.PerformLayout()
Me.ResumeLayout(False) Me.ResumeLayout(False)
@@ -595,9 +595,6 @@ Partial Class frmSettings
Friend WithEvents lstSettings As ListBox Friend WithEvents lstSettings As ListBox
Friend WithEvents grp7zAdvanced As GroupBox Friend WithEvents grp7zAdvanced As GroupBox
Friend WithEvents grp7zInformation As GroupBox Friend WithEvents grp7zInformation As GroupBox
Friend WithEvents lblMinutes As Label
Friend WithEvents nudSupressBackupThreshold As NumericUpDown
Friend WithEvents chkSupressBackup As CheckBox
Friend WithEvents chkBackupConfirm As CheckBox Friend WithEvents chkBackupConfirm As CheckBox
Friend WithEvents chkOverwriteWarning As CheckBox Friend WithEvents chkOverwriteWarning As CheckBox
Friend WithEvents grpBackupHandling As GroupBox Friend WithEvents grpBackupHandling As GroupBox
@@ -605,4 +602,7 @@ Partial Class frmSettings
Friend WithEvents chkAutoRestore As CheckBox Friend WithEvents chkAutoRestore As CheckBox
Friend WithEvents chkRestoreNotify As CheckBox Friend WithEvents chkRestoreNotify As CheckBox
Friend WithEvents chkSessionTracking As CheckBox Friend WithEvents chkSessionTracking As CheckBox
Friend WithEvents lblMinutes As Label
Friend WithEvents nudSupressBackupThreshold As NumericUpDown
Friend WithEvents chkSupressBackup As CheckBox
End Class End Class
+5
View File
@@ -34,6 +34,11 @@ Public Class frmSettings
Private Function ValidateSettings() As Boolean Private Function ValidateSettings() As Boolean
'Show Start with Windows warning if running as admin
If chkStartWindows.Checked And mgrCommon.IsElevated Then
mgrCommon.ShowMessage(frmSettings_WarningAdminStart, MsgBoxStyle.Exclamation)
End If
'Only modify registry key when the value changed 'Only modify registry key when the value changed
If chkStartWindows.Checked <> oSettings.StartWithWindows Then If chkStartWindows.Checked <> oSettings.StartWithWindows Then
HandleRegistryUpdate(chkStartWindows.Checked) HandleRegistryUpdate(chkStartWindows.Checked)
+8 -1
View File
@@ -1,5 +1,12 @@
Game Backup Monitor would like to credit the following people/organizations: Game Backup Monitor would like to credit the following people/organizations:
7-zip - Igor Pavlov Contributors:
Michael J. Seiferling (MikeMaximus) - Design, Programming and Windows Game Configuration Maintainer.
Sebastian Riedel (basxto) - Linux Packaging, Installation and Game Configuration Maintainer.
Special Thanks:
7-Zip - Igor Pavlov
Sixpack Status Icons - JankoAtWarpSpeed.com Sixpack Status Icons - JankoAtWarpSpeed.com
Primo Icon Set - webdesignerdepot.com Primo Icon Set - webdesignerdepot.com
+5 -5
View File
@@ -4,8 +4,8 @@
Dim oSession As New clsSession Dim oSession As New clsSession
oSession.MonitorID = CStr(dr("MonitorID")) oSession.MonitorID = CStr(dr("MonitorID"))
oSession.SessionStart = mgrCommon.UnixToDate(CInt(dr("Start"))) oSession.SessionStart = CInt(dr("Start"))
oSession.SessionEnd = mgrCommon.UnixToDate(CInt(dr("End"))) oSession.SessionEnd = CInt(dr("End"))
Return oSession Return oSession
End Function End Function
@@ -14,8 +14,8 @@
Dim hshParams As New Hashtable Dim hshParams As New Hashtable
hshParams.Add("MonitorID", oSession.MonitorID) hshParams.Add("MonitorID", oSession.MonitorID)
hshParams.Add("Start", mgrCommon.DateToUnix(oSession.SessionStart)) hshParams.Add("Start", oSession.SessionStart)
hshParams.Add("End", mgrCommon.DateToUnix(oSession.SessionEnd)) hshParams.Add("End", oSession.SessionEnd)
Return hshParams Return hshParams
End Function End Function
@@ -80,7 +80,7 @@
For Each oSession As clsSession In oSessions For Each oSession As clsSession In oSessions
hshParams = New Hashtable hshParams = New Hashtable
hshParams.Add("MonitorID", oSession.MonitorID) hshParams.Add("MonitorID", oSession.MonitorID)
hshParams.Add("Start", mgrCommon.DateToUnix(oSession.SessionStart)) hshParams.Add("Start", oSession.SessionStart)
oParamList.Add(hshParams) oParamList.Add(hshParams)
Next Next
+3 -3
View File
@@ -14,7 +14,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyDescription("Game Backup Monitor")> <Assembly: AssemblyDescription("Game Backup Monitor")>
<Assembly: AssemblyCompany("Michael J. Seiferling")> <Assembly: AssemblyCompany("Michael J. Seiferling")>
<Assembly: AssemblyProduct("Game Backup Monitor")> <Assembly: AssemblyProduct("Game Backup Monitor")>
<Assembly: AssemblyCopyright("Copyright © 2017 Michael J. Seiferling")> <Assembly: AssemblyCopyright("Copyright © 2018 Michael J. Seiferling")>
<Assembly: AssemblyTrademark("")> <Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
@@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.5.*")> <Assembly: AssemblyVersion("1.0.6.*")>
<Assembly: AssemblyFileVersion("1.0.5.0")> <Assembly: AssemblyFileVersion("1.0.6.0")>
<Assembly: NeutralResourcesLanguageAttribute("en")> <Assembly: NeutralResourcesLanguageAttribute("en")>
+10 -1
View File
@@ -3958,7 +3958,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to Backup only when session time exceeds. ''' Looks up a localized string similar to Ignore sessions shorter than.
'''</summary> '''</summary>
Friend ReadOnly Property frmSettings_chkSupressBackup() As String Friend ReadOnly Property frmSettings_chkSupressBackup() As String
Get Get
@@ -4155,6 +4155,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to Please note that GBM will not &quot;Start with Windows&quot; as Administrator.[BR][BR]See the Online Manual in the Help menu for details..
'''</summary>
Friend ReadOnly Property frmSettings_WarningAdminStart() As String
Get
Return ResourceManager.GetString("frmSettings_WarningAdminStart", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to Invalid or poorly formatted 7-Zip arguments can cause backup or restore operations to fail.[BR][BR]If problems occur, clear the custom arguments and try again.. ''' Looks up a localized string similar to Invalid or poorly formatted 7-Zip arguments can cause backup or restore operations to fail.[BR][BR]If problems occur, clear the custom arguments and try again..
'''</summary> '''</summary>
+4 -1
View File
@@ -1082,7 +1082,7 @@
<value>Start with Windows</value> <value>Start with Windows</value>
</data> </data>
<data name="frmSettings_chkSupressBackup" xml:space="preserve"> <data name="frmSettings_chkSupressBackup" xml:space="preserve">
<value>Backup only when session time exceeds</value> <value>Ignore sessions shorter than</value>
</data> </data>
<data name="frmSettings_chkSync" xml:space="preserve"> <data name="frmSettings_chkSync" xml:space="preserve">
<value>Enable syncing</value> <value>Enable syncing</value>
@@ -1945,4 +1945,7 @@
<data name="frmSettings_chkSessionTracking" xml:space="preserve"> <data name="frmSettings_chkSessionTracking" xml:space="preserve">
<value>Enable session tracking</value> <value>Enable session tracking</value>
</data> </data>
<data name="frmSettings_WarningAdminStart" xml:space="preserve">
<value>Please note that GBM will not "Start with Windows" as Administrator.[BR][BR]See the Online Manual in the Help menu for details.</value>
</data>
</root> </root>
+18 -16
View File
@@ -1,31 +1,33 @@
Game Backup Monitor v1.0.5 Readme Game Backup Monitor v1.0.6 Readme
http://mikemaximus.github.io/gbm-web/ http://mikemaximus.github.io/gbm-web/
gamebackupmonitor@gmail.com gamebackupmonitor@gmail.com
December 8, 2017 January 15, 2018
New in 1.0.5 New in 1.0.6
All Platforms: All Platforms:
- You can now add Comments to a game configuration. - Session Viewer Updates
- You can now exclude tags and use negative filters on the Game Manager. - The viewer now defaults to show seven days from the last recorded session, instead of all sessions.
- Fixed a bug causing backup size calculations to be incorrect when including sub-folders in a configuration. - Fixed issues with date sorting, it will now sort correctly regardless of format.
- Fixed a bug causing GBM to calculate the backup size of an incorrect location when using a relative path configuration. This could cause very long delays when a backup was running. - The recording of short sessions can now be ignored using a setting.
- XML export files now contain the date, version and amount of configurations. The Import window will now display the date of the XML file in the title bar if applicable. - Changed setting "Backup only when session time exceeds XX minutes" to "Ignore sessions shorter than XX minutes".
- Fixed a bug causing games not to be detected if more than one copy of the process was running. - This setting is now used to ignore recording sessions times (when enabled) in addition to ignoring a backup.
- GBM can now save statistical data from each detected gaming session: - This setting has been moved to the "General" section.
- This feature records the start and end time of each detected gaming session. In future versions more data may be available. - This change requires no update from the user, it will function exactly as it did before.
- You can view session data using the new "Session Viewer" available in the Tools menu.
- This feature is disabled by default. It can be enabled on the Setting screen.
- Session data is stored locally, it is currently not synced with the backup folder.
Windows Only: Windows Only:
- Only one instance of GBM can now be running. - A warning is now displayed if the "Start with Windows" setting is enabled while GBM is running as administrator.
- GBM currently will not "Start with Windows" as administrator when this setting is enabled.
- Please see http://mikemaximus.github.io/gbm-web/gbm_task_scheduler.html for a work-around.
Linux Only: Linux Only:
- Added makefile for easy Linux installation. Thanks basxto! - Enhanced makefile and added start script for Linux installations (basxto)
- GBM is now available on the archlinux user repository. https://aur.archlinux.org/packages/gbm/ (basxto)
- GBM is now available as a deb package for installation. (basxto)
The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html
+9
View File
@@ -0,0 +1,9 @@
Package: gbm
Architecture: all
Maintainer: Sebastian Riedel <git@basxto.de>
Priority: optional
Version: 1.0.5
Homepage: https://mikemaximus.github.io/gbm-web/
Bugs: https://github.com/MikeMaximus/gbm/issues
Depends: mono-vbnc, libsqlite3-0, p7zip-full
Description: Automatically backup your saved games!
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
set -e
XDG_DESKTOP_MENU="`which xdg-desktop-menu 2> /dev/null`"
XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null`"
if [ -x "$XDG_DESKTOP_MENU" ]; then
xdg-desktop-menu forceupdate --mode system;
fi
if [ -x "$XDG_ICON_RESOURCE" ]; then
xdg-icon-resource forceupdate --mode system;
fi
+1 -2
View File
@@ -6,9 +6,8 @@ Name=Game Backup Monitor
Comment=Monitors games and backs up their savegames Comment=Monitors games and backs up their savegames
Comment[de]=Beobachtet Spiele und sichert ihre Spielstände Comment[de]=Beobachtet Spiele und sichert ihre Spielstände
Path=/usr/local/bin
TryExec=mono TryExec=mono
Exec=mono gbm Exec=gbm
Terminal=false Terminal=false
Icon=gbm Icon=gbm
Executable
+22
View File
@@ -0,0 +1,22 @@
#!/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;
fi
mono --desktop ${gbmpath}'GBM.exe' "$@";
exit $?;
+29 -16
View File
@@ -1,31 +1,44 @@
ICONSIZES := 16 24 32 48 64 72 96 128 256 ICONSIZES := 16 24 32 48 64 72 96 128 256
IMGMAGICK := $(shell command -v convert 2> /dev/null) IMGMAGICK := $(shell command -v convert 2> /dev/null)
XDGUTILS := $(shell command -v xdg-desktop-menu 2> /dev/null) DESTDIR :=
PREFIX := usr/local
define \n define \n
endef endef
install: GBM.exe $(foreach size,$(ICONSIZES),gbm_$(size)x$(size).png) install: GBM.exe $(foreach size,$(ICONSIZES),gbm_$(size)x$(size).png)
ifndef XDGUTILS
$(error "xdg-desktop-menu is not available, please install xdg-utils")
endif
#rename it in a way, it can easily started from terminal #rename it in a way, it can easily started from terminal
install GBM.exe /usr/local/bin/gbm; install -d $(DESTDIR)/$(PREFIX)/bin;
install gbm.sh $(DESTDIR)/$(PREFIX)/bin/gbm;
install -d $(DESTDIR)/$(PREFIX)/share/gbm/;
install GBM.exe $(DESTDIR)/$(PREFIX)/share/gbm/;
#install icon in different sizes #install icon in different sizes
$(foreach size,$(ICONSIZES),xdg-icon-resource install --mode system --novendor --noupdate --size $(size) gbm_$(size)x$(size).png gbm;$(\n)) $(foreach size,$(ICONSIZES),install -d $(DESTDIR)/$(PREFIX)/share/icons/hicolor/$(size)x$(size)/apps/;$(\n))
xdg-icon-resource forceupdate --mode system; $(foreach size,$(ICONSIZES),install -m644 gbm_$(size)x$(size).png $(DESTDIR)/$(PREFIX)/share/icons/hicolor/$(size)x$(size)/apps/gbm.png;$(\n))
#install .desktop file, which is used for running gbm from desktop and menus #install .desktop file, which is used for running gbm from desktop and menus
xdg-desktop-menu install --mode system --novendor gbm.desktop; install -d $(DESTDIR)/$(PREFIX)/share/applications/
install -m644 gbm.desktop $(DESTDIR)/$(PREFIX)/share/applications/gbm.desktop
uninstall: /usr/local/bin/gbm ifeq ($(DESTDIR),)
ifndef XDGUTILS -xdg-icon-resource forceupdate --mode system;
$(error "xdg-desktop-menu is not available, please install xdg-utils") -xdg-desktop-menu forceupdate --mode system;
endif endif
rm /usr/local/bin/gbm;
$(foreach size,$(ICONSIZES),xdg-icon-resource uninstall --mode system --novendor --noupdate --size $(size) gbm;$(\n)) uninstall: $(DESTDIR)/$(PREFIX)/bin/gbm
xdg-icon-resource forceupdate --mode system; -rm $(DESTDIR)/$(PREFIX)/bin/gbm;
xdg-desktop-menu uninstall --mode system --novendor gbm.desktop; -rm -r $(DESTDIR)/$(PREFIX)/share/gbm/;
$(foreach size,$(ICONSIZES),-rm $(DESTDIR)/$(PREFIX)/share/icons/hicolor/$(size)x$(size)/apps/gbm.png;$(\n))
-rm $(DESTDIR)/$(PREFIX)/share/applications/gbm.desktop
ifeq ($(DESTDIR),)
-xdg-icon-resource forceupdate --mode system;
-xdg-desktop-menu forceupdate --mode system;
endif
#must be root
deb: DESTDIR := deb-package/gbm
deb: PREFIX := usr
deb: install
cd deb-package;dpkg-deb --build gbm
gbm_%.png: gbm.ico gbm_%.png: gbm.ico
ifndef IMGMAGICK ifndef IMGMAGICK