September 26, 2019
On Thursday, 26 September 2019 at 16:30:39 UTC, Andre Pany wrote:

> Dub is a tool for developers, I understand your requirements that you want target end customers of your applications. Therefore dub is the wrong tool for this job.
>
> To be more precise, gtkd is a wrapper for GTK. Gtkd is not interesting in this context, but the dependency on gtk. On windows you have the possibility to either publish your application with GTK dlls or to run gtk setup routine as part of your application setup routine or just say in your readme that the customer needs to run GTK setup on there own.
>
> On posix (linus, macos) of course you can also say in your readme that the customer should run apt-get ... to install gtk (here I do not have much knowledge on packaging).
>
> Kind regards
> Andre

Excellent. That's exactly what I needed to know, Andre. Thanks very much.
September 26, 2019
On Thursday, 26 September 2019 at 10:10:20 UTC, bioinfornatics wrote:

> I prefer to use meson a builder tool (same category tool as Make, CMake ...)
> doc: https://mesonbuild.com/Dlang-module.html
>
> Is better as it ease the packaging for fedora, debian, ubuntu and so on ...

This is good to know. Thank you, bioinfornatics.
September 27, 2019
On Wednesday, 25 September 2019 at 11:46:04 UTC, Ron Tarrant wrote:
> 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?

For macOS you should distribute a GUI application for end users as an application bundle [1]. That's basically a directory containing a specific structure. Any dependencies and resources like libraries (GTK), images and so on should be bundled inside the application bundle. Then package the application bundle inside an archive, ideally a Disk Image (DMG) [2]. The application would be completely self contained and the user can install it by dragging it to the Application directory.

There might be some specific documentation how to bundle a GTK application on macOS. I found this [3], don't know if it's good or not.

Ideally the application should be distributed on the Mac App Store. But that requires a developer account that costs money. It also has some restrictions that distribution outside of the Mac App Store doesn't have. If you cannot distribute using the Mac App Store the next best thing is to notarize the application (also requires a paid developer account, as far as I can see) before distributing it. Otherwise the user will get a dialog complaining that the application is from an unknown developer and the user need to explicitly go into System Preferences to allow it.

[1] https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1

[2] https://en.wikipedia.org/wiki/Apple_Disk_Image
[3] https://gitlab.gnome.org/GNOME/gtk-mac-bundler

--
/Jacob Carlborg
September 28, 2019
On Wednesday, 25 September 2019 at 11:46:04 UTC, Ron Tarrant wrote:
> 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:

> Linux?

For Linux there are 3 new options:

1. Appimages (https://appimage.org/): This is very similar to Window's msi installer. You can host the app installer binary in bintray or in your website.

2. Flatpaks (https://flatpak.org/): Flatpak is quickly becoming more and more popular as it provides higher level customization for desktop applications in Linux. The flatpak API is not trivial but there are tutorials available to use flatpak and meson. A well known Linux application named Tilix (https://github.com/gnunn1/tilix) has a flatpak repo (https://github.com/gnunn1/tilix/tree/master/experimental/flatpak).

3. Snap (https://snapcraft.io/): Backed by Cannonical, snap provides a really easy way to distribute applications in Linux. I personally think Snaps are easier to create although I haven't invested time in distributing an app using snap. DMD, Dub and LDC are also shipped with it.

There are tutorials for using all of those three online, but not specific to Dlang. But if you use the Meson build system there are plenty of tutorials available.





September 28, 2019
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" <https://d-apt.sourceforge.io/>

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".
September 28, 2019
28.09.2019 5:15, Hossain Adnan пишет:
> On Wednesday, 25 September 2019 at 11:46:04 UTC, Ron Tarrant wrote:
>> 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:
> 
>> Linux?
> 
> For Linux there are 3 new options:
> 
> 1. Appimages (https://appimage.org/): This is very similar to Window's msi installer. You can host the app installer binary in bintray or in your website.
> 
> 2. Flatpaks (https://flatpak.org/): Flatpak is quickly becoming more and more popular as it provides higher level customization for desktop applications in Linux. The flatpak API is not trivial but there are tutorials available to use flatpak and meson. A well known Linux application named Tilix (https://github.com/gnunn1/tilix) has a flatpak repo (https://github.com/gnunn1/tilix/tree/master/experimental/flatpak).
> 
> 3. Snap (https://snapcraft.io/): Backed by Cannonical, snap provides a really easy way to distribute applications in Linux. I personally think Snaps are easier to create although I haven't invested time in distributing an app using snap. DMD, Dub and LDC are also shipped with it.
> 
> There are tutorials for using all of those three online, but not specific to Dlang. But if you use the Meson build system there are plenty of tutorials available.
> 
don't you consider deb and rpm as options?
September 28, 2019
On Saturday, 28 September 2019 at 09:00:51 UTC, drug wrote:
> 28.09.2019 5:15, Hossain Adnan пишет:
>> On Wednesday, 25 September 2019 at 11:46:04 UTC, Ron Tarrant wrote:
>>> 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:
>> 
>>> Linux?
>> 
>> For Linux there are 3 new options:
>> 
>> 1. Appimages (https://appimage.org/): This is very similar to Window's msi installer. You can host the app installer binary in bintray or in your website.
>> 
>> 2. Flatpaks (https://flatpak.org/): Flatpak is quickly becoming more and more popular as it provides higher level customization for desktop applications in Linux. The flatpak API is not trivial but there are tutorials available to use flatpak and meson. A well known Linux application named Tilix (https://github.com/gnunn1/tilix) has a flatpak repo (https://github.com/gnunn1/tilix/tree/master/experimental/flatpak).
>> 
>> 3. Snap (https://snapcraft.io/): Backed by Cannonical, snap provides a really easy way to distribute applications in Linux. I personally think Snaps are easier to create although I haven't invested time in distributing an app using snap. DMD, Dub and LDC are also shipped with it.
>> 
>> There are tutorials for using all of those three online, but not specific to Dlang. But if you use the Meson build system there are plenty of tutorials available.
>> 
> don't you consider deb and rpm as options?

My understanding is that the goal is to move away from distribution-specific packaging with these projects.
September 28, 2019
On Friday, 27 September 2019 at 12:42:56 UTC, Jacob Carlborg wrote:

> For macOS you should distribute a GUI application for end users as an application bundle [1]. That's basically a directory containing a specific structure. Any dependencies and resources like libraries (GTK), images and so on should be bundled inside the application bundle. Then package the application bundle inside an archive, ideally a Disk Image (DMG) [2]. The application would be completely self contained and the user can install it by dragging it to the Application directory.
>
> There might be some specific documentation how to bundle a GTK application on macOS. I found this [3], don't know if it's good or not.
>
> Ideally the application should be distributed on the Mac App Store. But that requires a developer account that costs money. It also has some restrictions that distribution outside of the Mac App Store doesn't have. If you cannot distribute using the Mac App Store the next best thing is to notarize the application (also requires a paid developer account, as far as I can see) before distributing it. Otherwise the user will get a dialog complaining that the application is from an unknown developer and the user need to explicitly go into System Preferences to allow it.
>
> [1] https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1
>
> [2] https://en.wikipedia.org/wiki/Apple_Disk_Image
> [3] https://gitlab.gnome.org/GNOME/gtk-mac-bundler
>
> --
> /Jacob Carlborg

Excellent, Jacob. Thanks for all that.
September 28, 2019
On Saturday, 28 September 2019 at 02:15:42 UTC, Hossain Adnan wrote:

> For Linux there are 3 new options:
>
> (things omitted)
> There are tutorials for using all of those three online, but not specific to Dlang. But if you use the Meson build system there are plenty of tutorials available.

Thanks Hossian. This helps a lot.
September 28, 2019
On Saturday, 28 September 2019 at 08:52:36 UTC, Jordi Sayol wrote:

> On Bebian/Ubuntu/Linux Mint, You have "d-apt" <https://d-apt.sourceforge.io/>

This sounds so appropriate for a D application. :)

> 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".

Thank you for filling in some blanks for me.