* Might be the way to go for full runtime
*
*
- * Usage
- * seed gtkrun.js /path/to/myproject
+ * Usage: (call with wrapper to set up directories..)
+ * sh builder.sh
*
* Concepts..
* a) load dependancies.. (eg. gi's..) - derived later?
*/
// autogen?
-// sort out import path!!!
+// sort out import path - this is a bit of a mess..
GIRepository = imports.gi.GIRepository;
GLib = imports.gi.GLib;
-GIRepository.IRepository.prepend_search_path(GLib.get_home_dir() + '/.Builder/girepository-1.1');
+// we add this in, as it appears to get lost sometimes if we set it using the ENV. variable in builder.sh
+GIRepository.Repository.prepend_search_path(GLib.get_home_dir() + '/.Builder/girepository-1.2');
+//print(JSON.stringify(GIRepository.IRepository.get_search_path()));
Gtk = imports.gi.Gtk;
Gdk = imports.gi.Gdk;
GtkSource = imports.gi.GtkSource;
WebKit = imports.gi.WebKit;
Vte = imports.gi.Vte;
+
+//Gdl = imports.gi.Gdl;
-GtkClutter = imports.gi.GtkClutter;
+//GtkClutter = imports.gi.GtkClutter;
-if (GtkClutter) {
+
+if (typeof(GtkClutter) != 'undefined') {
GtkClutter.init(Seed.argv);
}
+
File = imports.File.File;
XObject = imports.XObject.XObject;
//XObject.debug = true;
Gtk.init(Seed.argv);
+Globals = imports.Globals;
+
imports.searchPath.push('/'); // allow global paths..
// error checking todo..
var gtkbuilder = false;
files.forEach(function(f) {
var fp = Seed.argv[2] + '/' + f;
- if (!fp.match(/\.bjs$/)) {
+
+
+
+ if (!fp.match(/\.js$/)) {
return;
}
- var js = fp.replace(/\.bjs$/, '.js');
+ var js = fp; //.replace(/\.js$/, '.js');
if (File.isFile(js)) {
// check file time.. = bjs is less than compiled file..
- if (File.mtime(fp) < File.mtime(js)) {
+ //if (File.mtime(fp) < File.mtime(js)) {
XObject.log("LOADING" + js);
olist.push(imports[js]);
return;
- }
-
+ //}
+ // Compiling BJS is depreciated..
+ //olist.push(imports[js]);
+ //return;
}
+
+ return;
+ /*
var gtkbuilder = new imports.Builder.Provider.File.Gtk.Gtk({ path : fp });
gtkbuilder.loadItems(function() { });
XObject.log("COMPILING" + js);
return;
}
olist.push(imports[fn]);
-
+ */
});
Gtk.main();
-
\ No newline at end of file
+