Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using a preinstalled oldgtk3 #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

royneary
Copy link

@royneary royneary commented Apr 15, 2019

This allows using a preinstalled oldgtk3 (either installed by nimble install or manually in nimble's search paths) after the download failed.

I saw the directory ngtk3 which was unused, so I guess it has already been possible in the past. I need this because I am packaging gintro for Nix. There it is not allowed to download files during the build/install phase. So I'm installing oldgtk3 before and need nimble to use it (it is the "unlikely case" you are referring to in the warning message).

This allows using a preinstalled oldgtk3 (either installed by nimble
install or manually in nimble's search paths) after the download failed.
@StefanSalewski
Copy link
Owner

I am packaging gintro for Nix.

Do you think someone is seriously using gintro or GTK/Nim ? I really don't know.

Using gintro without access to oldgtk3 is of course easily possible, as only 3 files from oldgtk3 are involved, so one can just copy them into gintro package. (copy is ok, when we consider oldgtk3 as static -- but maybe oldgtk3 will need some fixes for upcoming compiler.)

ngtk was my first GTK3 trial which allowed install of single files, while oldgtk3 does a complete nimble install of all GTK related files. And yes, I think the initial gintro release used still single files from ngtk3.

Note that ngtk3 is marked for deletion for some years now, I really should do the delete soon.

What some people have asked for is a prebuilt version of gintro package. But that is a bit hard, we need files for win, linux, mac each in 32 and 64 bit versions, and maybe for various GTK releases, later for GTK4. People have not really convinced me that this is necessary or makes a lot of sense.

I will investigate your patch soon, but it may take some time. I have worked a lot on gintro in the last days already, just released v0.4.16 with better GtkSourceView and Gtk_Builder support which recently someone asked for, and a new drawingarea example. This morning I got an new issue report for some types of signals, maybe I will have to fix that fast when reporter really needs it. And I started working on destructor support -- for cairo surface destructors would be nice.

@royneary
Copy link
Author

Do you think someone is seriously using gintro or GTK/Nim ? I really don't know.

I don't know if anybody is using gintro. I'm creating it for myself because I want to look into gintro (and hopefully will be able to use it for a project of mine). Creating packages (or Nix shells) for development is the usual case if you use NixOS because libraries are not installed in standard paths.

Using gintro without access to oldgtk3 is of course easily possible, as only 3 files from oldgtk3 are involved, so one can just copy them into gintro package. (copy is ok, when we consider oldgtk3 as static -- but maybe oldgtk3 will need some fixes for upcoming compiler.)

ngtk was my first GTK3 trial which allowed install of single files, while oldgtk3 does a complete nimble install of all GTK related files. And yes, I think the initial gintro release used still single files from ngtk3.

I don't see a problem downloading the whole oldgtk3 repo. It just takes a few seconds. In fact at first I tried to convince nimble to install oldgtk3 before executing the before install task, but it doesn't work. I think once task-level dependencies are implemented, we can use nimble's normal mechanism of installing dependencies which will be much cleaner than calling wget.

Note that ngtk3 is marked for deletion for some years now, I really should do the delete soon.

Yes, I must say, it was a little confusing in the beginning.

What some people have asked for is a prebuilt version of gintro package. But that is a bit hard, we need files for win, linux, mac each in 32 and 64 bit versions, and maybe for various GTK releases, later for GTK4. People have not really convinced me that this is necessary or makes a lot of sense.

I will investigate your patch soon, but it may take some time. I have worked a lot on gintro in the last days already, just released v0.4.16 with better GtkSourceView and Gtk_Builder support which recently someone asked for, and a new drawingarea example. This morning I got an new issue report for some types of signals, maybe I will have to fix that fast when reporter really needs it. And I started working on destructor support -- for cairo surface destructors would be nice.

I'm happy to see you're working on this project and make progress :-)

@3nprob
Copy link

3nprob commented Jun 19, 2022

@StefanSalewski any chance you'd consider taking another look at this? Or is it still relevant? gintro dosn't seem to be easily usable on NixOS right now:

$ nimble install gintro
Downloading https://github.com/stefansalewski/gintro using git
preparing gintro
sh: line 1: nimgrab: command not found
For bootstrapping of gintro package we need the low level files gobject.nim, glib.nim and gir.nim.
We take these from package oldgtk3. As most gintro users will not need the whole oldgtk3 package
we tried to only download these 3 single files using wget or nimgrab. But that failed.
Ensure that wget or nimgrab are available. wget should be available for Unix like systems.
Nimgrab should be available in Nim/tools directory. You may compile it with 'nim c -d:ssl nimgrab.nim'
and put it into your search path
For the unlikely case that you have already full oldgtk3 package installed, we will just try to continue...
Hint: used config file '/nix/store/foo-x86_64-unknown-linux-gnu-nim-wrapper-1.6.6/etc/nim/nim.cfg' [Conf]
Hint: used config file '/nix/store/foo-x86_64-unknown-linux-gnu-nim-wrapper-1.6.6/etc/nim/config.nims' [Conf]
......................................................................................
/tmp/gintrosalewski/gen.nim:49:8 Error: cannot open file: gir
stack trace: (most recent call last)
/tmp/nimblecache-2458931392/nimscriptapi_3556586899.nim(199, 29)
/tmp/nimble_939017/githubcom_stefansalewskigintro/gintro.nimble(77, 7) installBefore
/tmp/nimble_939017/githubcom_stefansalewskigintro/gintro.nimble(62, 7) prep
/nix/store/baz-nim-unwrapped-1.6.6/nim/lib/system/nimscript.nim(273, 7) exec
/nix/store/baz-nim-unwrapped-1.6.6/nim/lib/system/nimscript.nim:273:7 Error: unhandled exception: FAILED: nim c gen.nim [OSError]
       Tip: 4 messages have been suppressed, use --verbose to show them.
     Error: Exception raised during nimble script execution

(gir is not executable but should be built from source locally either prior or as part of the process - downloaded binaries won't run directly)

@StefanSalewski
Copy link
Owner

because I am packaging gintro for Nix.

Sorry, I dont know what Nix is, dont know why you are packaging something. Gintro has currently maybe two or three serious users, so for whom do you packaging something? Nim has 20 other GUI toolkits now, maybe I should remove gintro from GitHub?

@3nprob
Copy link

3nprob commented Jun 24, 2022

Maybe somebody should edit the Nim Wikipedia page, I bet I'm not the first to come straight here when checking out Nim.

@StefanSalewski
Copy link
Owner

Maybe somebody should edit the Nim Wikipedia page,

I really don't like the Nim Wikipedia page that much. But no one cares for my feelings :-) For Wikipedia the general problem is, that people add a lot of stuff, and no one dares to remove it, because the original author may become angry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants