changeset 29:960b408d3ac5

Builds and runs ok with builder now. Still heaps of cleaning up to do, especially code roughly imported from dog.
author Graham St Jack <graham.stjack@internode.on.net>
date Mon, 03 Aug 2009 23:19:55 +0930
parents 1754cb773d41
children 4a688da41f1a
files builder.d doodle/common/undo.d doodle/fig/selection_layer.d doodle/gtk/toolbar.d doodle/import/model.d doodle/import/network.d doodle/import/new.d doodle/import/p-model.d doodle/import/p_model.d doodle/import/types.d doodle/main/undo_manager.d doodle/tk/misc.d doodle/tk/types.d options
diffstat 14 files changed, 171 insertions(+), 154 deletions(-) [+]
line wrap: on
line diff
--- a/builder.d	Sun Aug 02 16:27:21 2009 +0930
+++ b/builder.d	Mon Aug 03 23:19:55 2009 +0930
@@ -44,10 +44,10 @@
 //
 // The directory structure within a bundle is:
 //
-//  +--configure                Script to set up the build directory and check for assumed system libraries
-//  |
-//  +--repackage                Script to produce a source tarball that can be built with dsss
-//  |
+//  +--README                   Introductory information
+//  +--configure.d              D script to set up a build directory
+//  +--builder.d                This file
+//  +--options                  Compiler options
 //  +--uses                     Specifies which other bundles to use, with paths relative to this bundle
 //  |
 //  +--product-name(s)          Provides namespace - only contains packages
@@ -505,11 +505,12 @@
         writefln("Object    %s", mPath);
         scope cmd = new StringFormatter;
 
-        cmd.format("dmd -c @%s", Global.optionsPath);
+        cmd.format("dmd -c");
         foreach (path; Global.bundlePaths) {
             cmd.format(" -I", path);
         }
         cmd.format(" -od%s -of%s %s", dirname(mPath), basename(mPath), mSource.mPath);
+        cmd.format(" @%s", Global.optionsPath);
 
         if (std.process.system(cmd.str)) {
             writefln("%s", cmd.str);
@@ -590,7 +591,7 @@
         writefln("Program   %s", mPath);
         scope cmd = new StringFormatter();
 
-        cmd.format("dmd -g @%s -L-L%s", Global.optionsPath, join(Global.buildPath, "lib"));
+        cmd.format("dmd -g -L-L%s", join(Global.buildPath, "lib"));
         cmd.format(" -of%s %s", mPath, mObject.mPath);
 
         // add the libraries we need
@@ -604,6 +605,7 @@
         foreach_reverse (lib; libs) {
             cmd.format(" -L-l%s", lib.mName);
         }
+        cmd.format(" @%s", Global.optionsPath);
 
         if (std.process.system(cmd.str)) {
             writefln("%s", cmd.str);
--- a/doodle/common/undo.d	Sun Aug 02 16:27:21 2009 +0930
+++ b/doodle/common/undo.d	Mon Aug 03 23:19:55 2009 +0930
@@ -1,4 +1,4 @@
-module common.undo;
+module doodle.common.undo;
 
 abstract class Action {
     void undo();
--- a/doodle/fig/selection_layer.d	Sun Aug 02 16:27:21 2009 +0930
+++ b/doodle/fig/selection_layer.d	Mon Aug 03 23:19:55 2009 +0930
@@ -1,4 +1,4 @@
-module fig.selection_layer;
+module doodle.fig.selection_layer;
 
 /*
 public {
--- a/doodle/gtk/toolbar.d	Sun Aug 02 16:27:21 2009 +0930
+++ b/doodle/gtk/toolbar.d	Mon Aug 03 23:19:55 2009 +0930
@@ -1,4 +1,4 @@
-module gtk.toolbar;
+module doodle.gtk.toolbar;
 
 public {
     import gtk.Toolbar;
--- a/doodle/import/model.d	Sun Aug 02 16:27:21 2009 +0930
+++ b/doodle/import/model.d	Mon Aug 03 23:19:55 2009 +0930
@@ -11,7 +11,7 @@
 
     Fig selected() { return _selected; }
 
-    abstract void draw(Screen screen);
+    //abstract void draw(Screen screen);
 
     private {
         Fig _selected;
@@ -19,37 +19,37 @@
 }
 
 abstract class Fig {
-    DiagramElement element() { return _element; }
+    //DiagramElement element() { return _element; }
 
-    abstract void draw(Canvas canvas);
+    //abstract void draw(Canvas canvas);
 
     abstract Selector create_selector();
 
     private {
-        DiagramElement _element;
+        //DiagramElement _element;
     }
 }
 
 abstract class NetFig : Fig {
-    GraphElement element() { return _element; }
+    //GraphElement element() { return _element; }
 
     private {
-        GraphElement _element;
+        //GraphElement _element;
     }
 }
 
 abstract class EdgeFig : NetFig {
-    GraphEdge element() { return _element; }
+    //GraphEdge element() { return _element; }
 
     private {
-        GraphEdge _element;
+        //GraphEdge _element;
     }
 }
 
 abstract class NodeFig : NetFig {
-    GraphNode element() { return _element; }
+    //GraphNode element() { return _element; }
 
     private {
-        GraphNode _element;
+        //GraphNode _element;
     }
 }
--- a/doodle/import/network.d	Sun Aug 02 16:27:21 2009 +0930
+++ b/doodle/import/network.d	Mon Aug 03 23:19:55 2009 +0930
@@ -1,6 +1,8 @@
-module presentation.network;
+module doodle.presentation.network;
 
-import presentation.model;
+//import doodle.presentation.model;
+
+version(none) {
 
 enum EdgeEnd {
     Source,
@@ -95,3 +97,5 @@
     // Attempt to really remove an edge...
     void disconnect(GraphEdge edge);
 }
+
+}
--- a/doodle/import/new.d	Sun Aug 02 16:27:21 2009 +0930
+++ b/doodle/import/new.d	Mon Aug 03 23:19:55 2009 +0930
@@ -1,4 +1,6 @@
-import types;
+version(none) {
+
+//import doodle.import.types;
 import tango.util.collection.ArraySeq;
 
 interface IProperty {
@@ -38,3 +40,5 @@
     IGraphElement element();
     IGraphEdge[] edges();
 }
+
+}
--- a/doodle/import/p-model.d	Sun Aug 02 16:27:21 2009 +0930
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-module dog.presentation.model;
-
-import dog.presentation.types;
-import util.list;
-
-class Property {
-    this(char[] key, char[] value) {
-        _key = key;
-        _value = value;
-    }
-
-    char[] key() { return _key; }
-    char[] value() { return _value; }
-
-    private {
-        char[] _key;
-        char[] _value;
-    }
-}
-
-interface IVisitor {
-    void visit(GraphEdge);
-    void visit(GraphNode);
-}
-
-class Diagram {
-}
-
-abstract class DiagramElement {
-    this() {
-        _is_visible = true;
-    }
-
-    abstract void accept(in IVisitor visitor);
-
-    bool is_visible() { return _is_visible; }
-
-    void add_property(Property property) {
-        // TODO
-        _properties.addTail(property);
-    }
-
-    private {
-        List!(Property) _properties;
-        bool _is_visible;
-        GraphElement _container;
-    }
-}
-
-abstract class SemanticModelBridge {
-    this(char[] presentation) {
-        _presentation = presentation;
-    }
-
-    char[] presentation() { return _presentation; }
-
-    private {
-        char[] _presentation;
-    }
-}
-
-class SimpleSemanticModelElement : SemanticModelBridge {
-    this(char[] type_info, char[] presentation) {
-        super(presentation);
-        _type_info = type_info;
-    }
-
-    char[] type_info() { return _type_info; }
-
-    private {
-        char[] _type_info;
-    }
-}
-
-abstract class GraphElement : DiagramElement {
-    this() {
-    }
-
-    void add_anchorage(GraphConnector anchorage) {
-        // TODO
-    }
-
-    void remove_anchorage(GraphConnector anchorage) {
-    }
-
-    private {
-        SemanticModelBridge _semantic_model;
-        Point _position;
-        List!(GraphConnector) _anchorages;
-        List!(DiagramElement) _containeds;
-    }
-}
-
-class GraphConnector {
-    this(Point point) {
-        _point = point;
-    }
-
-    private {
-        Point _point;
-        GraphElement _element;
-        GraphEdge[] _edges;
-    }
-}
-
-class GraphEdge : GraphElement {
-    this() {
-    }
-
-    void accept(IVisitor visitor) {
-        visitor.visit(this);
-    }
-
-    private {
-    }
-}
-
-class GraphNode : GraphElement {
-    this() {
-    }
-
-    void accept(IVisitor visitor) {
-        visitor.visit(this);
-    }
-
-    private {
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doodle/import/p_model.d	Mon Aug 03 23:19:55 2009 +0930
@@ -0,0 +1,132 @@
+//module doodle.dog.presentation.model;
+
+version(none) {
+
+import doodle.presentation.types;
+import util.list;
+
+class Property {
+    this(char[] key, char[] value) {
+        _key = key;
+        _value = value;
+    }
+
+    char[] key() { return _key; }
+    char[] value() { return _value; }
+
+    private {
+        char[] _key;
+        char[] _value;
+    }
+}
+
+interface IVisitor {
+    void visit(GraphEdge);
+    void visit(GraphNode);
+}
+
+class Diagram {
+}
+
+abstract class DiagramElement {
+    this() {
+        _is_visible = true;
+    }
+
+    abstract void accept(in IVisitor visitor);
+
+    bool is_visible() { return _is_visible; }
+
+    void add_property(Property property) {
+        // TODO
+        _properties.addTail(property);
+    }
+
+    private {
+        List!(Property) _properties;
+        bool _is_visible;
+        GraphElement _container;
+    }
+}
+
+abstract class SemanticModelBridge {
+    this(char[] presentation) {
+        _presentation = presentation;
+    }
+
+    char[] presentation() { return _presentation; }
+
+    private {
+        char[] _presentation;
+    }
+}
+
+class SimpleSemanticModelElement : SemanticModelBridge {
+    this(char[] type_info, char[] presentation) {
+        super(presentation);
+        _type_info = type_info;
+    }
+
+    char[] type_info() { return _type_info; }
+
+    private {
+        char[] _type_info;
+    }
+}
+
+abstract class GraphElement : DiagramElement {
+    this() {
+    }
+
+    void add_anchorage(GraphConnector anchorage) {
+        // TODO
+    }
+
+    void remove_anchorage(GraphConnector anchorage) {
+    }
+
+    private {
+        SemanticModelBridge _semantic_model;
+        Point _position;
+        List!(GraphConnector) _anchorages;
+        List!(DiagramElement) _containeds;
+    }
+}
+
+class GraphConnector {
+    this(Point point) {
+        _point = point;
+    }
+
+    private {
+        Point _point;
+        GraphElement _element;
+        GraphEdge[] _edges;
+    }
+}
+
+class GraphEdge : GraphElement {
+    this() {
+    }
+
+    void accept(IVisitor visitor) {
+        visitor.visit(this);
+    }
+
+    private {
+    }
+}
+
+class GraphNode : GraphElement {
+    this() {
+    }
+
+    void accept(IVisitor visitor) {
+        visitor.visit(this);
+    }
+
+    private {
+    }
+}
+
+}
--- a/doodle/import/types.d	Sun Aug 02 16:27:21 2009 +0930
+++ b/doodle/import/types.d	Mon Aug 03 23:19:55 2009 +0930
@@ -1,4 +1,4 @@
-module presentation.types;
+module doodle.presentation.types;
 
 final class Point {
     this() {
--- a/doodle/main/undo_manager.d	Sun Aug 02 16:27:21 2009 +0930
+++ b/doodle/main/undo_manager.d	Mon Aug 03 23:19:55 2009 +0930
@@ -1,4 +1,4 @@
-module undo_manager;
+module doodle.main.undo_manager;
 
 version(none) {
 
--- a/doodle/tk/misc.d	Sun Aug 02 16:27:21 2009 +0930
+++ b/doodle/tk/misc.d	Mon Aug 03 23:19:55 2009 +0930
@@ -1,4 +1,4 @@
-module tk.misc;
+module doodle.tk.misc;
 
 double min(in double a, in double b) {
     return a < b ? a : b;
--- a/doodle/tk/types.d	Sun Aug 02 16:27:21 2009 +0930
+++ b/doodle/tk/types.d	Mon Aug 03 23:19:55 2009 +0930
@@ -1,4 +1,4 @@
-module tk.types;
+module doodle.tk.types;
 
 public {
     import std.string;
--- a/options	Sun Aug 02 16:27:21 2009 +0930
+++ b/options	Mon Aug 03 23:19:55 2009 +0930
@@ -1,2 +1,5 @@
+-O
+-L-lgtkdsv
+-L-lgtkdgl
 -L-lgtkd
 -L-ldl