keep the version check in one place

akkartik
Dec 7, 2024, 11:44 PM
MYEOA76OV2FPEYWVCSLANO62PG4V7KU2I4MRC2JL4AAGWHKSCIWAC

Dependencies

  • [2] CC6INQTA merge quasi-bug
  • [3] D2TYFYG2 Merge text.love
  • [4] UH4YWHW5 button framework is at the app level
  • [5] VMV4LBR4 resolve conflicts
  • [6] OTIBCAUJ love2d scaffold
  • [7] ZNLTRNNK highlight another global
  • [8] CAG7PP5Y Merge text.love
  • [9] 3XQROLSK redo version checks yet again
  • [10] ULKNZUZK resolve conflicts
  • [11] VPRGENLA hide some details within the 'warning' state
  • [12] FJIGUGEC bugfix: version check
  • [13] 7SICLTED check for 'error' mode in a few more places
  • [14] Z4XRNDTR find text
  • [15] 6VJTQKW7 start supporting LÖVE v12
  • [16] MX7YD2WC resolve conflicts
  • [17] AFDLKNAP resolve conflicts
  • [18] 3QQZ7W4E bring couple more globals back to the app level
  • [19] KKMFQDR4 editing source code from within the app
  • [20] 36Z442IV back to commit 8123959e52f without code editing
  • [21] ORKN6EOB Merge lines.love
  • [22] RT6EV6OP delegate update events to drawings
  • [23] J2SVGR2E experiment: blinking cursor
  • [24] AVLAYODP much simpler
  • [25] BYG5CEMV support for naming points
  • [26] 2RWR3GM4 another missed rename
  • [27] K464QQR4 more defensive resize handling
  • [28] LHG2QWSO resolve conflicts
  • [29] 2L5MEZV3 experiment: new edit namespace
  • [30] JCSLDGAH beginnings of support for multiple shapes
  • [31] AVTNUQYR basic test-enabled framework
  • [32] 5FW7YOFT highlight selection while dragging
  • [33] 6VXO3ZL3 just keep the cursor visible after any input events
  • [34] LNUHQOGH start passing in Editor_state explicitly
  • [35] TXDMRA5J bugfix: alt-tab shouldn't emit keypress events
  • [36] APX2PY6G stop tracking wallclock time
  • [37] KVHUFUFV reorg
  • [38] YT5P6TO6 bugfix: save previous file when dropping a new one on
  • [39] 2CTN2IEF Merge lines.love
  • [40] JOPVPUSA editing source code from within the app
  • [41] IM6GSGVZ fix some arg names
  • [42] XGHCLIKB Merge lines.love
  • [43] PP2IIHL6 stop putting button state in a global
  • [44] PJ5PQAQE record support for multiple versions
  • [45] YF2ATH2Q Merge lines.love
  • [46] LXFHXL2N Merge text.love

Change contents

  • edit in main.lua at line 20
    [3.130][2.0:56]()
    -- Available modes: run, version_check
    Mode = 'run'
  • replacement in main.lua at line 84
    [3.289][3.289:410]()
    Mode = 'version_check'
    -- continue initializing everything; hopefully we won't have errors during initialization
    [3.289]
    [3.1113]
    while true do
    love.graphics.origin()
    love.graphics.clear(love.graphics.getBackgroundColor())
    love.graphics.setColor(1,1,0)
    love.graphics.rectangle('fill', 30,30, 400,400)
    love.graphics.setColor(0,0,0)
    love.graphics.printf(("This app hasn't been tested with LÖVE version %s; please switch to version %s if you run into issues. Press any key to continue."):format(Version, Supported_versions[1]), 40,40, 400)
    love.graphics.present()
    if love.event then
    love.event.pump()
    for name, a,b,c,d,e,f in love.event.poll() do
    if name == 'quit' then
    if not love.quit or not love.quit() then
    os.exit(1)
    end
    elseif name == 'keypressed' then
    return
    end
    end
    end
    love.timer.sleep(0.01)
    end
  • edit in main.lua at line 197
    [3.1373][3.319:473](),[3.473][3.411:622](),[3.622][3.664:681](),[3.664][3.664:681]()
    if Mode == 'version_check' then
    love.graphics.setColor(1,1,0)
    love.graphics.rectangle('fill', 30,30, 400,400)
    love.graphics.setColor(0,0,0)
    love.graphics.printf(("This app hasn't been tested with LÖVE version %s; please switch to version %s if you run into issues. Press any key to continue."):format(Version, Supported_versions[1]), 40,40, 400)
    return
    end
  • edit in main.lua at line 201
    [3.1398][3.682:727]()
    if Mode == 'version_check' then return end
  • edit in main.lua at line 211
    [3.6163][3.728:773]()
    if Mode == 'version_check' then return end
  • edit in main.lua at line 228
    [3.6820][3.774:819]()
    if Mode == 'version_check' then return end
  • edit in main.lua at line 234
    [3.7006][3.820:865]()
    if Mode == 'version_check' then return end
  • edit in main.lua at line 239
    [3.39][3.866:911]()
    if Mode == 'version_check' then return end
  • edit in main.lua at line 244
    [3.7176][3.912:957]()
    if Mode == 'version_check' then return end
  • edit in main.lua at line 250
    [3.8173][3.958:1003]()
    if Mode == 'version_check' then return end
  • edit in main.lua at line 259
    [3.1512][3.1004:1049]()
    if Mode == 'version_check' then return end
  • edit in main.lua at line 268
    [3.57][3.1050:1118]()
    if Mode == 'version_check' then
    Mode = 'run'
    return
    end