SitePoint Sponsor

User Tag List

Results 1 to 23 of 23
  1. #1
    I Never Give Up roosevelt's Avatar
    Join Date
    May 2005
    Posts
    515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Convert Your PHP Web Application to a Native Desktop Application (Win, Linux, Mac)!

    Fellow PHP Developers,

    I have been programming in PHP for... god knows how long (at least 6 years). But besides PHP I also have experience in developing with JAVA, C++, little bit of Python, and also Ruby on Rails. Among them PHP just made more sense to me not only because of its popularity but because of its solid track record of being super reliable etc...

    What bugged me though was I could not use PHP to create a decent Desktop Application. PHP-GTK, Titanium and other packagers were just horrible and most of them died out. Adobe AIR was promising but no PHP support... so no need to compliment that, lol.

    Basically I wanted the following:

    • Something like PHPUnit
    • Something like Selenium for UI Testing
    • Something like CakePHP Framework
    • Something that allows me to create robust GUI for desktop
    • Something that is super easy to deploy
    • Something that works on Mac, Windows and Linux... period.


    Sadly JAVA, Python and others were just not what I wanted. Java's Swing Framework doesn't excite me, wxPython is cool but doesn't have the same cool factor Twitter's Bootstrap provides. It lead me to finally decide that perhaps I just have to stick to something like XAMPP or WAMP... but XAMPP/WAMP are bloated and not that friendly for the average computer users. Besides starting the server and going to a URL like http://localhost/weird/ is clunky!

    Ultimately... I decided to make my own solution and give it away for free. PHP has given me so much... I think it's the least I can do for the community.

    So... here's my creation. It is called, Nightrain, the PHP Native Desktop Application packager.

    Here's what you can do with this:

    • Package any PHP Web Application as a Native Desktop Application (Just tested with Drupal and punBB... if they work, any PHP application should work!)
    • Use the precompiled PHP or use your own custom compiled PHP if required
    • Run your application on Mac, Windows and Linux
    • Download Nightrain, Copy your PHP app to /www, Do your setup, distribute!


    You can download the packager here: http://www.nightrain.naetech.com/

    Also check the links on Tutorials, Troubleshooting and Gallery on the top for inspiration.

    Nightrain is still in beta so you might run into issues. Just let me know and we will take it from there.

    I hope this product will allow you to use your existing PHP skills to tackle the Desktop market as well! No need to learn JAVA or C++... just use good old PHP!

    Let me know how you feel about this. Good, bad.. the ugly, just let me know

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,506
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Interesting. You say you've tested with drupal, so MySQL is included I guess (you only talk about PHP, HTML and CSS) ?

  3. #3
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,506
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    I must be missing something. I installed the QT library, but I keep getting a "Qt5WebkitsWidget.dll is missing" error?

  4. #4
    I Never Give Up roosevelt's Avatar
    Join Date
    May 2005
    Posts
    515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Drupal actually does not require MySQL, Drupal also supports SQLite3. So, during the installation you can select SQLite3 driver and just follow the steps normally to install. Which Qt 5 did you install? (e.g. Qt 5.1.1 for Windows 32-bit (VS 2012), Qt 5.1.1 for Windows 64-bit (VS 2012)?

    I think including MySQL database server will be overkill and defeat the purpose all together. Since the packager is intended for stand-alone applications (like Microsoft Word, Excel, Notepad), it makes more sense to use SQLite3 databases for such applications. Using MySQL for a application that will be used by a single user is a bit redundant. However, you can also instruct the user to install mysql server separately, compile the PHP in nightrain to have mysql drivers and update your PHP code to connect to a mysql server like you would do in a traditional PHP/MySQL app. But as you can see that's a lot of work... and switching to SQLite3 for a regular PHP database driven app makes it lot easier for the end user.

  5. #5
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,506
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by roosevelt View Post
    Drupal actually does not require MySQL, Drupal also supports SQLite3. So, during the installation you can select SQLite3 driver and just follow the steps normally to install. Which Qt 5 did you install? (e.g. Qt 5.1.1 for Windows 32-bit (VS 2012), Qt 5.1.1 for Windows 64-bit (VS 2012)?

    I think including MySQL database server will be overkill and defeat the purpose all together. Since the packager is intended for stand-alone applications (like Microsoft Word, Excel, Notepad), it makes more sense to use SQLite3 databases for such applications. Using MySQL for a application that will be used by a single user is a bit redundant. However, you can also instruct the user to install mysql server separately, compile the PHP in nightrain to have mysql drivers and update your PHP code to connect to a mysql server like you would do in a traditional PHP/MySQL app.
    Ok, I'll have to take a look at SQLite3 as well then. If I can get nightrain to work that is

    First I installed the QT Online Installer for Windows, but it gave some errors. Ignoring them I terminated the installation, but it didn't work. Then I tried Qt 5.1.1 for Windows 32-bit (MinGW 4.8, OpenGL, 666 MB). Installation went fine, but gave me the same error when running nightrain.

    Right now I've tried installing Qt 5.1.1 for Windows 32-bit (VS 2012), installation went fine, but again: I keep getting a "Qt5WebkitsWidget.dll is missing" error when running nightrain?

    I'm on W7 Home Premium 32-bit by the way.

  6. #6
    I Never Give Up roosevelt's Avatar
    Join Date
    May 2005
    Posts
    515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I have not tested the project on "W7 Home Premium 32-bit" yet but I will try after I head home. From the looks of your situation... it is having some trouble finding the .dll files. Perhaps after the installation the .dll files were not registered properly by Windows. What you can do is... download DependencyWalker from http://www.dependencywalker.com/ and open nightrain.exe with DependencyWalker.

    DependencyWalker will reveal to you exactly where Nightrain is looking for those Qt dll files. You can manually copy the /Qt5.1.1/5.1.1/<compiler>/lib/*.dll files to that location or the ugliest solution of all... copy all the Qt*.dll files to the same folder where nightrain.exe is located.

    Not sure out of all the OS why Windows acts so strange

  7. #7
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,506
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    I've installed Dependency Walker, and it told me that nightrain is looking for the dll's in the nightrain folder. So I copied and pasted the QT dll's. But now it's missing other dll's (MSVCP110, MSVCR110, and a bunch of API-MS-WIN-CORE dll's) and it's looking for those in the nightrain folder as well?

  8. #8
    I Never Give Up roosevelt's Avatar
    Join Date
    May 2005
    Posts
    515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by guido2004 View Post
    I've installed Dependency Walker, and it told me that nightrain is looking for the dll's in the nightrain folder. So I copied and pasted the QT dll's. But now it's missing other dll's (MSVCP110, MSVCR110, and a bunch of API-MS-WIN-CORE dll's) and it's looking for those in the nightrain folder as well?
    WOW... this is interesting. I hope something in your computer did not screw up the environmental variables. However, I got a strong feeling you may not have the Visual C++ Redistributable packages installed. Perhaps the home edition do not include them by default. Go to http://support.microsoft.com/kb/2019667 and download VC++ Redistributable Packages (VC++ 11.0). Let me know how that goes.

    Thank you so much for debugging this. I really appreciate it!

  9. #9
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,506
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by roosevelt View Post
    WOW... this is interesting. I hope something in your computer did not screw up the environmental variables. However, I got a strong feeling you may not have the Visual C++ Redistributable packages installed. Perhaps the home edition do not include them by default. Go to http://support.microsoft.com/kb/2019667 and download VC++ Redistributable Packages (VC++ 11.0). Let me know how that goes.
    Ok that seems to have done the trick. I now get an error when the script tries to connect to MySQL, but that's normal
    Thank you so much for debugging this. I really appreciate it!
    No need to thank me, it's in my own interest if I want to start using your product

    I'll be back if I have other questions/problems

  10. #10
    I Never Give Up roosevelt's Avatar
    Join Date
    May 2005
    Posts
    515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No more questions... looks like Nightrain is working well for you :P. I just released Version 2.0. It is a complete rewrite and has couple of new features and bug fixes from the initial release. Feel free to try it out!

  11. #11
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,506
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by roosevelt View Post
    No more questions... looks like Nightrain is working well for you :P. I just released Version 2.0. It is a complete rewrite and has couple of new features and bug fixes from the initial release. Feel free to try it out!
    No time to work with it
    I will download version two, and I hope to be able to work with it soon.

  12. #12
    SitePoint Member
    Join Date
    Nov 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hello

    am really happy to here this news, i searched on google for application which can convert php to windows apps and i end up getting " ExeOutup for PHP" its really good but bad news is its not for free, i started to learning JAVA but its so hard for me, Just now i've started using your solution but unfortunately i get some errors "Qt5WebKitWidgets.dll is missing from your computer". please help me with this problem, or some one tell me the best way i can do.

  13. #13
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,506
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Mamouz View Post
    am really happy to here this news, i searched on google for application which can convert php to windows apps and i end up getting " ExeOutup for PHP" its really good but bad news is its not for free, i started to learning JAVA but its so hard for me, Just now i've started using your solution but unfortunately i get some errors "Qt5WebKitWidgets.dll is missing from your computer". please help me with this problem, or some one tell me the best way i can do.
    The same error I had. Read all posts in this thread and you'll find the solution

  14. #14
    SitePoint Member
    Join Date
    Nov 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy

    Quote Originally Posted by guido2004 View Post
    The same error I had. Read all posts in this thread and you'll find the solution
    yeah, i went through all steps, but when i open nightrain on Dependency Walker i get this error "Error: At least one required implicit or forwarded dependency was not found." And some other .dll like MSVCP110.DLL, QT5WEBKITWIDGETS.DLL. i have installed Microsoft Visual C++ 2012 Redistributable, but still i get those errors. of course i did not use Wordpress, Joomla or Drupal on my project, i just used CSS5,HTML5 and PHP!! am sorry if its makes no sense but that is what i need for now and i've to convert those PHP pages to windows form.
    thanks

  15. #15
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,506
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    I see. In that case, let's hope @roosevelt ; knows how to solve your problems

  16. #16
    SitePoint Wizard lorenw's Avatar
    Join Date
    Feb 2005
    Location
    was rainy Oregon now sunny Florida
    Posts
    1,104
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I also got the missing dll errors. I went to,
    C:\Qt\Qt5.1.1\5.1.1\msvc2012\bin

    and copied all dll's to the nighttrain folder and it launches.

    nighttrain is here (on my system).
    C:\web\nighttrain

    When I launch nightrain.exe it shows phpinfo(), changed the index.php to a "hello world" .
    So it is working, now to find a use for it LOL.
    What I lack in acuracy I make up for in misteaks

  17. #17
    I Never Give Up roosevelt's Avatar
    Join Date
    May 2005
    Posts
    515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mamouz View Post
    yeah, i went through all steps, but when i open nightrain on Dependency Walker i get this error "Error: At least one required implicit or forwarded dependency was not found." And some other .dll like MSVCP110.DLL, QT5WEBKITWIDGETS.DLL. i have installed Microsoft Visual C++ 2012 Redistributable, but still i get those errors. of course i did not use Wordpress, Joomla or Drupal on my project, i just used CSS5,HTML5 and PHP!! am sorry if its makes no sense but that is what i need for now and i've to convert those PHP pages to windows form.
    thanks
    Hi Guys,

    Sorry for the delay. I forgot to turn on e-mail notification for this thread. @Mamouz It seems like you are having the same issues as guido2004. Installing the Qt-5 libraries and the Run-times for Visual Studio should take care of the problem.

    But @lorenw I am not so sure why Windows still cannot find the Qt libraries even though Qt-5 is already installed on your computer. In the next update I will offer two solutions. One with all the required libraries embedded so the application is completely portable and another without the libraries. @lorenw You can start by cloning a popular desktop app. If experience serves me right.. it is much faster to develop a web application with HTML/PHP/CSS/Javascript than a Java or C++ based GUI app!

    BTW I also created a Trouble Shooting page on the main website. Updating it regularly with some of the common issues.

  18. #18
    SitePoint Wizard lorenw's Avatar
    Join Date
    Feb 2005
    Location
    was rainy Oregon now sunny Florida
    Posts
    1,104
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    @roosevelt, I was confused why it couldn't find the dll's.
    I used dependency walker as suggested and it said that nighttrain was looking in C:\web\nighttrain\ for the dll's, so naturally I dumped them in there, it works perfectly but it looks a bit cluttered.
    This is a brilliant application, my comment "now to find a use for it LOL", was just that I WILL find several uses for it.
    I can't remember what it was but came across a situation in the past that this would have worked perfectly for.
    I really am impressed.

    Next thing to try is an sql connection.
    Thanks.
    What I lack in acuracy I make up for in misteaks

  19. #19
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,506
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by lorenw
    Next thing to try is an sql connection.
    If you manage to do that please let me know how. I still haven't found the time to work with it but I'm very interested.

  20. #20
    SitePoint Member
    Join Date
    Jan 2014
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is a similar project called "PHP Desktop", it is open source. Recently a version with Chrome embedded was relased, see the project site:

    https://code.google.com/p/phpdesktop/

    PHP Desktop with Chrome embedded doesn't have any dependencies like Nighttrain (Qt, MSVC runtime), the downloaded binary zip is portable and works out of the box.

  21. #21
    I Never Give Up roosevelt's Avatar
    Join Date
    May 2005
    Posts
    515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Czarek thanks for the update. Before creating nightrain I also looked into PHPDesktop. It did not work so well for me back then but it might be better now. However, from the looks of your Download/Wiki page, it seems like the executable is compiled only for Windows. I am pretty sure people would love the solution where you have your software working on Windows, Mac and Linux! If you tell us what compiler you used or what libraries are needed for static linking... then people could easily port it to other platforms. Especially... since now you support the Chromium Engine! By the way... I see that you are the project lead over there... I suggest moving your project to Github, it will make it much much easier to fork your repo and push new updates. I might jump in and give you a hand!

  22. #22
    SitePoint Member
    Join Date
    Jan 2014
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Roosevelt, For now only Windows platform is supported. Linux and OSX might be supported in the future if there is demand from users. PHP Desktop uses Chromium Embedded Framework. Visual Studio 2010 SP1 is used to compile PHP Desktop. I don't think I will be moving to github, the documentation from wiki pages would need to be migrated. Also I don't like the main page on github, it displays source repository files and only further down a README.md is displayed. Most of the php desktop users aren't interested in its C/C++ sources, so displaing them on the main page is not a good user experience. On google code I can have a nice main page that describes to users what the project is about. Yeah, pull requests are a nice feature of github. Though I don't see not having it a big concern. You can upload patches in the issue tracker, when submitting an issue or adding a comment. Contributions are welcome.

  23. #23
    I Never Give Up roosevelt's Avatar
    Join Date
    May 2005
    Posts
    515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Hi Guys. Just wanted to update you on PHP Nightrain. I just pushed out PHP Nightrain 3.0 and I have some great news to share with you all.

    1. NO MORE Qt5 Nightmares (PHP Nightrain 3.0 is completely rewritten in Java)
    2. Since PHP Nightrain 3.0 is coded in Java and Naetech, LLC made PHP Nightrain 3.0 free, you can use it for both commercial, free and open-source projects
    3. Now has support for MySQL (does not include the MySQL Server due to file size). It is recommended to use SQLite3 for data storage.
    4. There is no powered by text. This gives you complete control over how you want to brand your application.

    You can see the full details and list here: http://www.naetech.com/php-nightrain-3-0-here.html

    Let me know if you run into any issues with PHP Nightrain 3.0.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •