Page 1 of 1
Problem with LOVE and Notepad++ [nppexec]
Posted: Sat May 10, 2014 2:15 am
by Suppercut
If I try to launch a LOVE2D game through nppexec, the game hangs without creating a window. The nppexec console never goes past "Process started >>>" until I go into Task Manager, find love.exe, and shut it down.
Launching it normally using the same exact command line option works just fine.
I have been having this problem since 0.9, and updating to 0.9.1 has not changed the issue at all.
Command:
Code: Select all
"C:\Program Files (x86)\LOVE\love.exe" "$(CURRENT_DIRECTORY)"
Re: Problem with LOVE and Notepad++ [nppexec]
Posted: Sat May 10, 2014 9:40 am
by Ranguna259
Try adding love to your PATH variable and instead of using the love directory just type:
I rememmber having this issue back in 0.8.0.
Re: Problem with LOVE and Notepad++ [nppexec]
Posted: Tue May 27, 2014 6:28 pm
by Suppercut
Ranguna259 wrote:Try adding love to your PATH variable and instead of using the love directory just type:
I rememmber having this issue back in 0.8.0.
That literally does the exact same thing. I've had LOVE in my path variables for ages, only reason I changed the command was because it was giving me this problem, and still is.
I never had a problem with this in 0.8, in fact using nppexec would print to Notepad's output section. This has to do with the different rendering system. I know that because when I first started having this issue N++ would spam errors about rendering, until 0.9.1 stopped making the errors.
Re: Problem with LOVE and Notepad++ [nppexec]
Posted: Wed May 28, 2014 2:07 am
by CaptainMaelstrom
I have two suggestions, just in case you haven't tried them yet.
1.) Make a .love of your game and open it directly with love.exe. See if there are any weird errors, or if everything works fine.
2.) Re-install Np++ from scratch. Especially if you have been letting it auto-update for a while.
For reference, I've had no issues with NP++ and I've used both 0.9.0 and 0.9.1. Then again, I don't use nppexec much (just for C stuff really). But I have a custom shortcut that runs
"C:\love\love.exe" "C:\work\test"
etc. Pretty similar. Just my 2 cents, hope it helps.
Re: Problem with LOVE and Notepad++ [nppexec]
Posted: Sun Jun 01, 2014 12:33 am
by G-Mang
I had the same problem. An
old post by Imp1 had a workaround that fixed it for me.
Create a batch file (I went with
C:\Program Files\LOVE\loveit.bat) with the following script:
Code: Select all
"C:\Program Files\LOVE\love.exe" %1
In the Execute text box of nppexec, run the following command:
Code: Select all
"C:\Program Files\LOVE\loveit.bat" "$(CURRENT_DIRECTORY)"
I have no idea why this works, but now my Notepad++ execute runs a game window and outputs to console, so I'm not complaining.
Hope it works for you!
Re: Problem with LOVE and Notepad++ [nppexec]
Posted: Thu Jun 05, 2014 8:24 pm
by Srekel
Hi,
Had the same problem.
The batch file didn't quite work for me. Here's what I put in mine:
"C:\Program Files\LOVE\love.exe" .
I then run it like this:
cd $(CURRENT_DIRECTORY)
run.bat
If I didn't cd first it didn't work.
Re: Problem with LOVE and Notepad++ [nppexec]
Posted: Sun Jun 08, 2014 5:44 pm
by Suppercut
G-Mang wrote:I had the same problem. An
old post by Imp1 had a workaround that fixed it for me.
Create a batch file (I went with
C:\Program Files\LOVE\loveit.bat) with the following script:
Code: Select all
"C:\Program Files\LOVE\love.exe" %1
In the Execute text box of nppexec, run the following command:
Code: Select all
"C:\Program Files\LOVE\loveit.bat" "$(CURRENT_DIRECTORY)"
I have no idea why this works, but now my Notepad++ execute runs a game window and outputs to console, so I'm not complaining.
Hope it works for you!
This worked for me, but the problem I had is that I don't see what's printed to console until after I close the game.

Is there any other way to watch the output? nppexec used to be my main man for this...
Re: Problem with LOVE and Notepad++ [nppexec]
Posted: Mon Jun 09, 2014 12:25 am
by G-Mang
Suppercut wrote:This worked for me, but the problem I had is that I don't see what's printed to console until after I close the game.

Is there any other way to watch the output? nppexec used to be my main man for this...
Did you do one of these at the start of your scripts?
If that doesn't fix it I'm stumped.

Re: Problem with LOVE and Notepad++ [nppexec]
Posted: Mon Jun 09, 2014 4:05 am
by Suppercut
Oh mess it all, I think running my test .bat files and adding love._openConsole() has worked well enough for me. I'll stick with that for a while...
Re: Problem with LOVE and Notepad++ [nppexec]
Posted: Mon Oct 13, 2014 3:54 pm
by Positive07
I got it to work, using all the things listed in this thread:
I use this .bat file
Code: Select all
@echo off
cd D:\Program Files\Love 0.9.1\
:there
if "%1" neq "" goto here
call love.exe
goto end
:here
call love.exe %1
goto end
:end
exit
And I add this line at the beginning of main.lua
I comment this line on conf.lua
Then I created a command in Plugins > NppExec > Execute...
Code: Select all
NPP_SAVEALL
"D:\LOVE\run.bat" "$(CURRENT_DIRECTORY)"
I named it Love and saved it
Then in Plugins > NppExec > Advanced Options
In the Menu Item section I added Love to the menu
Then in Configuration > Shortcuts I added a shortcut to this Menu Item (Love) to trigger it with Ctrl + L
I changed the colors to the following:
Code: Select all
TextColorNormal E0 E2 E4
TextColorError EC 76 00
TextColorMessage 67 8C B1
BackgroundColor 29 31 34
I have enabled the filters in Plugin > NppExec > Console Output Filters...
And in the highlight tab I used the following filters
Code: Select all
Error: %FILE%:%LINE% * 0xEC 0x76 0x00 B
*[*]:* 0xEC 0x76 0x00 I
*%FILE%:%LINE% * 0xEC 0x76 0x00 B
stack*traceback:* 0xEC 0x76 0x00 U
When there is an error you can double-click on the line that points you to the error and Notepad++ will take you there