updater should be good now
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
1582
|
||||
1585
|
||||
@@ -58,7 +58,7 @@ class AsyncUpdater {
|
||||
|
||||
progress.curZipProgress = new ZipProgress();
|
||||
ZipUtils.uncompressZip(reader, './', null, progress.curZipProgress);
|
||||
FileSystem.deleteFile(path);
|
||||
// FileSystem.deleteFile(path);
|
||||
}
|
||||
if (executableReplaced = FileSystem.exists('$path$executableName')) {
|
||||
var progPath = Sys.programPath();
|
||||
@@ -93,11 +93,11 @@ class AsyncUpdater {
|
||||
progress.files = 1;
|
||||
progress.step = DOWNLOADING_EXECUTABLE;
|
||||
trace('starting exe download');
|
||||
// doFile([exePath], [executableName], function() {
|
||||
doFile([exePath], [executableName], function() {
|
||||
trace('done, starting installation');
|
||||
installFiles(fileNames);
|
||||
progress.done = true;
|
||||
// });
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ class UpdateScreen extends MusicBeatState {
|
||||
FlxG.sound.music.stop();
|
||||
overSound.play();
|
||||
bf.animation.curAnim.frameRate = 24;
|
||||
bf.animation.play("loading-anim");
|
||||
bf.animation.play("loading-anim", true, false, 1);
|
||||
bf.alpha = 1;
|
||||
FlxG.camera.fade(0xFF000000, overSound.length / 1000, false, function() {
|
||||
if (updater.executableReplaced) {
|
||||
|
||||
@@ -52,7 +52,7 @@ class UpdateUtil {
|
||||
};
|
||||
}
|
||||
|
||||
static var __curVersionPos = 0;
|
||||
static var __curVersionPos = -2;
|
||||
static function __doReleaseFiltering(releases:Array<GitHubRelease>, currentVersionTag:String) {
|
||||
releases = releases.filterReleases(Options.betaUpdates, false);
|
||||
if (releases.length <= 0)
|
||||
@@ -60,24 +60,33 @@ class UpdateUtil {
|
||||
|
||||
var newArray:Array<GitHubRelease> = [];
|
||||
|
||||
var skipNextBinaryChecks:Bool = false;
|
||||
for(index in 0...releases.length) {
|
||||
var i = releases.length - 1 - index;
|
||||
var i = index;
|
||||
|
||||
var release = releases[i];
|
||||
var containsBinary = false;
|
||||
for(asset in release.assets) {
|
||||
if (asset.name.toLowerCase() == AsyncUpdater.executableGitHubName.toLowerCase()) {
|
||||
containsBinary = true;
|
||||
break;
|
||||
var containsBinary = skipNextBinaryChecks;
|
||||
if (!containsBinary) {
|
||||
for(asset in release.assets) {
|
||||
if (asset.name.toLowerCase() == AsyncUpdater.executableGitHubName.toLowerCase()) {
|
||||
containsBinary = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (containsBinary) {
|
||||
skipNextBinaryChecks = true; // no need to check for older versions
|
||||
if (release.tag_name == currentVersionTag) {
|
||||
__curVersionPos = index;
|
||||
__curVersionPos = -1;
|
||||
}
|
||||
newArray.push(release);
|
||||
newArray.insert(0, release);
|
||||
if (__curVersionPos > -2)
|
||||
__curVersionPos++;
|
||||
trace(release.tag_name);
|
||||
}
|
||||
}
|
||||
if (__curVersionPos < -1)
|
||||
__curVersionPos = -1;
|
||||
|
||||
return newArray.length <= 0 ? newArray : newArray.splice(__curVersionPos+1, newArray.length-(__curVersionPos+1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user