Skip to content

Commit

Permalink
Updater system tweaked.
Browse files Browse the repository at this point in the history
  • Loading branch information
FellippeHeitor committed Nov 11, 2019
1 parent aceae30 commit 4a58fff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 27 deletions.
16 changes: 3 additions & 13 deletions InForm/UiEditor.bas
Original file line number Diff line number Diff line change
Expand Up @@ -1299,22 +1299,12 @@ SUB __UI_BeforeUpdateDisplay
STATIC updateDescription$

localVersionNumber! = __UI_VersionNumber
localVersionIsBeta%% = __UI_VersionIsBeta

serverVersion$ = ReadSetting("InForm/InFormUpdate.ini", "", "version")
isBeta$ = ReadSetting("InForm/InFormUpdate.ini", "", "beta")
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
CheckUpdateDone = True
END IF
IF VAL(serverVersion$) <= localVersionNumber! THEN
CheckUpdateDone = True
END IF

ThisStep = 3
Expand Down Expand Up @@ -2709,7 +2699,7 @@ SUB __UI_OnLoad
END IF
$ELSE
IF _FILEEXISTS("InForm/updater/InFormUpdater") = False THEN
TriggerUpdaterRecompile = True
TriggerUpdaterRecompile = True
END IF
$END IF
END IF
Expand Down
19 changes: 5 additions & 14 deletions InForm/updater/InFormUpdater.bas
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,13 @@ SUB __UI_BeforeUpdateDisplay STATIC
localVersionNumber! = __UI_VersionNumber
localVersionisBeta%% = __UI_VersionIsBeta
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")
isBeta$ = ReadSetting("InFormUpdate.ini", "", "beta")
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
NextEvent = True: ThisStep = 7: EXIT SUB
END IF
Report "Remote build:" + isBeta$ + serverVersion$

IF VAL(serverVersion$) <= localVersionNumber! THEN
NextEvent = True: ThisStep = 7: EXIT SUB
END IF

thisFile% = 0
Expand Down

0 comments on commit 4a58fff

Please sign in to comment.