Skip to content

Commit

Permalink
Remove CONFIG::updater
Browse files Browse the repository at this point in the history
  • Loading branch information
Psycast committed Mar 18, 2024
1 parent 3b139cd commit 47b50ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
4 changes: 0 additions & 4 deletions asconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
"name": "CONFIG::release",
"value": false
},
{
"name": "CONFIG::updater",
"value": true
},
{
"name": "CONFIG::timeStamp",
"value": "\"9999-12-31\""
Expand Down
20 changes: 5 additions & 15 deletions src/Updater.as
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ package
import flash.net.URLLoader;
import flash.net.URLLoaderDataFormat;
import flash.net.URLRequest;
import flash.system.Capabilities;
import flash.utils.ByteArray;

public class Updater
Expand All @@ -21,31 +20,18 @@ package

public static function handle(siteVersion:String, updateURL:String):void
{
if (!siteVersion || !updateURL || didUpdate)
if (!siteVersion || !updateURL || didUpdate || skipUpdate())
return;

// Only Update check once
didUpdate = true;

// Allow Update skipping
if (AirContext.doesFileExist("skip_update.txt") || !(CONFIG::updater) || CONFIG::debug)
return;

var airUpdateCheck:int = compareVersions(siteVersion);

// No Update
if (airUpdateCheck >= 0)
return;

// Updates seems to have worked on other platforms, trust.
/*
if (Capabilities.os.indexOf("Win") < 0)
{
Alert.add(sprintf(_lang.string("air_game_update_available"), {"old": Constant.AIR_VERSION, "new": siteVersion}), 240, Alert.DARK_GREEN);
return;
}
*/

//Alert.add(siteVersion + " " + (airUpdateCheck == -1 ? "&gt;" : (airUpdateCheck == 1 ? "&lt;" : "==")) + " " + Constant.AIR_VERSION, 240);

var swfDownload:URLLoader = new URLLoader();
Expand Down Expand Up @@ -120,5 +106,9 @@ package
return 0;
}

private static function skipUpdate():Boolean
{
return AirContext.doesFileExist("skip_update.txt") || CONFIG::debug;
}
}
}

0 comments on commit 47b50ad

Please sign in to comment.