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.
6VJTQKW7YJ7E3WRNSTFYULUDHHTYAE4JELX4J55LO75X4FDM3JZAC TSK2OXU2FTB2X44SN73Z4W4O6IDV6G6V3QU5UVTAGQY52Z7AHECAC IM6GSGVZTVICWIBWRCUXLIMXT3XE3H5LKJ3AITUA4AB3FTW5AJUAC 4SR3Z4Y3GAXFND3TENHV66Q4WD4KODNYL6PAVLSAEQ3WHLOX37HQC GFXWHTE6POBIOBUMRAWD5QS22JEO52EF4VTLMB4CDK4RLSCK7HCAC R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC WQOSZSUESLH4YRMW3PIWGSEC7RS243324PBROJP2KPRFJ3NFSEZQC OTIBCAUJ3KDQJLVDN3A536DLZGNRYMGJLORZVR3WLCGXGO6UGO6AC AVTNUQYRBW7IX2YQ3KDLVQ23RGW3BAKTAE7P73ASBYNKOHMQMH5AC KKMFQDR43ZWVCDRHQLWWX3FCWCFA3ZSXYOBRJNPHUQZR2XPKWULAC 3QNOKBFMKBGXBVJIRHR2444JRRMBTABHE4674NR3DT67RRM2X6GAC endendfunction App.version_check()-- available modes: run, errorError_message = nilError_count = 0-- we'll reuse error mode on load for an initial version checklocal supported_versions = {'11.4', '12.0'} -- put the recommended version firstlocal minor_versionMajor_version, minor_version = love.getVersion()Version = Major_version..'.'..minor_versionif array.find(supported_versions, Version) == nil thenCurrent_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' thenlove.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