FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Proper installation and configuration of Poseidon

 
Post new topic   Reply to topic     Forum Index -> Poseidon
View previous topic :: View next topic  
Author Message
Fileburner



Joined: 28 Apr 2009
Posts: 11

PostPosted: Tue Apr 28, 2009 7:23 pm    Post subject: Proper installation and configuration of Poseidon Reply with quote

Hello,

I am trying to install Poseidon to develop D programs but I am having many problems like compiling .... I am trying to start D programming with Tango and DWT, but still can't figure out how to configure the IDE. if anyone can please tell me or link me to a tutorial how to properly configure Poseidon (compiler, debugger, libraries ...).

I used to program in Java and .Net but you know these languages have all IDE already configured and ready for Dev Razz

many thanx.
Back to top
View user's profile Send private message
keinfarbton



Joined: 03 Dec 2005
Posts: 224
Location: Stuttgart - Germany

PostPosted: Sun May 03, 2009 12:36 am    Post subject: Reply with quote

Here a description:
1. Get dmd 1.042, Tango 0.99.8 and rake
2. Get DWT2 "hg clone http://hg.dsource.org/projects/dwt2"
3. Build the libs "rake swt equinox core jface"
4. Create your project dir with the rakefile and the src/Snippet040TableViewerSorting.d (see later)
5. Create the Poseidon Project
General->FileList: your sources, here the src/Snippet040TableViewerSorting.d
Include and Libs->Directory: dwt2/imp and tango
Include and Libs->Library: all .lib files from dwt2/lib
Include and Libs->ImportExpression Path: dwt2/res
6. Configure the dmd path:
Tools->Options->Compiler & Debugger->DMD Path: e.g.
C:\Project\dwtinst\dmd-1.042\dmd\windows
Now, if a source file is opened, the "compile current file" (F7) shall work.
7. Create the external tools entry for rake:
Toolbar->most right drop down entry->customize...->Add->
Name: Rake
Command: cmd
Arguments: /c rake
Initial dir: $(ProjectDir)
All checkboxes checked.
Now dropdown, "Rake" shall work.

Frank


rakefile
Code:
##########################################################################
# DWT2
#
require 'find'
require 'fileutils'

DIR_DWT2      = "C:/project/dwtinst/dwt-rcp"
DIR_DWT2_IMP  = File.join(DIR_DWT2, "imp")
DIR_DWT2_RES  = File.join(DIR_DWT2, "res")
DIR_DWT2_LIB  = File.join(DIR_DWT2, "lib")


##########################################################################
# Helpers
#
class String
    def to_path
        if isWindows
            self.gsub( '/', '\\' );
        else
            self
        end
    end
end

def isWindows
    Config::CONFIG['host_os'] =~ /mswin/
end

##########################################################################
# Constants
#
DIR_OBJ     = File.expand_path("obj")
DIR_IMP     = File.expand_path("imp")
DIR_RES     = File.expand_path("res")
DIR_LIB     = File.expand_path("lib")
DIR_BIN     = File.expand_path("bin")
FILE_RSP    = File.expand_path("rsp")

LOG_STDOUT  = File.expand_path("olog.txt")
LOG_STDERR  = File.expand_path("elog.txt")


if isWindows
    BASEDIR_SWT = "org.eclipse.swt.win32.win32.x86"
    LIBEXT   = ".lib"
    OBJEXT   = ".obj"
    EXEEXT   = ".exe"
    MAPEXT   = ".map"
    PROG_LIB = "lib.exe"
    DIR_WINLIBS = File.expand_path(File.join(BASEDIR_SWT,"lib"))
else
    BASEDIR_SWT = "org.eclipse.swt.gtk.linux.x86"
    LIBEXT   = ".a"
    OBJEXT   = ".o"
    EXEEXT   = ""
    PROG_LIB = "ar"
end
PROG_DMD = "dmd#{EXEEXT}"

if isWindows
    #LIBNAMES_BASIC  = [ "dwt-base" ]
    LIBNAMES_BASIC  = [ "advapi32", "comctl32", "comdlg32", "gdi32", "kernel32",
                        "shell32", "ole32", "oleaut32", "olepro32", "oleacc",
                        "user32", "usp10", "msimg32", "opengl32", "shlwapi",
                        "zlib", "dwt-base" ]

else
    SONAMES_BASIC   = [ "gtk-x11-2.0", "gdk-x11-2.0", "atk-1.0", "gdk_pixbuf-2.0",
                        "gthread-2.0", "pangocairo-1.0", "fontconfig", "Xtst",
                        "Xext", "Xrender", "Xinerama", "Xi", "Xrandr", "Xcursor",
                        "Xcomposite", "Xdamage", "X11", "Xfixes", "pango-1.0",
                        "gobject-2.0", "gmodule-2.0", "dl", "glib-2.0", "cairo",
                        "gnomeui-2" ]
    LIBNAMES_BASIC  = [ "dwt-base" ]

end
LIBNAMES_SWT        = [ BASEDIR_SWT ]
LIBNAMES_ICU        = [ "com.ibm.icu" ]
LIBNAMES_EQUINOX    = [ "org.eclipse.osgi.osgi",
                        "org.eclipse.osgi.supplement",
                        "org.eclipse.equinox.common" ]

LIBNAMES_CORE       = [ "org.eclipse.core.runtime",
                        "org.eclipse.core.commands",
                        "org.eclipse.core.databinding",
                        "org.eclipse.core.databinding.beans",
                        "org.eclipse.core.jobs" ]

LIBNAMES_JFACE      = [ "org.eclipse.jface" ]

LIBNAMES_JFACEBIND  = [ "org.eclipse.jface.databinding" ]

LIBNAMES_JFACETEXT  = [ "org.eclipse.text",
                        "org.eclipse.jface.text.projection",
                        "org.eclipse.jface.text", ]

LIBNAMES_UIFORMS    = [ "org.eclipse.ui.forms" ]

LIBNAMES_DRAW2D     = [ "org.eclipse.draw2d" ]


##########################################################################
# Routines
#
def isDebug
    if ENV['DEBUG']
        ENV['DEBUG'] == "1"
    else
        false
    end
end

def buildApp( basedir, srcdir, resdir, dflags, appnameprefix, appname, filelist, libnames )
    if filelist == nil
        filelist = FileList[ "**/#{appname}.d" ]
    end

    srcdir_abs = File.expand_path( File.join( basedir, srcdir))
    resdir_abs = File.expand_path( File.join( basedir, resdir))

    rsp = File.new( FILE_RSP, "w+" )
    rsp.puts "-I#{srcdir_abs.to_path}"
    rsp.puts "-I#{DIR_IMP.to_path}"
    rsp.puts "-J#{resdir_abs.to_path}"
    rsp.puts "-J#{DIR_RES.to_path}"
    rsp.puts "-I#{DIR_DWT2_IMP.to_path}"
    rsp.puts "-J#{DIR_DWT2_RES.to_path}"
    if isDebug
        rsp.puts "-debug"
        rsp.puts "-g"
    end
    if dflags.size > 0 then
        rsp.puts dflags
    end

    rsp.puts "-op"
    rsp.puts "-od#{DIR_OBJ.to_path}"
    applfile = File.join(DIR_BIN ,appnameprefix+appname+EXEEXT)
    rsp.puts "-of#{applfile.to_path}"
    filelist.each do |path|
        rsp.puts File.expand_path(path).to_path[ srcdir_abs.size+1 .. -1 ]
    end

    if isWindows
        rsp.puts "-L/NOM"
        libnames.each do | libname |
            rsp.puts "-L+#{libname}#{LIBEXT}"
        end
        rsp.puts "-L+#{DIR_LIB.to_path}\\"
        rsp.puts "-L+#{DIR_DWT2_LIB.to_path}\\"
    else
        rsp.puts "-L-L#{DIR_LIB.to_path}"
        libnames.reverse.each do | libname |
            absname = File.join( DIR_LIB, "#{libname}#{LIBEXT}" );
            rsp.puts absname
        end
        SONAMES_BASIC.reverse.each do | soname |
            rsp.puts "-L-l#{soname}"
        end
    end

    rsp.close

    Dir.chdir(srcdir_abs) do
        if isWindows
            cmd = "#{PROG_DMD} @#{FILE_RSP.to_path}"
        else
            cmd = "cat #{FILE_RSP.to_path} | xargs #{PROG_DMD}"
        end
        sh cmd, :verbose => false do |ok, res|
            if !ok then
                raise "compile error"
            end
        end
    end
    if isWindows
        FileUtils.rm File.join(srcdir_abs,appname+MAPEXT), :force => true
    end

end
##########################################################################
# Targets
#
desc "Clean"
task :clean do
    puts "Cleaning"
    FileUtils.rm_rf DIR_IMP
    FileUtils.rm_rf DIR_OBJ
    FileUtils.rm_rf DIR_LIB
    FileUtils.rm_rf DIR_BIN
    FileUtils.rm_rf DIR_RES
    FileUtils.rm FILE_RSP, :force => true
    FileUtils.rm LOG_STDOUT, :force => true
    FileUtils.rm LOG_STDERR, :force => true
end


desc "Build Current Working area"
task :work do
end

desc "Build Application"
task :default do

    libnames = LIBNAMES_BASIC + LIBNAMES_SWT + LIBNAMES_EQUINOX +
               LIBNAMES_CORE + LIBNAMES_JFACE + LIBNAMES_ICU

    files = FileList[ "src/**/*.d" ]
    buildApp( ".", "src", "res", "", "", "Snippet040TableViewerSorting", files, libnames )
end
 

.project
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<projectDescription>
   <style>1</style>
   <name>JFaceSnippet</name>
   <targetName />
   <comment />
   <filter>*.d</filter>
   <showemptyfolder>0</showemptyfolder>
   <zipPath />
   <buildSpec>
      <buildType>0</buildType>
      <mainFile>src\Snippet040TableViewerSorting.d</mainFile>
      <Args />
      <options>
         <dmd />
         <tool />
         <lib />
         <extra />
         <toolextra />
         <merge>0</merge>
         <nonfiles>0</nonfiles>
      </options>
      <dmdpath />
      <dmcpath />
      <buildtoolexe />
      <projectFiles>
         <source>
            <name>src\Snippet040TableViewerSorting.d</name>
         </source>
         <interface />
         <resource />
         <othersDMD />
         <others />
      </projectFiles>
      <includePaths>
         <name>C:\Project\dwtinst\dwt-rcp\imp</name>
         <name>C:\Project\dwtinst\tango</name>
      </includePaths>
      <linkLibrarys>
         <name>C:\Project\dwtinst\dwt-rcp\lib\usp10.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\advapi32.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\com.ibm.icu.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\comctl32.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\comdlg32.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\dwt-base.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\msimg32.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\ole32.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\oleacc.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\oleaut32.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\olepro32.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\opengl32.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.core.commands.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.core.databinding.beans.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.core.databinding.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.core.jobs.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.core.runtime.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.equinox.common.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.jface.databinding.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.jface.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.jface.text.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.jface.text.projection.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.osgi.osgi.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.osgi.supplement.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.swt.win32.win32.x86.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.text.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.ui.forms.lib</name>
         <name>C:\Project\dwtinst\dwt-rcp\lib\shlwapi.lib</name>
      </linkLibrarys>
      <importExpressions>
         <name>C:\Project\dwtinst\dwt-rcp\res</name>
      </importExpressions>
   </buildSpec>
</projectDescription>

src/Snippet040TableViewerSorting.d
Code:
/*******************************************************************************
 * Copyright (c) 2006 Tom Schindl and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Tom Schindl - initial API and implementation
 * Port to the D programming language:
 *     yidabu at gmail dot com  ( D China http://www.d-programming-language-china.org/ )
 *******************************************************************************/
module Snippet040TableViewerSorting;

import java.lang.all;
import java.lang.String;

// http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet040TableViewerSorting.java?view=markup

import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ColumnLabelProvider;
import org.eclipse.jface.viewers.ColumnViewer;
import org.eclipse.jface.viewers.EditingSupport;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TableViewerColumn;
import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

version(JIVE) import jive.stacktrace;

/**
 * Example usage of ViewerComparator in tables to allow sorting
 *
 * @author Tom Schindl <tom.schindl@bestsolution.at>
 *
 */

void main(String[] args) {
    Snippet040TableViewerSorting.main(args);
}

    private class MyContentProvider : IStructuredContentProvider {

        public Object[] getElements(Object inputElement) {
            return (cast(ArrayWrapperT!(Person)) inputElement).array;
        }

        public void dispose() {
        }

        public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
        }

    }

    public class Person {
        public String givenname;
        public String surname;
        public String email;

        public this(String givenname, String surname, String email) {
            this.givenname = givenname;
            this.surname = surname;
            this.email = email;
        }

    }

    protected abstract class AbstractEditingSupport : EditingSupport {
        private TextCellEditor editor;

        public this(TableViewer viewer) {
            super(viewer);
            this.editor = new TextCellEditor(viewer.getTable());
        }

        protected bool canEdit(Object element) {
            return true;
        }

        protected CellEditor getCellEditor(Object element) {
            return editor;
        }

        protected void setValue(Object element, Object value) {
            doSetValue(element, value);
            getViewer().update(element, null);
        }

        protected abstract void doSetValue(Object element, Object value);
    }

    private abstract class ColumnViewerSorter : ViewerComparator {
        public static final int ASC = 1;

        public static final int NONE = 0;

        public static final int DESC = -1;

        private int direction = 0;

        private TableViewerColumn column;

        private ColumnViewer viewer;

        public this(ColumnViewer viewer_, TableViewerColumn column_) {
            this.column = column_;
            this.viewer = viewer_;
            this.column.getColumn().addSelectionListener(new class() SelectionAdapter {
                public void widgetSelected(SelectionEvent e) {
                    this.outer.widgetSelected(e);
                }
            });
        }

        private void widgetSelected(SelectionEvent e){
            if( viewer.getComparator() !is null ) {
                if( viewer.getComparator() is this ) {
                    int tdirection = direction;

                    if( tdirection is ASC ) {
                        setSorter(this, DESC);
                    } else if( tdirection is DESC ) {
                        setSorter(this, NONE);
                    }
                } else {
                    setSorter(this, ASC);
                }
            } else {
                setSorter(this, ASC);
            }
        }
        public void setSorter(ColumnViewerSorter sorter, int direction) {
            if( direction is NONE ) {
                column.getColumn().getParent().setSortColumn(null);
                column.getColumn().getParent().setSortDirection(SWT.NONE);
                viewer.setComparator(null);
            } else {
                column.getColumn().getParent().setSortColumn(column.getColumn());
                sorter.direction = direction;

                if( direction is ASC ) {
                    column.getColumn().getParent().setSortDirection(SWT.DOWN);
                } else {
                    column.getColumn().getParent().setSortDirection(SWT.UP);
                }

                if( viewer.getComparator() is sorter ) {
                    viewer.refresh();
                } else {
                    viewer.setComparator(sorter);
                }

            }
        }

        public int compare(Viewer viewer, Object e1, Object e2) {
            return direction * doCompare(viewer, e1, e2);
        }

        protected abstract int doCompare(Viewer viewer, Object e1, Object e2);
    }

public class Snippet040TableViewerSorting {


    public this(Shell shell) {
        TableViewer v = new TableViewer(shell, SWT.BORDER | SWT.FULL_SELECTION);
        v.setContentProvider(new MyContentProvider());

        TableViewerColumn column = new TableViewerColumn(v, SWT.NONE);
        column.getColumn().setWidth(200);
        column.getColumn().setText("Givenname");
        column.getColumn().setMoveable(true);
        column.setLabelProvider(new class() ColumnLabelProvider {
            public String getText(Object element) {
                return (cast(Person) element).givenname;
            }
        });

        column.setEditingSupport(new class(v) AbstractEditingSupport {
            public this(TableViewer t ){
                super(t);
            }
            protected Object getValue(Object element) {
                return new ArrayWrapperString((cast(Person) element).givenname);
            }
            protected void doSetValue(Object element, Object value) {
                (cast(Person) element).givenname = stringcast(value);
            }
        });

        ColumnViewerSorter cSorter = new class(v,column) ColumnViewerSorter {
            this(TableViewer t, TableViewerColumn c ){
                super(t,c);
            }
            protected int doCompare(Viewer viewer, Object e1, Object e2) {
                Person p1 = cast(Person) e1;
                Person p2 = cast(Person) e2;
                return p1.givenname.compareToIgnoreCase(p2.givenname);
            }
        };

        column = new TableViewerColumn(v, SWT.NONE);
        column.getColumn().setWidth(200);
        column.getColumn().setText("Surname");
        column.getColumn().setMoveable(true);
        column.setLabelProvider(new class() ColumnLabelProvider {
            public String getText(Object element) {
                return (cast(Person) element).surname;
            }
        });

        column.setEditingSupport(new class(v) AbstractEditingSupport {
            this(TableViewer t ){
                super(t);
            }
            protected Object getValue(Object element) {
                return stringcast((cast(Person) element).surname);
            }
            protected void doSetValue(Object element, Object value) {
                (cast(Person) element).surname = stringcast(value);
            }
        });

        new class(v,column) ColumnViewerSorter {
            this(TableViewer t, TableViewerColumn c ){
                super(t,c);
            }
            protected int doCompare(Viewer viewer, Object e1, Object e2) {
                Person p1 = cast(Person) e1;
                Person p2 = cast(Person) e2;
                return p1.surname.compareToIgnoreCase(p2.surname);
            }
        };

        column = new TableViewerColumn(v, SWT.NONE);
        column.getColumn().setWidth(200);
        column.getColumn().setText("E-Mail");
        column.getColumn().setMoveable(true);
        column.setLabelProvider(new class() ColumnLabelProvider {
            public String getText(Object element) {
                return (cast(Person) element).email;
            }
        });

        column.setEditingSupport(new class(v) AbstractEditingSupport {
            this(TableViewer t ){
                super(t);
            }
            protected Object getValue(Object element) {
                return stringcast((cast(Person) element).email);
            }
            protected void doSetValue(Object element, Object value) {
                (cast(Person) element).email = stringcast(value);
            }
        });
        new class(v,column) ColumnViewerSorter {
            this(TableViewer t, TableViewerColumn c ){
                super(t,c);
            }
            protected int doCompare(Viewer viewer, Object e1, Object e2) {
                Person p1 = cast(Person) e1;
                Person p2 = cast(Person) e2;
                return p1.email.compareToIgnoreCase(p2.email);
            }
        };

        Person[] model = createModel();
        v.setInput( new ArrayWrapperT!(Person)(model));
        v.getTable().setLinesVisible(true);
        v.getTable().setHeaderVisible(true);
        cSorter.setSorter(cSorter, ColumnViewerSorter.ASC);
    }

    private Person[] createModel() {
        Person[] elements = new Person[4];
        elements[0] = new Person("Tom", "Schindl",
                "tom.schindl@bestsolution.at");
        elements[1] = new Person("Boris", "Bokowski",
                "Boris_Bokowski@ca.ibm.com");
        elements[2] = new Person("Tod", "Creasey", "Tod_Creasey@ca.ibm.com");
        elements[3] = new Person("Wayne", "Beaton", "wayne@eclipse.org");

        return elements;
    }

    /**
     * @param args
     */
    public static void main(String[] args) {
        Display display = new Display();

        Shell shell = new Shell(display);
        shell.setLayout(new FillLayout());
        new Snippet040TableViewerSorting(shell);
        shell.open();

        while (!shell.isDisposed()) {
            if (!display.readAndDispatch())
                display.sleep();
        }
        display.dispose();
    }

}
Back to top
View user's profile Send private message
Fileburner



Joined: 28 Apr 2009
Posts: 11

PostPosted: Tue May 05, 2009 6:22 pm    Post subject: Reply with quote

Hello,

Thank you for you answer Sir,
I tried doing what you asked me to
-Downloaded the dmd 1.043 and extracted contents to "C:\Project\dwtinst"
-Downloaded DWT2 using the command you provided and copied all content to "C:\Project\dwtinst\dwt-rcp"
-Downloaded and installed ruby for windows (for Rake)
-Downloaded tango 0.99.8 and copied contents of "import" folder to "C:\Project\dwtinst\dmd-1.042\dmd\src"

but however I am stuck at step 3 while executing "rake swt equinox core jface"
Code:
C:\Project\dwtinst\dwt-rcp>rake swt equinox core jface
(in C:/Project/dwtinst/dwt-rcp)
Building org.eclipse.swt.win32.win32.x86
org\eclipse\swt\internal\Compatibility.d(15): module File cannot read file 'java\io\File.d'
rake aborted!
compile error
C:/Project/dwtinst/dwt-rcp/rakefile:164:in `buildTree'
(See full trace by running task with --trace)


however I didn't change anything just copying and pasting root folders !!
Back to top
View user's profile Send private message
keinfarbton



Joined: 03 Dec 2005
Posts: 224
Location: Stuttgart - Germany

PostPosted: Tue May 05, 2009 6:28 pm    Post subject: Reply with quote

Sorry, i forgot to build the target 'base' first.
Code:
rake base swt equinox core jface
Back to top
View user's profile Send private message
Fileburner



Joined: 28 Apr 2009
Posts: 11

PostPosted: Tue May 05, 2009 7:47 pm    Post subject: Reply with quote

thank you for your fast reply

I tried to rake again with the command you gave but still no work Crying or Very sad
Code:
C:\Project\dwtinst\dwt-rcp>rake base swt equinox core jface
(in C:/Project/dwtinst/dwt-rcp)
Building dwt-base
java\lang\reflect\Method.d(10): Error: identifier 'equals_t' is not defined
java\lang\reflect\Method.d(10): Error: equals_t is used as a type
java\lang\reflect\Method.d(10): function java.lang.reflect.Method.Method.opEqual
s of type void(Object obj) overrides but is not covariant with object.Object.opE
quals of type int(Object o)
java\lang\reflect\Method.d(10): function java.lang.reflect.Method.Method.opEqual
s does not override any function
java\lang\reflect\Field.d(8): Error: identifier 'equals_t' is not defined
java\lang\reflect\Field.d(8): Error: equals_t is used as a type
java\lang\reflect\Field.d(8): function java.lang.reflect.Field.Field.opEquals of
 type void(Object obj) overrides but is not covariant with object.Object.opEqual
s of type int(Object o)
java\lang\reflect\Field.d(8): function java.lang.reflect.Field.Field.opEquals do
es not override any function
java\lang\reflect\Constructor.d(8): Error: identifier 'equals_t' is not defined
java\lang\reflect\Constructor.d(8): Error: equals_t is used as a type
java\lang\reflect\Constructor.d(8): function java.lang.reflect.Constructor.Const
ructor.opEquals of type void(Object obj) overrides but is not covariant with obj
ect.Object.opEquals of type int(Object o)
java\lang\reflect\Constructor.d(8): function java.lang.reflect.Constructor.Const
ructor.opEquals does not override any function
rake aborted!
compile error
C:/Project/dwtinst/dwt-rcp/rakefile:164:in `buildTree'
(See full trace by running task with --trace)


much obliged.
Back to top
View user's profile Send private message
keinfarbton



Joined: 03 Dec 2005
Posts: 224
Location: Stuttgart - Germany

PostPosted: Wed May 06, 2009 12:10 am    Post subject: Reply with quote

That means your tango is not configred correctly.
you copied the tango ources, that is not needed.
here my dmd/windows/bin/sc.ini
Code:
[Version]
version=7.51 Build 020

[Environment]
LINKCMD=%@P%\link.exe
LIB="%@P%\..\..\..\..\tango\lib"
DFLAGS="-I%@P%\..\..\..\..\tango" -version=Tango -defaultlib=tango-base-dmd.lib -debuglib=tango-base-dmd.lib -L+tango-user-dmd


the path in the -I option must point to the tango dir, where also the file "object.di" is located.
Back to top
View user's profile Send private message
Fileburner



Joined: 28 Apr 2009
Posts: 11

PostPosted: Wed May 06, 2009 6:23 pm    Post subject: Reply with quote

THAAAAAAAAAAANNNNNNNNNNNNXXXXXXXXXX so much it finally worked Laughing thank you very much ^^.

I had problem with my PATH variable whiche was pointing to another version of dmd, i did everything and compiled and got the result Very Happy thank you so much, I am so happy that no word can express my happyness Razz

if you allow me to ask some other questions please.

1- Why do I need rake ? I tried to build in the regular way but didn't success, I get a corrupted exe.

2- While compiling using Rake the file compiles and I get the .exe file, but I get this warning
Code:
OPTLINK (R) for Win32  Release 8.00.1
Copyright (C) Digital Mars 1989-2004  All rights reserved.
org.eclipse.swt.win32.win32.x86
 Warning 2: File Not Found org.eclipse.swt.win32.win32.x86
is this normal, however I have "org.eclipse.swt.win32.win32.x86.lib" in the lib folder, (seems that it needs file extention ".lib" right ?)

3- after I checked the .exe file it was 5.45MB isn't it a bit huge Razz, moreover when I execute it, it show a console window and then the window with te grid appears, ofcourse when I close the console windows it closes the program, how can I make it execute without showing Console window.

Thank you for your support ^_^.


EDIT : for the console showing before the window, I added "-L/su:windows:5" to sc.ini and it worked but still exe's size is big.
Back to top
View user's profile Send private message
keinfarbton



Joined: 03 Dec 2005
Posts: 224
Location: Stuttgart - Germany

PostPosted: Thu May 07, 2009 6:09 am    Post subject: Reply with quote

1. You don't have to use rake. I have had trouble with both tools like bud/dsss/rebuild. So I created a build process that serves my needs while working on dwt. In you case, there might be much more easy ways. Why your exe with the "regular way" was corrupted, i don't know.

2. This is a bug in the linker i think. I created a bug report, see: http://d.puremagic.com/issues/show_bug.cgi?id=2857

3. Yes it is huge. The problem is, that D still does not support an easy way to create DLLs. There might be ways to do it with DDL, but I haven't had time to work it out. Perhaps someone is willing to explore that Wink
Back to top
View user's profile Send private message
Fileburner



Joined: 28 Apr 2009
Posts: 11

PostPosted: Thu May 07, 2009 11:57 am    Post subject: Reply with quote

thank you very much for your support

about the direct compile and build I tried it again just now I get this warnings however I get the .exe file
Code:
Command >>> Building Project: test......
C:\Project\dwtinst\dmd-1.042\dmd\windows\bin\dmd.exe  C:\tt\Snippet040TableViewerSorting.obj -oftest -IC:\Project\dwtinst\dwt-rcp\imp;C:\Project\dwtinst\dmd-1.042\dmd\src\tango -JC:\Project\dwtinst\dwt-rcp\res C:\Project\dwtinst\dwt-rcp\lib\advapi32.lib C:\Project\dwtinst\dwt-rcp\lib\com.ibm.icu.lib C:\Project\dwtinst\dwt-rcp\lib\comctl32.lib C:\Project\dwtinst\dwt-rcp\lib\comdlg32.lib C:\Project\dwtinst\dwt-rcp\lib\dwt-base.lib C:\Project\dwtinst\dwt-rcp\lib\msimg32.lib C:\Project\dwtinst\dwt-rcp\lib\ole32.lib C:\Project\dwtinst\dwt-rcp\lib\oleacc.lib C:\Project\dwtinst\dwt-rcp\lib\oleaut32.lib C:\Project\dwtinst\dwt-rcp\lib\olepro32.lib C:\Project\dwtinst\dwt-rcp\lib\opengl32.lib C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.core.commands.lib C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.core.databinding.beans.lib C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.core.databinding.lib C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.core.jobs.lib C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.core.runtime.lib C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.equinox.common.lib C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.jface.databinding.lib C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.jface.lib C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.osgi.osgi.lib C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.osgi.supplement.lib C:\Project\dwtinst\dwt-rcp\lib\org.eclipse.swt.win32.win32.x86.lib C:\Project\dwtinst\dwt-rcp\lib\shlwapi.lib C:\Project\dwtinst\dwt-rcp\lib\usp10.lib


OPTLINK (R) for Win32  Release 8.00.1
Copyright (C) Digital Mars 1989-2004  All rights reserved.
org.eclipse.swt.win32.win32.x86
 Warning 2: File Not Found org.eclipse.swt.win32.win32.x86


Finished

but still doesn't lauch from cmd nor from double click, if you have some time please take a look at the exe file
Code:
http://rapidshare.com/files/230298406/test.7z.html


thank you ^^.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Poseidon All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group