all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Package renpy broken?
@ 2022-10-27  6:58 Christian Gelinek
  2022-10-28 15:29 ` Wojtek Kosior via
  2022-10-29 14:25 ` Luis Felipe
  0 siblings, 2 replies; 5+ messages in thread
From: Christian Gelinek @ 2022-10-27  6:58 UTC (permalink / raw)
  To: help-guix

Dear Guix community,

I couldn't get the GUI `renpy-launcher` GUI to do anything useful.  It 
says "The selected projects directory is not writable" for any 
meaningful action I attempted.  Under "preferences" -> General, there is 
a Projects Directory setting which (for me) displays as "Not Set".  
Clicking that again shows the above error.

I'm new to Ren'Py (and GuixSD), so there may be a way of specifying this 
directory on the command line or via a config file somewhere, but I 
haven't found it.

Looking at the code at 
https://github.com/renpy/renpy/blob/master/launcher/game/choose_directory.rpy 
it seems that it tries to import the `_renpytfd` Python package, which - 
if successful - would be used to display a `selectFolderDialog`.  
Otherwise, it would try to use the parent directory and if that fails, 
the directory specified in config.renpy_base, which is set to the empty 
string. Interestingly the empty string should resolve to the current 
directory, but that doesn't seem to be the case in my `renpy-launcher` 
context.

Another thing I found is that `_renpytfd` is being removed from the 
renpy package in 
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/game-development.scm#n1347 
which probably is the reason for why I can't set the path in the GUI.  
The comment says "drop _renpytfd, as there are missing sources" but 
https://sourceforge.net/projects/tinyfiledialogs/files/ seems to 
disagree with that.  Additionally, there is a Guix package 
rust-tinyfiledialogs which I expect to also (at least indirectly) depend 
on tinyfiledialogs, which is not a package.

Where to go from here?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Package renpy broken?
  2022-10-27  6:58 Package renpy broken? Christian Gelinek
@ 2022-10-28 15:29 ` Wojtek Kosior via
  2022-10-29  9:42   ` Christian Gelinek
  2022-10-29 14:25 ` Luis Felipe
  1 sibling, 1 reply; 5+ messages in thread
From: Wojtek Kosior via @ 2022-10-28 15:29 UTC (permalink / raw)
  To: Christian Gelinek; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 3593 bytes --]

Hi Christian,

I know nothing about Ren'Py and TFD but it seems there's an
approachable workaround - you can modify the package to patch
launcher/game/choose_directory.rpy to have a suitable directory used.

First, I'd suggest you look at how some existing packages use the
`substitute*` macro[1]. Then, look at how packages are defined[2] and
how to *inherit* from another package[3].

Once you grasp a bit of it, you should be able to define your own
variant of the Ren'Py package. One without the bug.

I realize it's probably a bit discouraging to come to a new distro and
find out you need to learn packaging to utilize it. Indeed, I wish I
had more time to prepare such modified package for you. Yet, honestly,
Guix is a geeky package manager - you can only benefit from its
super-powers once you're yourself Guix geek ¯\_(ツ)_/¯

Good luck :)

Wojtek

P.S. If TFD are really free as in freedom, it'd be cool to have the
package fixed to actually use them. But that might be more involving
than merely patching a path...

[1] https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/game-development.scm?id=779757047997d315d899b40c199be3709115cce4#n171
[2] https://guix.gnu.org/manual/en/html_node/Defining-Packages.html#Defining-Packages
[3] https://guix.gnu.org/en/cookbook/en/guix-cookbook.html#Inheritance


-- (sig_start)
website: https://koszko.org/koszko.html
PGP: https://koszko.org/key.gpg
fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A

Meet Kraków saints!           #3: blessed Bernardyna Maria Jabłońska
Poznaj świętych krakowskich!  #3: błogosławiona Bernardyna Maria Jabłońska
https://pl.wikipedia.org/wiki/Bernardyna_Maria_Jabłońska
-- (sig_end)


On Thu, 27 Oct 2022 06:58:58 +0000
Christian Gelinek <christian.gelinek@mailbox.org> wrote:

> Dear Guix community,
> 
> I couldn't get the GUI `renpy-launcher` GUI to do anything useful.  It 
> says "The selected projects directory is not writable" for any 
> meaningful action I attempted.  Under "preferences" -> General, there is 
> a Projects Directory setting which (for me) displays as "Not Set".  
> Clicking that again shows the above error.
> 
> I'm new to Ren'Py (and GuixSD), so there may be a way of specifying this 
> directory on the command line or via a config file somewhere, but I 
> haven't found it.
> 
> Looking at the code at 
> https://github.com/renpy/renpy/blob/master/launcher/game/choose_directory.rpy 
> it seems that it tries to import the `_renpytfd` Python package, which - 
> if successful - would be used to display a `selectFolderDialog`.  
> Otherwise, it would try to use the parent directory and if that fails, 
> the directory specified in config.renpy_base, which is set to the empty 
> string. Interestingly the empty string should resolve to the current 
> directory, but that doesn't seem to be the case in my `renpy-launcher` 
> context.
> 
> Another thing I found is that `_renpytfd` is being removed from the 
> renpy package in 
> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/game-development.scm#n1347 
> which probably is the reason for why I can't set the path in the GUI.  
> The comment says "drop _renpytfd, as there are missing sources" but 
> https://sourceforge.net/projects/tinyfiledialogs/files/ seems to 
> disagree with that.  Additionally, there is a Guix package 
> rust-tinyfiledialogs which I expect to also (at least indirectly) depend 
> on tinyfiledialogs, which is not a package.
> 
> Where to go from here?
> 
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Package renpy broken?
  2022-10-28 15:29 ` Wojtek Kosior via
@ 2022-10-29  9:42   ` Christian Gelinek
  2022-10-29 21:58     ` Wojtek Kosior via
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Gelinek @ 2022-10-29  9:42 UTC (permalink / raw)
  To: Wojtek Kosior; +Cc: help-guix

Hi Wojtek, thanks for your response and the useful links to learn how to 
patch a package.

> Once you grasp a bit of it, you should be able to define your own
> variant of the Ren'Py package. One without the bug.

That would probably be the easiest fix, but I do wonder about other 
users of Ren'Py - particularly whoever packaged it first, did they ever 
get it working for them?

> I realize it's probably a bit discouraging to come to a new distro and
> find out you need to learn packaging to utilize it. 

I guess switching distros is always going to cause some friction, so I 
was partly prepared for that.

> Yet, honestly, Guix is a geeky package manager - you can only benefit from its
> super-powers once you're yourself Guix geek ¯\_(ツ)_/¯

You're right in that, and it also seems to have  some really compelling 
features that motivated me to switch and which (hopefully) make this 
learning experience worthwhile.  On the other hand, I do like packages 
which *just work* out of the box, and I feel the declarative approach 
should generally help with that.  As a newcomer I do have the concern 
that this "geekiness" can also lead to a pile of patches on top of each 
other (in this case, the patch to remove TFD and then another to make 
the package work again without it) that I feel would increase the 
maintenance burden rather than decreasing it beyond the short term. 
Please tell me if what I said doesn't match the deeper philosophy behind 
Guix for some reason or another.

Looking at my Ren'Py issue, I am wondering whether the cleaner approach 
would be to package TFD as a separate package (I think zlib counts as a 
Free Software license) and make it a dependency of Ren'Py, hoping that 
will fix the issue.  Maybe other packages like rust-tinyfiledialogs 
could benefit from such a package as well (I am wondering how users of 
that are currently actually using TFD).

What are your thoughts?

Christian


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Package renpy broken?
  2022-10-27  6:58 Package renpy broken? Christian Gelinek
  2022-10-28 15:29 ` Wojtek Kosior via
@ 2022-10-29 14:25 ` Luis Felipe
  1 sibling, 0 replies; 5+ messages in thread
From: Luis Felipe @ 2022-10-29 14:25 UTC (permalink / raw)
  To: Christian Gelinek; +Cc: help-guix


[-- Attachment #1.1: Type: text/plain, Size: 1586 bytes --]

Hi Christian,

It seems to be broken, yes...


------- Original Message -------
On Thursday, October 27th, 2022 at 06:58, Christian Gelinek <christian.gelinek@mailbox.org> wrote:

> Dear Guix community,
> 

> I couldn't get the GUI `renpy-launcher` GUI to do anything useful.

Same for me (I'm using Guix System with guix 4716cea).

When running renpy-launcher I also noticed that the sample projects "Tutorial" and "The Question" are listed but grayed out, you can't launch them. Then I found out that these two are provided as separate outputs of the renpy package in Guix, so I installed them. However, after that, they are still disabled in the launcher (even after clicking the "Refresh" button).


> It says "The selected projects directory is not writable" for any
> meaningful action I attempted. Under "preferences" -> General, there is
> a Projects Directory setting which (for me) displays as "Not Set".
> Clicking that again shows the above error.

Same here. I saw the same error when clicking on "+ Create new project" in the first screen of the launcher, and when trying to set a projects directory in the preferences screen.


> I'm new to Ren'Py (and GuixSD), so there may be a way of specifying this
> directory on the command line or via a config file somewhere, but I
> haven't found it.

I don't know, but I think this is a bug and should be reported to https://issues.guix.gnu.org/. I don't see any open issues about renpy there.

I think the launcher should just work, as you say, and you should use the GUI to set any preferences.

[-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1722 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Package renpy broken?
  2022-10-29  9:42   ` Christian Gelinek
@ 2022-10-29 21:58     ` Wojtek Kosior via
  0 siblings, 0 replies; 5+ messages in thread
From: Wojtek Kosior via @ 2022-10-29 21:58 UTC (permalink / raw)
  To: Christian Gelinek; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 5332 bytes --]

> Hi Wojtek, thanks for your response and the useful links to learn how to 
> patch a package.

No problem :) I have no doubt you would reach all the information
anyway if you have just a bit of determination

> [...] I do wonder about other users of Ren'Py - particularly whoever
> packaged it first, did they ever get it working for them?
>
> [...]
>
> I do like packages which *just work* out of the box, and I feel the
> declarative approach should generally help with that.

I have the same feeling. I know of at least two things that might be
causing packages to break for end users even though they worked for
packagers.

Firstly, some dependency of the package might get updated and might be
causing problems. If this is the case, it might be useful to check the
Guix commit at which the desired package was initially added and use
`guix time-machine` to install the package with the exact dependency
versions it had back then... This is of course yet another workaround
and it'd be better to have the real problem fixed (if one has time for
that).

The other reason might be that the program behavior depends on some
files in user's home directory. Perhaps it worked for someone who for
example happened to have certain local configuration put in place by
another, non-Guix installation of the same program?

> I do have the concern that this "geekiness" can also lead to a pile
> of patches on top of each other (in this case, the patch to remove
> TFD and then another to make the package work again without it) that
> I feel would increase the maintenance burden rather than decreasing
> it beyond the short term. Please tell me if what I said doesn't match
> the deeper philosophy behind Guix for some reason or another.

I see this patch-on-patch stuff as personal quick hacks just to get
things working locally. As such, they won't harm the upstream Guix.

As to the maintenance burden of personal patches of one's self... well,
to me it still seems drastically smaller that in other distros I've
been using :)

> Looking at my Ren'Py issue, I am wondering whether the cleaner
> approach would be to package TFD as a separate package (I think zlib
> counts as a Free Software license) and make it a dependency of
> Ren'Py, hoping that will fix the issue.
>
> [...]
> 
> What are your thoughts?

It would surely be cleaner. I just expect the "missing sources" issue
supposedly found by the previous packager might be something
non-obvious and harder to fix than it seems :/ But who knows?

> Maybe other packages like rust-tinyfiledialogs could benefit from
> such a package as well (I am wondering how users of that are
> currently actually using TFD).

Maybe it had TFD sources bundled with itself?

Wojtek


-- (sig_start)
website: https://koszko.org/koszko.html
PGP: https://koszko.org/key.gpg
fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A

Meet Kraków saints!           #47: saint Stanisław ze Szczepanowa
Poznaj świętych krakowskich!  #47: święty Stanisław ze Szczepanowa
https://pl.wikipedia.org/wiki/Stanisław_ze_Szczepanowa
-- (sig_end)


On Sat, 29 Oct 2022 09:42:19 +0000
Christian Gelinek <christian.gelinek@mailbox.org> wrote:

> Hi Wojtek, thanks for your response and the useful links to learn how to 
> patch a package.
> 
> > Once you grasp a bit of it, you should be able to define your own
> > variant of the Ren'Py package. One without the bug.  
> 
> That would probably be the easiest fix, but I do wonder about other 
> users of Ren'Py - particularly whoever packaged it first, did they ever 
> get it working for them?
> 
> > I realize it's probably a bit discouraging to come to a new distro and
> > find out you need to learn packaging to utilize it.   
> 
> I guess switching distros is always going to cause some friction, so I 
> was partly prepared for that.
> 
> > Yet, honestly, Guix is a geeky package manager - you can only benefit from its
> > super-powers once you're yourself Guix geek ¯\_(ツ)_/¯  
> 
> You're right in that, and it also seems to have  some really compelling 
> features that motivated me to switch and which (hopefully) make this 
> learning experience worthwhile.  On the other hand, I do like packages 
> which *just work* out of the box, and I feel the declarative approach 
> should generally help with that.  As a newcomer I do have the concern 
> that this "geekiness" can also lead to a pile of patches on top of each 
> other (in this case, the patch to remove TFD and then another to make 
> the package work again without it) that I feel would increase the 
> maintenance burden rather than decreasing it beyond the short term. 
> Please tell me if what I said doesn't match the deeper philosophy behind 
> Guix for some reason or another.
> 
> Looking at my Ren'Py issue, I am wondering whether the cleaner approach 
> would be to package TFD as a separate package (I think zlib counts as a 
> Free Software license) and make it a dependency of Ren'Py, hoping that 
> will fix the issue.  Maybe other packages like rust-tinyfiledialogs 
> could benefit from such a package as well (I am wondering how users of 
> that are currently actually using TFD).
> 
> What are your thoughts?
> 
> Christian



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-29 21:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-27  6:58 Package renpy broken? Christian Gelinek
2022-10-28 15:29 ` Wojtek Kosior via
2022-10-29  9:42   ` Christian Gelinek
2022-10-29 21:58     ` Wojtek Kosior via
2022-10-29 14:25 ` Luis Felipe

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.