1
1
Fork 0
mirror of https://github.com/FellippeHeitor/InForm.git synced 2025-01-15 11:59:34 +00:00

Updater system tweaked.

This commit is contained in:
FellippeHeitor 2019-11-10 23:13:36 -02:00
parent aceae307c2
commit 4a58fffe14
2 changed files with 7 additions and 26 deletions

View file

@ -1299,23 +1299,13 @@ SUB __UI_BeforeUpdateDisplay
STATIC updateDescription$ STATIC updateDescription$
localVersionNumber! = __UI_VersionNumber localVersionNumber! = __UI_VersionNumber
localVersionIsBeta%% = __UI_VersionIsBeta
serverVersion$ = ReadSetting("InForm/InFormUpdate.ini", "", "version") serverVersion$ = ReadSetting("InForm/InFormUpdate.ini", "", "version")
isBeta$ = ReadSetting("InForm/InFormUpdate.ini", "", "beta")
updateDescription$ = ReadSetting("InForm/InFormUpdate.ini", "", "description") updateDescription$ = ReadSetting("InForm/InFormUpdate.ini", "", "description")
IF isBeta$ = "true" THEN isBeta$ = "Beta version " ELSE isBeta$ = ""
serverBeta%% = True
IF localVersionIsBeta%% THEN
IF serverBeta%% AND VAL(serverVersion$) <= localVersionNumber! THEN
CheckUpdateDone = True
END IF
ELSE
IF VAL(serverVersion$) <= localVersionNumber! THEN IF VAL(serverVersion$) <= localVersionNumber! THEN
CheckUpdateDone = True CheckUpdateDone = True
END IF END IF
END IF
ThisStep = 3 ThisStep = 3
EXIT SUB EXIT SUB

View file

@ -71,23 +71,14 @@ SUB __UI_BeforeUpdateDisplay STATIC
localVersionNumber! = __UI_VersionNumber localVersionNumber! = __UI_VersionNumber
localVersionisBeta%% = __UI_VersionIsBeta localVersionisBeta%% = __UI_VersionIsBeta
IF localVersionisBeta%% THEN localBeta$ = " Beta version " ELSE localBeta$ = " " IF localVersionisBeta%% THEN localBeta$ = " Beta version " ELSE localBeta$ = " "
Report "Local version:" + localBeta$ + LTRIM$(STR$(localVersionNumber!)) Report "Local build:" + localBeta$ + LTRIM$(STR$(localVersionNumber!))
serverVersion$ = ReadSetting("InFormUpdate.ini", "", "version") serverVersion$ = ReadSetting("InFormUpdate.ini", "", "version")
isBeta$ = ReadSetting("InFormUpdate.ini", "", "beta") Report "Remote build:" + isBeta$ + serverVersion$
serverBeta%% = False
IF isBeta$ = "true" THEN serverBeta%% = True: isBeta$ = " Beta version " ELSE isBeta$ = " "
Report "Remote version:" + isBeta$ + serverVersion$
IF localVersionisBeta%% THEN
IF serverBeta%% AND VAL(serverVersion$) <= localVersionNumber! THEN
NextEvent = True: ThisStep = 7: EXIT SUB
END IF
ELSE
IF VAL(serverVersion$) <= localVersionNumber! THEN IF VAL(serverVersion$) <= localVersionNumber! THEN
NextEvent = True: ThisStep = 7: EXIT SUB NextEvent = True: ThisStep = 7: EXIT SUB
END IF END IF
END IF
thisFile% = 0 thisFile% = 0
baseUrl$ = ReadSetting("InFormUpdate.ini", "", "baseurl") baseUrl$ = ReadSetting("InFormUpdate.ini", "", "baseurl")