Jump to content

Is there any openness to PKHeX being ported to another programming language?


Symbitic

Recommended Posts

Would the current developers/maintainers of PKHeX be open to migrating to a different programming language than C#?

PKHeX doesn't work on macOS or Linux, and Windows always complains the exe is insecure and runs it in extremely low resolution. This annoyed me into starting to port the PKHeX Core into TypeScript. You can see my progress here: https://github.com/Symbitic/PKHeX/tree/typescript-port/PKHeX.Core

It's slow and tedious because C# is less a programming language and more a programmable VM.

Link to comment
Share on other sites

6 minutes ago, Symbitic said:

PKHeX doesn't work on macOS or Linux

Partially untrue ;)

.NET 8 works on macOS and Linux; the issue you are having is that Windows Forms .exe does not work for those operating systems unless you use a compatibility shim like Wine, because the .exe uses Windows Forms (Windows-specific drawing GUI stuff) rather than something like Avalonia.

The repo is divided into multiple projects. PKHeX.Core being just a code library, no GUI, which works on any OS, and PKHeX.WinForms that uses Windows Forms.

8 minutes ago, Symbitic said:

Windows always complains the exe is insecure

The releases that are posted are not code-signed, and new releases are "new" in that it is new to the antimalware scanning (not a scanned definition). The release pipeline is me just clicking Publish on the WinForms csproj and zipping the exe; nothing special beyond that.

10 minutes ago, Symbitic said:

runs it in extremely low resolution

If you have an extremely high DPI monitor, then yes it might look tiny. If your OS is sandboxing it, then it might be interfering with its rendering. Without seeing a screenshot, can't diagnose/advise.

==

There have been discussions about Linux/Mac support, and the answer is always that you're free to port whatever. The GUI code is some of the oldest & least abstract code in the repo, and most of the contributions are in the PKHeX.Core side of things as we try to keep up with mechanics on each new game content release. The GUI has been a relative afterthought, and porting >100 forms/controls to another GUI framework when the current one works well enough for most users.

Using Avalonia would require each release to include the Avalonia GUI libraries (or require people to install something NOT from Microsoft), which would be a "bloated" exe rather than the ~22 MB zip it is currently. MAUI hasn't shaped up well (Linux support for Desktop lol). So the suggestion from us has always been to just use Windows/vm/wine on a desktop PC, because nobody wants to spend the time porting it to another GUI/mobile framework with full support.

Running as a web app (wasm blazor) has its own pitfalls, like some crypto (md5, aes) not being supported (so can't export certain save files).

==

Checking the contributor graph (and knowing the content of every commit), PKHeX is mostly a solo-contributor project with others chipping in occasionally. I have other projects and interests, and duplicating the GUI (learning a new framework/language) is not something I have much of an interest in.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

On 12/30/2023 at 9:19 PM, Kaphotics said:

The releases that are posted are not code-signed, and new releases are "new" in that it is new to the antimalware scanning (not a scanned definition).

Windows will object as long as they aren't code-signed. Whenever the newest exe is downloaded, Windows Defender will require consent before running it.

On 12/30/2023 at 9:19 PM, Kaphotics said:

If you have an extremely high DPI monitor, then yes it might look tiny. If your OS is sandboxing it, then it might be interfering with its rendering. Without seeing a screenshot, can't diagnose/advise.

I only run on a laptop in 1080p (and I've tried several laptops). All graphics look like pixel art no matter what new hardware I run it on. I'll try to upload a screenshot when I can.

On 12/30/2023 at 9:19 PM, Kaphotics said:

PKHeX is mostly a solo-contributor project with others chipping in occasionally. I have other projects and interests, and duplicating the GUI (learning a new framework/language) is not something I have much of an interest in.

Fair point, but I think part of that might be that there aren't all that many C# developers. I actually would try to help port it to Linux/macOS if I knew enough C#.

If you think there's nothing wrong with PKHeX as it is, that's fine. It's your project.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Thanks to the work of Fabian Maurer

https://gitlab.winehq.org/wine/wine/-/merge_requests/5064/diffs

PKHex is now compatible with version 24.01.12 on Unix

to update your version execute the following commands

rm -rf $HOME/.local/.share/pkhex
wget "https://bitbucket.org/amidevous/pkhex/raw/master/update.sh" -qO update.sh
chmod +x update.sh
./update.sh
rm -f update.sh

I will update the package on the deposits probably Monday
from the moment you have the dependencies to install
this command will always allow PKHex to be updated on Unix distributions

a big thank you to Fabian Maurer

Edited by amidevous
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...