aj-techsoul / ELECTRON-4-PHP

An easiest way to use php in electron
MIT License
202 stars 46 forks source link

2 windows open #9

Closed andrestc18 closed 5 years ago

andrestc18 commented 5 years ago

Hello, first I congratulate you for that excellent plug-in for electron, I wanted to ask you every time I generated the npm start or I generated the app with electron packager and I open the program two windows exit exactly the same with my program. In the cmd there are two server runs, it's like if you hit it twice, which I do not do.

aj-techsoul commented 5 years ago

No for first time it hits twice because first time it enables or sets PHP Environment. And 2nd time it restarts so that you can use PHP in a great way inside electron.

On Thu 4 Oct, 2018, 12:55 AM andrestc18, notifications@github.com wrote:

Hello, first I congratulate you for that excellent plug-in for electron, I wanted to ask you every time I generated the npm start or I generated the app with electron packager and I open the program two windows exit exactly the same with my program. In the cmd there are two server runs, it's like if you hit it twice, which I do not do.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AJ-TechSoul/ELECTRON-4-PHP/issues/9, or mute the thread https://github.com/notifications/unsubscribe-auth/AZ_IIFV1RBikYouW39A6HiPe5uLxYZNSks5uhQ80gaJpZM4XGtEJ .

juppwerner commented 5 years ago

Hi,

can it be that this is due to two places where app.on('ready', createWindow) appears in the provided main.js?

I removed the second line (arround line 116) and now thereis only one window.

Regards Joachim

aj-techsoul commented 5 years ago

Yes, you are right but one window should open for setting up PHP Environment which is setenv.bat in windows.

aj-techsoul commented 5 years ago

I have did the changes you said, now only one window coming. so now i am closing