GUIDeFATE icon indicating copy to clipboard operation
GUIDeFATE copied to clipboard

Win32 integration

Open matthewpersico opened this issue 7 years ago • 18 comments

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

matthewpersico avatar Feb 26 '18 15:02 matthewpersico

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

saiftynet avatar Feb 26 '18 19:02 saiftynet

I’ll take a look tonight. I haven’t seen the code since the first announcement so I don’t want to comment on the train.

On Mon, Feb 26, 2018 at 15:03 Saif Ahmed [email protected] wrote:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/saiftynet/GUIDeFATE/issues/5#issuecomment-368630476, or mute the thread https://github.com/notifications/unsubscribe-auth/AC-_dvKhZjKgrPHvN7Sgn2HEm-MsUN_9ks5tYw0zgaJpZM4STZmw .

-- Matthew O. Persico

matthewpersico avatar Feb 26 '18 22:02 matthewpersico

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 ;)

saiftynet avatar Feb 26 '18 22:02 saiftynet

Will do

On Mon, Feb 26, 2018 at 17:46 Saif Ahmed [email protected] wrote:

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?.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/saiftynet/GUIDeFATE/issues/5#issuecomment-368678427, or mute the thread https://github.com/notifications/unsubscribe-auth/AC-_diQ1LD1y16rKoBopjhM_HqEH6mv6ks5tYzQ0gaJpZM4STZmw .

-- Matthew O. Persico

matthewpersico avatar Feb 26 '18 22:02 matthewpersico

Won’t do. Got home and had a billion things to do. I’ll try to take a look at it Wednesday. Sorry for the delay.

On Mon, Feb 26, 2018 at 5:48 PM Matthew Persico [email protected] wrote:

Will do

On Mon, Feb 26, 2018 at 17:46 Saif Ahmed [email protected] wrote:

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?.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/saiftynet/GUIDeFATE/issues/5#issuecomment-368678427, or mute the thread https://github.com/notifications/unsubscribe-auth/AC-_diQ1LD1y16rKoBopjhM_HqEH6mv6ks5tYzQ0gaJpZM4STZmw .

-- Matthew O. Persico

-- Matthew O. Persico

matthewpersico avatar Feb 27 '18 03:02 matthewpersico

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

saiftynet avatar Feb 27 '18 07:02 saiftynet

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).

saiftynet avatar Feb 28 '18 19:02 saiftynet

Where’s the zip?

matthewpersico avatar Feb 28 '18 20:02 matthewpersico

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 avatar Feb 28 '18 20:02 saiftynet

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

saiftynet avatar Mar 04 '18 20:03 saiftynet

Sorry I have not been able to jump on this. I've been busy at home with wife away. She comes home tonight so hopefully this week I'll be able to look at this. I am really interested.​

matthewpersico avatar Mar 05 '18 01:03 matthewpersico

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?

saiftynet avatar Mar 05 '18 06:03 saiftynet

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.

matthewpersico avatar Mar 06 '18 05:03 matthewpersico

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 avatar Mar 07 '18 22:03 saiftynet

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 avatar Mar 24 '18 17:03 saiftynet

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 avatar Mar 25 '18 12:03 saiftynet

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

saiftynet avatar Mar 25 '18 20:03 saiftynet

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

saiftynet avatar Mar 28 '18 21:03 saiftynet