2017-01-04 4:44 GMT+01:00 Offray Vladimir Luna Cárdenas < offray.l...@mutabit.com>:
> Hi :-), > > I'm creating a Grafoscopio interactive notebook for learning Lua and > making a small video game with the LÖVE 2D game engine, following the > excellent SheepPollution video series[1]. My first video game is now > working (the old classic Pong) and the notebook contains actionable web > links, text notes and code playgrounds for making clerical work (creating > the initial empty .lua files, downloading the libraries, packaging all as > zip files). > > [1] https://www.youtube.com/watch?v=TUPbSJ5wF0k&list=PLM5EvDHhpy > TcThnWfeP1459KelemQOBdG&index=1 > > Precisely, while trying to package the game as a zip file I'm having the > problem that files are archived with their relative path, and so, they're > in a zip with a lot of nested folders (like in my hard disk) instead of > being just zipped in the root of the zip file. The script I'm using for > that is at [2]. There is any way to tell ZipArchive or ZipNewFileMember > that members are not stored with their full path? > I don't know if this is the supposed way to do this, but can you try to use addFile:as: instead of addMember: (gameFolder childrenMatching: '*.lua') do: [:luaFile | zip addFile: luaFile pathString as: luaFile basename)]. > > [2] http://ws.stfx.eu/OOW0539JDHH2 > > Thanks, > > Offray > > Ps: Learning Lua has been a pleasant experience now that I have the > Pharo/Smalltalk foundation and interactive notebooks, powered by it, and > the Lua language is pretty neat also. > > >