Page 1 of 1

Integrating Love Into Geany

Posted: Fri Dec 08, 2017 11:15 pm
by jordan4ibanez
I would like to preface this, by stating that all of the resources I've looked up on the wiki are very outdated for Linux.

First off, VTE integration. Open up your package manager/terminal/software manager and search vte and the vte terminal package will come up. Install it.

Now integrate it in the settings -> terminal tab:
OCbNLxs.png
OCbNLxs.png (44.08 KiB) Viewed 12835 times

Okay great! Now let's get serious. Navigate to Build -> Set Build Commands.

Add a Preset into Lua Commands called build .love file, set the command to zip -r packaged_game.love *, and change the working directory to %p.

Next change the Execute command to love "%p".

It should look like this:
cPTm6kx.png
cPTm6kx.png (44.25 KiB) Viewed 12835 times

That's it, now you can build and run programs without issues.

Re: Integrating Love Into Geany

Posted: Wed Jan 03, 2018 8:16 am
by kbmonkey
I've written a Lua script that scans the Love source and generates a tag file for Geany auto-completion. Place the tags file in ~/.config/geany/tags/ and restart Geany.

geany-love-tag-gen.lua
generated love.lua.tag for Love 0.10.2
geany-tags-shot1.png
geany-tags-shot1.png (113.84 KiB) Viewed 12706 times

Re: Integrating Love Into Geany

Posted: Fri Aug 31, 2018 5:41 am
by kbmonkey
I updated the Geany tags to version 11.1 of the LÖVE sources.

https://gist.github.com/wesleywerner/61 ... 6c9c8b151e

Re: Integrating Love Into Geany

Posted: Fri Aug 31, 2018 10:49 pm
by Astorek86
Thank you all for sharing these informations :) .

I thought I'll share my Windows-Configuration which could be useful for others^^:
Image
  • Using 7-Zip to build a "game.love"-file
    Install 7-Zip which can be used to create .love-files. Add following:

    Code: Select all

    cmd /c "del game.love & "C:\Program Files\7-Zip\7z.exe" u -xr0!game.love -xr0!bin/ -tzip game.love *"
    
    Also add %p as Working Directory, replace "C:\Program Files\7-Zip" if needed. (The Directory where you have installed 7-Zip)

    Also add following:

    Code: Select all

    "C:\Program Files\7-Zip\7z.exe" u -xr0!game.love -xr0!bin/ -tzip game.love *
    
    Also add %p as Working Directory, replace "C:\Program Files\7-Zip" if needed. (The Directory where you have installed 7-Zip)
    • Sometimes it's necessary to delete "game.love" (First Command), because 7-Zip doesn't delete any file, which can bloat up your "game.love". For example, if you add many Assets in an early state of your Game, these Assets will remain in your "game.love" forever, even if you deleted it from your Source-Directory. That's why I added a "Build completely new"-Option in Geany^^.

      The Second Command doesn't delete "game.love", but as an Advantance, it will only compress new Files, which can be useful. For example, if you have GB-sized Assets, it won't be compressed again, which saves time to recreate "game.love"^^.
  • On "Execute", replace "love" with "lovec"
    That's because Geany-Windows doesn't have VTE, so perhaps it's a good idea to use lovec.exe, because you can see a Terminal and some self-programmed Debug-Infos like Luas "print"-Statements^^.

    Add following:

    Code: Select all

    "C:\Program Files (x86)\LOVE\lovec.exe" "%p"
    
    Also leave Working-Directory empty, replace "C:\Program Files (x86)\LOVE" if needed. (The Directory where you have installed LOVE)
  • Create Windows-Executable
    That Thing need a bit of work.
    • First, Copy these Lines:

      Code: Select all

      MKDIR %1\bin
      copy *.dll %1\bin\
      copy love.exe %1\bin\
      copy license.txt %1\bin\
      cd %1\bin
      copy ..\game.love .
      copy /b love.exe+game.love game.exe
      del game.love love.exe
      
    • Save these Lines in a new File called "love2exe.bat".
    • Move this File into the Directory where you installed LOVE.
    • Add following Line in Geany:

      Code: Select all

      cmd /c ""C:\Program Files (x86)\LOVE\love2exe.bat" "%p""
      
      Replace "C:\Program Files (x86)\LOVE" if needed. (The Directory where you have installed LOVE).
    • As "Working-Directory", add following Line:

      Code: Select all

      C:\Program Files (x86)\LOVE\
      
      Replace if needed. (The Directory where you have installed LOVE).
    Important: Before you can use this Command, you must build a "game.love" first!
That's my Config I'm using in Geany, and it works pretty well. As say, I thought it can be useful for others^^.

Re: Integrating Love Into Geany

Posted: Sun Jan 17, 2021 4:07 pm
by GestaltEngine
kbmonkey wrote: Fri Aug 31, 2018 5:41 am I updated the Geany tags to version 11.1 of the LÖVE sources.

https://gist.github.com/wesleywerner/61 ... 6c9c8b151e
Neither the pregenerated tags nor the ones I generated with you script from the newest source worked completely. While some functions, like setLinearVelocity and others from Box2D were given tags, most weren't (e.g. love.graphics.rectangle, etc). Is there something I am missing?

Re: Integrating Love Into Geany

Posted: Tue Jan 26, 2021 12:41 am
by kbmonkey
@GestaltEngine, it seems like the first revision of my generated tags file contains the rectangle definition while the second revision does not. I guess there is a bug in the script. It will need debugging and fixing.

I have work deadlines and lack time. The code is MIT/BSD compatible so feel free to fork and fix it. I might decide to debug the script as a weekend project in the future, but I can't promise anything.