To do this I need some support for multiple versions. And I need an
'error' mode to go with existing 'run' and 'source' modes
(Current_app
). Most errors will automatically transition to 'source'
editor mode, but some errors aren't really actionable in the editor. For
those we'll use 'error' mode.
The app doesn't yet work with LÖVE v12. There are some unit tests failing because of differences in font rendering.
6EFO6DIWS7PVTWPGZ6X4EWAFAK5KFBLM67AWASAEQD3RPXKRGMDAC
TSK2OXU2FTB2X44SN73Z4W4O6IDV6G6V3QU5UVTAGQY52Z7AHECAC
IM6GSGVZTVICWIBWRCUXLIMXT3XE3H5LKJ3AITUA4AB3FTW5AJUAC
4SR3Z4Y3GAXFND3TENHV66Q4WD4KODNYL6PAVLSAEQ3WHLOX37HQC
GFXWHTE6POBIOBUMRAWD5QS22JEO52EF4VTLMB4CDK4RLSCK7HCAC
R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC
WQOSZSUESLH4YRMW3PIWGSEC7RS243324PBROJP2KPRFJ3NFSEZQC
OTIBCAUJ3KDQJLVDN3A536DLZGNRYMGJLORZVR3WLCGXGO6UGO6AC
AVTNUQYRBW7IX2YQ3KDLVQ23RGW3BAKTAE7P73ASBYNKOHMQMH5AC
KKMFQDR43ZWVCDRHQLWWX3FCWCFA3ZSXYOBRJNPHUQZR2XPKWULAC
3QNOKBFMKBGXBVJIRHR2444JRRMBTABHE4674NR3DT67RRM2X6GAC
end
end
function App.version_check()
-- available modes: run, error
Error_message = nil
Error_count = 0
-- we'll reuse error mode on load for an initial version check
local supported_versions = {'11.4', '12.0'} -- put the recommended version first
local minor_version
Major_version, minor_version = love.getVersion()
Version = Major_version..'.'..minor_version
if array.find(supported_versions, Version) == nil then
Current_app = 'error'
Error_message = ("This app doesn't support version %s; please use version %s. Press any key to try it with this version anyway."):format(Version, supported_versions[1])
print(Error_message)
-- continue initializing everything; hopefully we won't have errors during initialization
if Current_app == 'run' then
if Current_app == 'error' then
love.graphics.setColor(0,0,1)
love.graphics.rectangle('fill', 0,0, App.screen.width, App.screen.height)
love.graphics.setColor(1,1,1)
love.graphics.printf(Error_message, 40,40, 600)
elseif Current_app == 'run' then