Closed Kreyren closed 5 years ago
This whole implementation, as a settings, allow you to change it from the phoenicis interface. Do it as a verb and it is far easier.
Also, your comparison is wrong. You should have compared like this: In lutris:
installer:
- task:
key: UseTakeFocus
name: set_regedit
path: HKEY_CURRENT_USER\Software\Wine\X11 Driver
prefix: $GAMEDIR
value: N
in phoenicis:
preInstall(function (wine, wizard) {
wine.UseTakeFocus("disabled");
}
You did not show what happens "behind the scene" in lutris :-).
@ImperatorS79 That is literally what i said is the issue that can be done better.. Did you even read the thing?
You did not show what happens "behind the scene" in lutris :-).
I want to avoid sharing disgusting code :p thank me later
In the issue you compared the code a script coder can use in lutris, with the code a script coder can use in phoenicis + the "behind the scenes" code (in the lutris example vs phoenicis example), in an attempt to show that the phoenicis one is more difficult that the lutris one, but that is non sense because because you do not compare the same thing. Indeed, as I showed on my answer, the code a script coder will use is as simple in lutris than in phoenicis.
@ImperatorS79 So tell me why do we forcing making new settings for each changes in engineapp? Do you realize how PAINFULL it must be to make engineapp that needs multiple changes that are not supported yet in phoenicis?
Just imagine wineapp that needs around 17 changes in registry assuming 12 not beeing present in phoenicis.
So instead or ideally on top of that i'm suggesting better implementation in scripts that expects path in registry and value so that we can do something alike:
preInstall(function (wine, wizard) {
wine.SuperAwesomeRegistryEditor("HKEY_CURRENT_USER/Software/Wine/X11 Driver/UseTakeFocus,N");
}
You do not have to do a settings for each key, you do it if you want to be able to change it from phoenicis GUI also.
.preInstall(function (wine, wizard) {
wine.SuperAwesomeRegistryEditor("HKEY_CURRENT_USER/Software/Wine/X11 Driver/UseTakeFocus,N");
}
There is wine.regedit.patch(patchcontent)
for this.
@ImperatorS79 So tell me why do we forcing making new settings for each changes in engineapp? Do you realize how PAINFULL it must be to make engineapp that needs multiple changes that are not supported yet in phoenicis?
On top of what @ImperatorS79 said, I also want to underline the fact that it is painful only for the first person that needs the verb. It it then a lot quicker for all next contributors.
@ImperatorS79 There is wine.regedit.patch(patchcontent) for this.
Example usecase?
You already used it:
var regeditFileContent =
"REGEDIT4\n" +
"\n" +
"[HKEY_CURRENT_USER\\Software\\Wine\\X11 Driver]\n" +
"\"UseTakeFocus\"=\"" + mode + "\"\n"
this.regedit().patch(regeditFileContent);
hm i see :thinking: Would still prefer something alike:
.preInstall(function (wine, wizard) {
wine.SuperAwesomeRegistryEditor("HKEY_CURRENT_USER/Software/Wine/X11 Driver/UseTakeFocus,N");
}
Requesting making one function in phoenicis that can change registry on demand since current implementation is obsolete and terrible in comparison to lutris where it allows change directly in installer.
Could be made using one function that expects path and value (format).
Lutris example:
Phoenicis example
Relevant: https://github.com/PhoenicisOrg/scripts/issues/936