- Added -n option to AppRun (closes #3) - Bumped love version to 11.3 - Updated Fennel to current master branch b2d2155

This commit is contained in:
Alexander Griffith 2020-04-08 21:56:53 -04:00
parent f583452b77
commit 460f54eef1
5 changed files with 84 additions and 71 deletions

View file

@ -6,5 +6,5 @@ love.conf = function(t)
t.window.width = 720
t.window.height = 450
t.window.vsync = false
t.version = "11.2"
t.version = "11.3"
end

View file

@ -1403,8 +1403,11 @@ SPECIALS["fn"] = function(ast, scope, parent)
local isLocalFn
local docstring
fScope.vararg = false
local multi = fnName and isMultiSym(fnName[1])
assertCompile(not multi or not multi.multiSymMethodCall,
"malformed function name: " .. tostring(fnName), ast)
if fnName and fnName[1] ~= 'nil' then
isLocalFn = not isMultiSym(fnName[1])
isLocalFn = not multi
if isLocalFn then
fnName = declareLocal(fnName, {}, scope, ast)
else
@ -1473,8 +1476,8 @@ SPECIALS["fn"] = function(ast, scope, parent)
:gsub('"', '\\"') .. '"')
end
local metaStr = ('require("%s").metadata'):format(rootOptions.moduleName or "fennel")
emit(parent, string.format('%s:setall(%s, %s)', metaStr,
fnName, table.concat(metaFields, ', ')))
emit(parent, string.format('pcall(function() %s:setall(%s, %s) end)',
metaStr, fnName, table.concat(metaFields, ', ')))
end
checkUnused(fScope, ast)
@ -2017,7 +2020,7 @@ docSpecial("length", {"x"}, "Returns the length of a table or string.")
SPECIALS["#"] = SPECIALS["length"]
-- Save current macro scope
local macroCurrentScope = GLOBAL_SCOPE
local macroCurrentScope = nil
-- Covert a macro function to a special form
local function macroToSpecial(mac)
@ -2523,15 +2526,22 @@ local function makeCompilerEnv(ast, scope, parent)
list = list,
sym = sym,
unpack = unpack,
gensym = function() return sym(gensym(macroCurrentScope)) end,
gensym = function() return sym(gensym(macroCurrentScope or scope)) end,
["list?"] = isList,
["multi-sym?"] = isMultiSym,
["sym?"] = isSym,
["table?"] = isTable,
["sequence?"] = isSequence,
["varg?"] = isVarg,
["get-scope"] = function() return macroCurrentScope end,
["get-scope"] = function()
if io and io.stderr then
io.stderr:
write(("-- %s:%s get-scope is deprecated and will be removed\n"):
format(ast.filename, ast.line))
end
return macroCurrentScope end,
["in-scope?"] = function(symbol)
assertCompile(macroCurrentScope, "must call in-scope? from macro", ast)
return macroCurrentScope.manglings[tostring(symbol)]
end
}, { __index = _ENV or _G })
@ -2617,7 +2627,7 @@ SPECIALS['include'] = function(ast, scope, parent, opts)
emit(tempChunk, subChunk, ast)
-- if lua, simply emit the setting of package.preload
if not isFennel then
emit(tempChunk, target .. ' = ' .. target .. ' or function()\n' .. s .. 'end', ast)
emit(tempChunk, target .. ' = ' .. target .. ' or function()\n' .. s .. '\nend', ast)
end
-- Splice tempChunk to begining of rootChunk
for i, v in ipairs(tempChunk) do

View file

@ -1,8 +1,10 @@
#!/usr/local/Cellar/bash/4.4.23/bin/bash
## #!/usr/bin/env bash
#!/usr/bin/env bash
## For users on macos
## #!/usr/local/Cellar/bash/4.4.23/bin/bash
# LÖVE version
LOVE_DEF_VERSION=0.11.2
LOVE_DEF_VERSION=0.11.3

View file

@ -1,8 +1,9 @@
VERSION=0.1.0
LOVE_VERSION=11.3
NAME=change-me
ITCH_ACCOUNT=change-me-too
URL=https://gitlab.com/alexjgriffith/min-love2d-fennel
AUTHOR="Alexander Griffith"
AUTHOR="Your Name"
DESCRIPTION="Minimal setup for trying out Phil Hagelberg's fennel/love game design process."
LIBS := $(wildcard lib/*)
@ -33,10 +34,10 @@ love: $(LOVEFILE)
REL=$(PWD)/love-release.sh # https://p.hagelb.org/love-release.sh
FLAGS=-a "$(AUTHOR)" --description $(DESCRIPTION) \
--love 11.2 --url $(URL) --version $(VERSION) --lovefile $(LOVEFILE)
--love $(LOVE_VERSION) --url $(URL) --version $(VERSION) --lovefile $(LOVEFILE)
releases/$(NAME)-$(VERSION)-x86_64.AppImage: $(LOVEFILE)
cd appimage && ./build.sh 11.1 $(PWD)/$(LOVEFILE)
cd appimage && ./build.sh $(LOVE_VERSION) $(PWD)/$(LOVEFILE)
mv appimage/game-x86_64.AppImage $@
releases/$(NAME)-$(VERSION)-macos.zip: $(LOVEFILE)