mirror of https://github.com/YGGverse/Yoda.git
phpcomposergemini-protocolgeminismallwebaltwebphp-gtkgemini-clientyoda-browserphp-cppgemini-browseryodagtk3browsergtk
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
718 B
39 lines
718 B
<?php |
|
|
|
// Load dependencies |
|
require_once __DIR__ . |
|
DIRECTORY_SEPARATOR . '..'. |
|
DIRECTORY_SEPARATOR . 'vendor' . |
|
DIRECTORY_SEPARATOR . 'autoload.php'; |
|
|
|
// Init filesystem |
|
$filesystem = new \Yggverse\Yoda\Model\Filesystem( |
|
( |
|
getenv('HOME') ?? __DIR__ . DIRECTORY_SEPARATOR . '..' |
|
) . DIRECTORY_SEPARATOR . '.yoda' |
|
); |
|
|
|
// Init database |
|
$database = new \Yggverse\Yoda\Model\Database( |
|
$filesystem->getAbsolute( |
|
'database.sqlite' |
|
) |
|
); |
|
|
|
// Init GTK |
|
\Gtk::init(); |
|
|
|
// Init browser |
|
$browser = new \Yggverse\Yoda\Entity\Browser( |
|
$database |
|
); |
|
|
|
$browser->gtk->connect( |
|
'destroy', |
|
function() |
|
{ |
|
\Gtk::main_quit(); |
|
} |
|
); |
|
|
|
\Gtk::main(); |