Re: Packaging and Distributing Dlang Applications with GtkD Dependency?

2019-09-28 Thread Jordi Sayol via Digitalmars-d-learn
El 25/9/19 a les 13:46, Ron Tarrant via Digitalmars-d-learn ha escrit:
> Hi y'all,
> 
> I've been Googling how to do this, but coming up with nothing definitive. Are 
> there any articles for how to do this for:
> 
> Windows?
> Linux?
> other UNIX-alike OSs?

On Bebian/Ubuntu/Linux Mint, You have "d-apt" 

If you static links your d program, you don't need any package from it at 
runtime.
But if you dynamic links it, you've runtime libraries for GtkD "libgtkd3-nn" 
and TkD "libtkd-nn" on "d-apt".
"nn" on library name should be replaced with the DMD major version (without 
initial zero). 
i.e. For the last DMD version, "libgtkd3-88" or "libtkd-88".


Re: Linux & DMD & GtkD

2019-02-17 Thread Jordi Sayol via Digitalmars-d-learn
El 17/2/19 a les 15:19, Jordi Sayol ha escrit:
> Then you can compile/run a GtkD example contained on gtkd doc archive. To do 
> that just run the next line:
> 
> $ dmd `pkg-config --cflags --libs gtkd-3` -run 
> /usr/share/libgtkd3-doc/demos/gtkD/TestWindow/*.d -ofTestWindow

Sorry, do not run at compile time. Just remove "-run" to properly compile the 
example:

$ dmd `pkg-config --cflags --libs gtkd-3` 
/usr/share/libgtkd3-doc/demos/gtkD/TestWindow/*.d -ofTestWindow

> 
> 
> To run the compiled example just type:
> 
> $ ./TestWindow

Regards,
Jordi


Re: Linux & DMD & GtkD

2019-02-17 Thread Jordi Sayol via Digitalmars-d-learn
El 16/2/19 a les 14:35, Ron Tarrant via Digitalmars-d-learn ha escrit:
> Hi guys,
> 
> I finally got a Linux Mint installation happening (very impressed, BTW) and 
> did the usual HelloWorld.d compile with dmd, but I'm having trouble working 
> out how to link to GtkD.
> 
> dmd -de -w -m64 -L+gtkd hello_gtkd_world.d
> 
> says it can't find MainWindow which tells me the gtkd libraries are not 
> installed, are not included in the path, or some other oversight on my part.
> 
> I tried using whereis to find gtkd, but to no avail.
> 
> Questions:
> 
> 1. Am I using the right syntax in the above command line?
> 
> 2. How to search for things on Linux Mint
> 
> The recommendations I've found so far are for the gnome search tool which 
> spits out an error:
> 
> Package gnome-search-tool is not available, but is referred to by another 
> package.
> This may mean that the package is missing, has been obsoleted, or
> is only available from another source
> 

Hello Ron,

There is "d-apt"  where there are dmd and gtkd 
deb for Linux Mint.

To add this repository to your Linux Mint just run this two lines from command 
line:

$ sudo wget 
https://netcologne.dl.sourceforge.net/project/d-apt/files/d-apt.list -O 
/etc/apt/sources.list.d/d-apt.list

$ sudo apt-get update --allow-insecure-repositories && sudo apt-get -y 
--allow-unauthenticated install --reinstall d-apt-keyring && sudo apt-get update

After that you can install all the packages on "d-apt".


To install dmd compiler, dmd doc, gtkd devel and gtkd doc packages just run the 
next line:

$ sudo apt-get install dmd-compiler dmd-doc libgtkd3-dev libgtkd3-doc


Then you can compile/run a GtkD example contained on gtkd doc archive. To do 
that just run the next line:

$ dmd `pkg-config --cflags --libs gtkd-3` -run 
/usr/share/libgtkd3-doc/demos/gtkD/TestWindow/*.d -ofTestWindow


To run the compiled example just type:

$ ./TestWindow


There are more examples at /usr/share/libgtkd3-doc/demos/


Hope this help you.

Jordi


Re: dmd-2.078.2 problems with Ubuntu 17.10 32Bit

2018-02-17 Thread Jordi Sayol via Digitalmars-d-learn
El 17/02/18 a les 18:49, Martin Tschierschke via Digitalmars-d-learn ha escrit:
> But the installation via apt-get is not working without the steps already 
> mentioned in the post before! (s/http/https/  and manually import of the 
> public key)

"d-apt.list" file fixed! (s/http/https/)

d-apt public key is in the "d-apt-keyring" deb package, so you don't have to 
manually install it.

> 
> This (from https://dlang.org/download.html) is outdated for 17.10.
> 
> sudo wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O 
> /etc/apt/sources.list.d/d-apt.list
> sudo apt-get update && sudo apt-get -y --allow-unauthenticated install 
> --reinstall d-apt-keyring
> sudo apt-get update && sudo apt-get install dmd-compiler dub

It appears that everything should work on 17.10 now. I'll do more tests on a 
virtual machine.




Re: dmd-2.078.2 problems with Ubuntu 17.10 32Bit

2018-02-13 Thread Jordi Sayol via Digitalmars-d-learn
El 13/02/18 a les 08:03, Martin Tschierschke via Digitalmars-d-learn ha escrit:
> On Monday, 12 February 2018 at 21:18:01 UTC, Jordi Sayol wrote:
>> El 12/02/18 a les 21:56, Martin Tschierschke via Digitalmars-d-learn ha 
>> escrit:
>>> I just started to play around with D again on my notebook at home and 
>>> realized,
>>> that I have a broken installation.
>>> Even the minimal D "hello world" throws an error at execution.
>>> Speicherzugriffsfehler (Speicherabzug geschrieben) aka. core dump
>>>
>>> Compiling with ldc2 still works.
>>> Any hint?
>>>
>>>
>>>
>>
>> d-apt 
> 
> After setting ulimit -c unlimited to get the core dumped, I took a look with 
> gdb,
> to find a hint, now realizing, that it is probably the same problem as here:
> https://forum.dlang.org/thread/jjaynewwdsyntyehv...@forum.dlang.org?page=1
> 

A fresh install from d-apt on Ubuntu 16.04 32-bit, and everything worked fine.

test.d

import std.stdio;

void main()
{
writeln("Hello world!");
}


$ rdmd test.d 
Hello world!

$ dmd -run test.d 
Hello world!



Re: dmd-2.078.2 problems with Ubuntu 17.10 32Bit

2018-02-12 Thread Jordi Sayol via Digitalmars-d-learn
El 12/02/18 a les 21:56, Martin Tschierschke via Digitalmars-d-learn ha escrit:
> I just started to play around with D again on my notebook at home and 
> realized,
> that I have a broken installation.
> Even the minimal D "hello world" throws an error at execution.
> Speicherzugriffsfehler (Speicherabzug geschrieben) aka. core dump
> 
> Compiling with ldc2 still works.
> Any hint?
> 
> 
> 

d-apt 


Re: D, GTK, Qt, wx,…

2016-05-29 Thread Jordi Sayol via Digitalmars-d-learn
El 29/05/16 a les 13:03, Russel Winder via Digitalmars-d-learn ha escrit:
> GKT+ has a reputation for being dreadful on OSX and even worse on
> Windows. Qt on the other hand has a reputation for being the most
> portable – though clearly wx is (arguable) the most portable.
> 
> We have GtkD which is brilliant, especially as it has GStreamer
> support.
> 
> From what I can tell QtD is in need of effort or restarting.
> 
> Is there even a wxD?
> 
> Or perhaps there is an alternative that fits the bill of being
> production ready now, and either gives the same UI across all platforms
> or provides a platform UI with no change of source code, just a
> recompilation.
> 

https://github.com/nomad-software/tkd




Re: Let dmd or ldc be easy to setup on Ubuntu

2015-12-22 Thread Jordi Sayol via Digitalmars-d-learn
El 22/12/15 a les 18:28, Jordi Sayol via Digitalmars-d-learn ha escrit:
> "d-lang" splits it in few deb packages:

s/d-lang/d-apt/


Re: Let dmd or ldc be easy to setup on Ubuntu

2015-12-22 Thread Jordi Sayol via Digitalmars-d-learn
El 22/12/15 a les 16:38, FrankLike via Digitalmars-d-learn ha escrit:
> sudo apt-get install dmd ← it's error.

dmd_2.069.2-0-amd64.deb from http://downloads.dlang.org/ is an all-in-one deb 
package, containing all the tools and libraries for each release.

"d-lang" splits it in few deb packages:

dmd-bin (compiler and other executable files)
dmd-doc (documentation, man pages and examples)
libphobos2-69 (shared library)
libphobos2-dev (static library, symlink to shared library, module sources 
and pkg-config files)

So if you want to install dmd compiler, just type:
$ sudo apt-get install dmd-bin

Regards,
Jordi





Re: Hello World Example with Glade?

2015-09-11 Thread Jordi Sayol via Digitalmars-d-learn
El 11/09/15 a les 09:13, Mike McKee via Digitalmars-d-learn ha escrit:
> On Friday, 11 September 2015 at 06:53:07 UTC, Mike James wrote:
>> There's a Glade example in the demos/builder directory...
> 
> I'm having trouble installing GtkD on Ubuntu Linux 14.04. I did the apt steps 
> from here:
> 
> http://d-apt.sourceforge.net/
> 
> $ sudo su
> # wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O 
> /etc/apt/sources.list.d/d-apt.list
> # apt-get update && apt-get -y --allow-unauthenticated install --reinstall 
> d-apt-keyring && apt-get update
> # apt-get install libgtkd3-dev libgtkd3-doc
> 
> I then run the following and it fails:
> 
> # dmd test1.d
> test1.d(1): Error: module gtk is in file 'gtk.d' which cannot be read
> import path[0] = /usr/include/dmd/phobos
> import path[1] = /usr/include/dmd/druntime/import
> 


On  there is the "pkg-config" section:

---
pkg-config:
Every dev package contains "pkg-config" (shared and static) configuration 
files for the specific library.
i.e. link GtkD2 applications against "libgtkd2.so" and "libphobos2.so" 
shared libraries:
$ dmd `pkg-config --cflags --libs gtkd2` my_gtkd2_app.d
or link GtkD2 applications against "libgtkd2.a" and "libphobos2.a" static 
libraries:
$ dmd `pkg-config --cflags --libs gtkd2-static` my_gtkd2_app.d
---

Best regards


Re: Hello World Example with Glade?

2015-09-11 Thread Jordi Sayol via Digitalmars-d-learn
El 11/09/15 a les 11:05, Jordi Sayol via Digitalmars-d-learn ha escrit:
> El 11/09/15 a les 09:13, Mike McKee via Digitalmars-d-learn ha escrit:
>> On Friday, 11 September 2015 at 06:53:07 UTC, Mike James wrote:
>>> There's a Glade example in the demos/builder directory...
>>
>> I'm having trouble installing GtkD on Ubuntu Linux 14.04. I did the apt 
>> steps from here:
>>
>> http://d-apt.sourceforge.net/
>>
>> $ sudo su
>> # wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O 
>> /etc/apt/sources.list.d/d-apt.list
>> # apt-get update && apt-get -y --allow-unauthenticated install --reinstall 
>> d-apt-keyring && apt-get update
>> # apt-get install libgtkd3-dev libgtkd3-doc
>>
>> I then run the following and it fails:
>>
>> # dmd test1.d
>> test1.d(1): Error: module gtk is in file 'gtk.d' which cannot be read
>> import path[0] = /usr/include/dmd/phobos
>> import path[1] = /usr/include/dmd/druntime/import
>>
> 
> 
> On <http://d-apt.sourceforge.net/> there is the "pkg-config" section:
> 
> ---
> pkg-config:
> Every dev package contains "pkg-config" (shared and static) configuration 
> files for the specific library.
> i.e. link GtkD2 applications against "libgtkd2.so" and "libphobos2.so" 
> shared libraries:
> $ dmd `pkg-config --cflags --libs gtkd2` my_gtkd2_app.d
> or link GtkD2 applications against "libgtkd2.a" and "libphobos2.a" static 
> libraries:
> $ dmd `pkg-config --cflags --libs gtkd2-static` my_gtkd2_app.d
> ---

Just replace "gtkd2" by "gtkd3"

$ dmd `pkg-config --cflags --libs gtkd3` my_glade_app.d
$ dmd `pkg-config --cflags --libs gtkd3-static` my_glade_app.d

This works out of the box with the "builderTest.d" example on GtkD demos folder.

Regards


Re: tkd - basic compilation problem

2015-07-01 Thread Jordi Sayol via Digitalmars-d-learn


El 30/06/15 a les 16:28, Paul via Digitalmars-d-learn ha escrit:
 Using dub I get this during linking:

 Building tkd-test ~master configuration application, build type debug.
 Compiling using dmd...
 Linking...
 /usr/bin/ld: cannot find -ltcl
 /usr/bin/ld: cannot find -ltk

 ...any suggestions please?


If you are in Debian, Ubuntu, Linuxmint, etc, you can use the d-apt repository:

http://d-apt.sourceforge.net/

There are deb packages for tkd:

$ sudo apt-get install libtkd-dev libtkd-doc

You can compile the example application included on libtkd-doc deb package to 
test if tkd is properly installed on your system:

For shared linking against libphobos2.so and libtkd.so:
$ dmd `pkg-config --cflags --libs tkd` -J/usr/share/libtkd-doc/example/media/ 
/usr/share/libtkd-doc/example/example.d

For static linking against libphobos2.a and libtkd.a:
$ dmd `pkg-config --cflags --libs tkd-static` 
-J/usr/share/libtkd-doc/example/media/ /usr/share/libtkd-doc/example/example.d

Best regards,
Jordi




Re: Can't install dub on Debian

2014-11-13 Thread Jordi Sayol via Digitalmars-d-learn
El 13/11/14 a les 07:29, Suliman via Digitalmars-d-learn ha escrit:
...
 Description:Debian GNU/Linux 6.0.9 (squeeze)
...

packages on d-apt repository are created for multiarch systems, Debian 7.x.x 
and Ubuntu 12.04. Old stable Debian 6.x.x is not.

If you want to install dub deb package from d-apt on Debian 6.x.x I recomend 
you to install first the all-in-one dmd deb package from dlang.org: 
http://downloads.dlang.org/releases/2014/dmd_2.066.1-0_amd64.deb
then try to install dub deb package again. You can download it from here: 
http://sourceforge.net/projects/d-apt/files/pool/main/d/dub/dub_0.9.22-0_amd64.deb/download

I cannot assure that you will be able to install this dub deb package because 
it is designed for multi-arch systems.

Regards,
-- 
Jordi Sayol


Re: Configuring Phobos from the 1-click installer

2014-05-11 Thread Jordi Sayol via Digitalmars-d-learn
El 11/05/14 07:34, Moses via Digitalmars-d-learn ha escrit:
 On Sunday, 11 May 2014 at 04:33:24 UTC, Ali Çehreli wrote:
 On 05/10/2014 07:12 PM, Moses wrote:
 After using the 1-click Ubuntu installer, I'm having trouble figuring
 out how to import standard library functions for Phobos. I get the message:

 Error: module io is in file 'std/std/io.d' which cannot be read

 Judging from the repeated stds up there I think you put a dot before io:

 import std.std.io;  // -- WRONG

 The second dot should not be there. Do this instead:

 import std.stdio;  // -- correct

 Ali
 
 
 Thanks, I also found that I need to include the flag 
 -I/usr/include/dmd/phobos to get it to compile. I tried doing:
 
 export PATH=$PATH:/usr/include/dmd/phobos
 
 but apparently I still need the -I flag. Is there another way to get around 
 this?
 

PATH environment variable is not related at all with phobos2 sources paths.

All Linux packages (Ubuntu too) includes -I/usr/include/dmd/phobos on 
/etc/dmd.conf configuration file.
If you need to explicit pass this argument to dmd compiler, may be due to 
several reasons.

- You've edited your /etc/dmd.conf file.

- You've created a new dmd.conf on your current directory, on you home 
directory or on dmd command directory (/usr/bin/).

Any dmd.conf file on these places, overrides /etc/dmd.conf

Take a look at:
$ cat /etc/dmd.conf

Regard,
-- 
Jordi Sayol