@@ -1149,12 +1149,12 @@ public void Cancel()
11491149 App . SoftTerminate ( ErrorCode . ERROR_CANCELLED ) ;
11501150 }
11511151 #endregion
1152-
11531152 #region App Install
11541153 private async Task < bool > CheckForUpdates ( )
11551154 {
11561155 const string LOG_IDENT = "Bootstrapper::CheckForUpdates" ;
11571156
1157+ // Basic safety check: don't update if another instance is already doing it
11581158 if ( Process . GetProcessesByName ( App . ProjectName ) . Length > 1 )
11591159 {
11601160 App . Logger . WriteLine ( LOG_IDENT , $ "More than one { App . ProjectName } instance running, aborting update check.") ;
@@ -1168,30 +1168,21 @@ private async Task<bool> CheckForUpdates()
11681168 if ( releaseInfo is null )
11691169 return false ;
11701170
1171- string currentVer = App . Version ;
11721171 string releaseVer = releaseInfo . TagName ;
11731172
1174- var versionComparison = Utilities . CompareVersions ( currentVer , releaseVer ) ;
1175-
1176- if ( versionComparison == VersionComparison . LessThan )
1177- {
1178- App . Logger . WriteLine ( LOG_IDENT , $ "Update available: { currentVer } -> { releaseVer } ") ;
1173+ // Logic removed: We no longer compare currentVer vs releaseVer.
1174+ // We proceed directly to the update prompt/process.
1175+ App . Logger . WriteLine ( LOG_IDENT , $ "Forcing update to version: { releaseVer } ") ;
11791176
1180- var result = Frontend . ShowMessageBox (
1181- $ "A new version { releaseVer } is available. Would you like to update now?",
1182- MessageBoxImage . Question ,
1183- MessageBoxButton . YesNo
1184- ) ;
1177+ var result = Frontend . ShowMessageBox (
1178+ $ "A new version { releaseVer } is available. Would you like to update now?",
1179+ MessageBoxImage . Question ,
1180+ MessageBoxButton . YesNo
1181+ ) ;
11851182
1186- if ( result != MessageBoxResult . Yes )
1187- {
1188- App . Logger . WriteLine ( LOG_IDENT , "User declined the update." ) ;
1189- return false ;
1190- }
1191- }
1192- else
1183+ if ( result != MessageBoxResult . Yes )
11931184 {
1194- App . Logger . WriteLine ( LOG_IDENT , $ "No update required. Current version: { currentVer } , Release version: { releaseVer } ") ;
1185+ App . Logger . WriteLine ( LOG_IDENT , "User declined the forced update. ") ;
11951186 return false ;
11961187 }
11971188
@@ -1249,12 +1240,12 @@ private async Task<bool> CheckForUpdates()
12491240 var process = Process . Start ( startInfo ) ;
12501241 if ( process == null )
12511242 {
1252- var result = Frontend . ShowMessageBox (
1243+ var failResult = Frontend . ShowMessageBox (
12531244 string . Format ( Strings . Bootstrapper_AutoUpdateFailed , version ) ,
1254- MessageBoxImage . Information ,
1255- MessageBoxButton . YesNo ) ;
1245+ MessageBoxImage . Information ,
1246+ MessageBoxButton . YesNo ) ;
12561247
1257- if ( result == MessageBoxResult . Yes )
1248+ if ( failResult == MessageBoxResult . Yes )
12581249 {
12591250 Utilities . ShellExecute ( App . ProjectDownloadLink ) ;
12601251 }
@@ -1265,15 +1256,15 @@ private async Task<bool> CheckForUpdates()
12651256 }
12661257 catch ( Exception ex )
12671258 {
1268- App . Logger . WriteLine ( LOG_IDENT , "An exception occurred when running the auto-updater " ) ;
1259+ App . Logger . WriteLine ( LOG_IDENT , "An exception occurred during the forced update. " ) ;
12691260 App . Logger . WriteException ( LOG_IDENT , ex ) ;
12701261
1271- var result = Frontend . ShowMessageBox (
1262+ var failResult = Frontend . ShowMessageBox (
12721263 string . Format ( Strings . Bootstrapper_AutoUpdateFailed , version ) ,
12731264 MessageBoxImage . Information ,
12741265 MessageBoxButton . YesNo ) ;
12751266
1276- if ( result == MessageBoxResult . Yes )
1267+ if ( failResult == MessageBoxResult . Yes )
12771268 {
12781269 Utilities . ShellExecute ( App . ProjectDownloadLink ) ;
12791270 }
@@ -1282,7 +1273,6 @@ private async Task<bool> CheckForUpdates()
12821273 return false ;
12831274 }
12841275 #endregion
1285-
12861276 #region Roblox Install
12871277 private static bool TryDeleteRobloxInDirectory ( string dir )
12881278 {
0 commit comments