# HG changeset patch # User Graham St Jack # Date 1249307395 -34200 # Node ID 960b408d3ac5b0e8e409e324b70749424a0cc915 # Parent 1754cb773d415cb930d5badb5bb65c3c776f485e Builds and runs ok with builder now. Still heaps of cleaning up to do, especially code roughly imported from dog. diff -r 1754cb773d41 -r 960b408d3ac5 builder.d --- 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); diff -r 1754cb773d41 -r 960b408d3ac5 doodle/common/undo.d --- 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(); diff -r 1754cb773d41 -r 960b408d3ac5 doodle/fig/selection_layer.d --- 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 { diff -r 1754cb773d41 -r 960b408d3ac5 doodle/gtk/toolbar.d --- 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; diff -r 1754cb773d41 -r 960b408d3ac5 doodle/import/model.d --- 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; } } diff -r 1754cb773d41 -r 960b408d3ac5 doodle/import/network.d --- 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); } + +} diff -r 1754cb773d41 -r 960b408d3ac5 doodle/import/new.d --- 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(); } + +} diff -r 1754cb773d41 -r 960b408d3ac5 doodle/import/p-model.d --- 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 { - } -} diff -r 1754cb773d41 -r 960b408d3ac5 doodle/import/p_model.d --- /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 { + } +} + +} diff -r 1754cb773d41 -r 960b408d3ac5 doodle/import/types.d --- 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() { diff -r 1754cb773d41 -r 960b408d3ac5 doodle/main/undo_manager.d --- 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) { diff -r 1754cb773d41 -r 960b408d3ac5 doodle/tk/misc.d --- 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; diff -r 1754cb773d41 -r 960b408d3ac5 doodle/tk/types.d --- 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; diff -r 1754cb773d41 -r 960b408d3ac5 options --- 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