SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Member
    Join Date
    Jun 2003
    Location
    baton rouge
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Please Help me with Designing a Stand Alone Application

    Hi All,

    I am new to this whole GTK thing. I am trying to re-develop an application which i previously designed in PHP for web, for display to my employer. The problem is he doesn't have any kind of PHP interpreter and the kind of solution he need is a stand-alone kind.

    To be more specific he needs something like...a program like say an .exe where he double cliock it and it is ready to go.He don't want any interpreter to be installed on his machine or does he want to go to command line and type somethings.

    Actually this guy wants to use Access and i convinved him an application developed in MySQL & PHP would be great than that. But now i am struck up with this problem.

    So Please can anybody tell me how i can make an application stand-alone just like an exe using GTK & PHP?

    suneel

  2. #2
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Java comes to mind... How you can use PHP from the desktop w/out PHP installed though I have no idea. Sorry

  3. #3
    if($awake){code();} PHP John's Avatar
    Join Date
    Jul 2002
    Location
    Along the Wasatch Fault line.
    Posts
    1,771
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have painted yourself into a corner because PHP does not become a .exe file and won't execute without having PHP and some type of webserver installed. Even with Java, you have to have Sun's Java installed in order to run it.

    If you want a .exe file you will have to use VisualBasic or Visual C++, or any other truly compiled language.
    John

  4. #4
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why can't you use Access?
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  5. #5
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To clarify, I think Access would be most suitable if you need a "standalone" application. PHP and mySQL are server-side technologies, and are not very suitable to client development. Access is.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  6. #6
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    heh - third post:

    If your previous PHP application made use of a database, you are definetly best off with Access, since every other solution will require to either install an external database (which is not an option, as that would spoil the standalone idea) or write a textfile-based storage system (which will demand enourmous amounts of time)
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  7. #7
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    php-gtk + sqlite + bcompiler + phpembed sapi makes for a compiled php/SQL application on the desktop probably < 4MB , with mysql around 6ish?

    1st problem is that for the bcompiler to work, all your code has to be OOP , now when I say OOP , it just has to be held in classes in some form or another and be cpable of being started via ..

    myApp::main() or $yaks=&new myApp();

    its quite easy to wrap otherwise procedural code in simple classes though it is a cheat.

    working on a wrapper of some sort now (as not everyone is going to have /want to have MSVCC) ... till then ..http://devel.akbkhome.com/talks/gtk_to_desktop.html

  8. #8
    SitePoint Member
    Join Date
    Jun 2003
    Location
    baton rouge
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just want to let you all know that i used a packager from: http://www.zupmaker.com/ which is pretty easy to use and powerfull and GUI based. Just thought that it would be helpfull.

    The way i did the thing is i set up the registry keys so that .php files open with php_win.exe and i included the php_win.exe along with it'd dll's in my package. Is there any better way to do this?

    My aim is when the user double clicks the .php file which is my program then it starts functioning as if it was started from command prompt using dll's lying in same directory. A crude way, but a solution!!

    Still half way through as i need something similar to setup MySQL database paralelly in the installation. May be i will set it up as a component,i don't know!!

    Any ideas folks?

    suneel

  9. #9
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, sorry I got the wrong end of the stick

    I use NSIS form nullsoft.com to create similar packages , the latest nullsoft installer lets you create registry keys , start menu shortcuts etc and you can put as many sections in there as you like , eg MySQL,Apache, PHP , you can even write your own macros for it.

    http://www.nullsoft.com/free/nsis/

    there is no GUI as such but there are loads of sample installation routines to get you going , worth a look ?

  10. #10
    SitePoint Member
    Join Date
    Nov 2003
    Location
    Moscow, Russia
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You may not use PHP without it to be installed. However in most cases you do not need to deploy whole PHP - 2-3 dll's is enough. You may even not say to your users that those dll's are installed (but you will need to add something like "this program uses PHP that is available for free from http://www.php.net" into documentation).

    I think the best way is to deploy you PHP program as is. You may want to make HTML application (HTA) from your PHP program - it is easy and may require to change only start page. This way application will be web-base but will be able to start from "run" dialog box or from program menu shortcut. This will require you to deploy one addition component. Please write me privately if you need more info.

    //------------------------------------------
    Regards,
    Vassiliev V. V.
    http://www-sharp.com
    Advanced HTML editor

  11. #11
    SitePoint Enthusiast
    Join Date
    Nov 2002
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm with Mattias, Access is very powerfull when used correctly. What does the application do?

    In my experience, when starting out a project it is not a good idea to start patching things together, since these things usually takeon a life of their own and end up being used in ways that the developer and the client never thought of in the first place.

    If it's a patch job from the beginning it's usually not that versatile.

    Just my 2 cents.

  12. #12
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    msaccess is great till you try to run it on solaris , versatility ...

    Vasilieev , suneel was working with PHP-GTK (gtk.php.net) which is a GUI toolkit based on the GTK (think Gnome) toolkit and written in PHP , it only requires the gtk libs & the php4ts.dll/.exe to run , I am poking for an official default php-gtk 'toolkit' to be deployed ala the JVM but this is unlikely until GTK2/Zend2 port is complete.

  13. #13
    SitePoint Member
    Join Date
    Nov 2003
    Location
    Moscow, Russia
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Suneel wrote "how i can make an application stand-alone just like an exe using GTK & PHP?". He also told about MS Access, so I think he uses Windows.

    I mean www-Sharp.Runtime that will function as in-process web-server - application is launched as HTA and can use PHP, ASP.Net and more. Works only on Windows but I think it is what Suneel asked. If started as HTA user will see it as normal application but actually IE will run.


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
  •