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

Win32 integration #5

Open
matthewpersico opened this issue Feb 26, 2018 · 18 comments
Open

Win32 integration #5

matthewpersico opened this issue Feb 26, 2018 · 18 comments
Assignees

Comments

@matthewpersico
Copy link

I'd like to work with you on this. How should we proceed?

@saiftynet
Copy link
Owner

You are clearly vastly more experienced than me, so I will certainly benefit from your guidance. My approach may be not the most efficient. But essentially I will create a commented template that replicates all the functions and widget creation methods and put it up tonight.

The questions to ask I would suggest are 1) do I need to to do a full rewrite?...the thing works but could I do it better. One thing I would like to change in the future perhaps is the fact that I get pixel dimensions in GUIDeFATE.pm, which are then used by the respective middle layers (GFtk, GFwx etc) and scaled according to each engines rendering peculiarities. This seemed logical, but maybe the task should be pushed out to the middle modules 2) Should the focus be on adding more features or more back-ends?

I don't think we ought to complicate things though. If you know the Win32::GUI usage then that will help greatly. If not we can both learn together. Either way two heads are better than one. Many thanks

@matthewpersico
Copy link
Author

matthewpersico commented Feb 26, 2018 via email

@saiftynet
Copy link
Owner

saiftynet commented Feb 26, 2018

I have uploaded a win32 test folder with a test environment. You should not have to install anything if Win32::GUI is already on your system. In it there is a calculator win32 test script. and lib folder with the two modules (GUIDeFATE and GFwin32). Can you send me the errors that you get when you try and run the calculator script. If the GUI opens, can you also send me screenshot please? So far I have implemented button labels and single line text entry. Tomorrow I will do the menu bar and hopefully shortly after that the images, multiline text entry, fileselector and message boxes. Have to do my day job in between of course ;)

@matthewpersico
Copy link
Author

matthewpersico commented Feb 26, 2018 via email

@matthewpersico
Copy link
Author

matthewpersico commented Feb 27, 2018 via email

@saiftynet
Copy link
Owner

No worries mate, we both have a still a lot to do so Wednesday or even later will be fine

@saiftynet
Copy link
Owner

Many problems largely caused by me not having a Windows system to try on...but i have uploaded a package of files into a zip that may work (probably not actually)...and gives you a Tk version that should work (hopefully).

@matthewpersico
Copy link
Author

Where’s the zip?

@saiftynet
Copy link
Owner

saiftynet commented Feb 28, 2018

Sorry in a folder called Win32. Tried running under Wine (a windows API layer for Linux) The TK sorta works, but Win32 back end fails...though I get a brief flash of a window.

@saiftynet
Copy link
Owner

Have struggled to test it in WINE. Will now invest in a Windows license to get it running in a vm.

@matthewpersico
Copy link
Author

matthewpersico commented Mar 5, 2018 via email

@saiftynet
Copy link
Owner

No worries mate. I appreciate your support. A bit of advice...if I include win32 support will it break things for people like Linux users who cant install the win32 modules? How do I make install not fail when all dependencies not met?

@matthewpersico
Copy link
Author

I do not know for sure, but I am guessing that it should work the same way as if you were on Linux but only had Tk or only had Wx. Remove one of those from your system and see what happens. You could also try StackOverflow and www.perlmonks.org.

@saiftynet
Copy link
Owner

Ok will do..currently if I add Win32 as a dependency (no win32 in Linux), then install fails...maybe better to check if dependencies installed, but leave that to the user....do you think?

@saiftynet
Copy link
Owner

Hi Matthew, Have finally got a Windows License and have it going on a virtual machine. Here is a test environment. I can not get images working using ActiveState Perl. No packages for Win32::GUI::DIBitmap which appears to be the only way of getting arbitrary images up. Calculator works, as does Executioner (no combobox yet). Should be able to get Menu up and running shortly.

@saiftynet
Copy link
Owner

Have updated image handling...Issues 1) Win32::GUI::DIBitmap required to load other formats and sizes of images no longer in repos, so had to use Image Magick to resize and convert to BMP. 2) ImageMagick installation not trivial for me...used Strawberry Perl and their own version of Image Magick. 3) default BMP format of Image Magick not recognised by Win32::GUI, . Now Calculator and rpsl work

@saiftynet
Copy link
Owner

Ok now menus and combo-boxes appear to work...not fully but functional. Let me know if it works for you.

@saiftynet saiftynet self-assigned this Mar 26, 2018
@saiftynet
Copy link
Owner

Ok Issues with ActiveState and Image::Magick may be a problem for may users...I have created a version using Image rather than Image Magick...can you try it out please? It will need to be renamed to GFwin32 and placed in the library folder) https://github.com/saiftynet/GUIDeFATE/tree/master/Win32/GFwin32(using%20Imager).pm

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

No branches or pull requests

2 participants