Re: compling trobles
| From: | Alan Knowles | Date: | Thu, 10 Apr 2003 09:31:01 +0000 |
| Subject: | Re: compling trobles | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-3226@lists.php.net to get a copy of this message | ||
As far as I know phpcompiler only worked with an old version of php (pre php-gtk).
if you download
http://devel.akbkhome.com/gtkmdbdesigner_setup.exe
it should contain all the components to build compiled files. - although you have to use classes
to build a binary.
c:\php4\php.exe bcompiler_compile.php main.php phpe.exe
where main.php looks a bit like this.
class main {
function main {
$extension = "php_gtk" . (strpos(PHP_OS, "WIN") >= 0 ? ".dll" : ".so");
dl($extension);
$window = &new GtkWindow();
$window->set_title("Test App");
$window->set_usize(300, 100);
$window->set_position(GTK_WIN_POS_CENTER);
$window->set_policy(false, false, false);
$window->connect("destroy", array(&$this,"killwin"));
$window->show_all();
gtk::main();
}
function killwin()
{
echo("Window Destroyed!\n");
gtk::main_quit();
}
}
?>
most of the documentation and code for this is in cvs.php.net / pear/PECL/bcompiler/examples/embed/
- unfortunaly the main documentation is in a paper for the phpcon in amsterdam - although the slides should be available next week.
Regards
Alan
Oleg wrote:
Hello people, I want create exe file with tool PHP compiler (http://anton.concord.ru/ftp/phpcompiler/phpcompiler.zip). As i know she can do that. I have a simple script <?php $extension = "php_gtk" . (strpos(PHP_OS, "WIN") >= 0 ? ".dll" : ".so"); dl($extension); $window = &new GtkWindow(); $window->set_title("Test App"); $window->set_usize(300, 100); $window->set_position(GTK_WIN_POS_CENTER); $window->set_policy(false, false, false); $window->connect("destroy", "killwin"); function killwin() { echo("Window Destroyed!\n"); gtk::main_quit(); } $window->show_all(); gtk::main(); ?> in work what i run it from command line, but it won work with phpcompiler. Can any one tell me what i did wrong. What must be versions of php4ts.dll and php.exe ? Regards.-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com