CrossMgr icon indicating copy to clipboard operation
CrossMgr copied to clipboard

MacOSX and Linux Builds updated; testers wanted

Open mbuckaway opened this issue 6 years ago • 11 comments

I have updated the code to better work on MacOSX and Linux. The code changes are small, but the biggest change is now the builds for Linux and MacOSX are automated and can be downloaded from the github releases tab.

For details on how to use the Mac and Linux builds, see the README.md.

I am looking for testers. The Linux build was built on Ubuntu 18.04, but should work on any Linux as all the dependancies are packaged into the AppImage. The MacOSX build was done on 10.15 CataLina, but should work on Mac OSX 10.14 and 10.13. If you have issues with the build, please post them below.

The changes are as follows:

  • merges the linux/mac build script into one master shell script: compile.sh. This script will setup the environment, build the code, and package it for MacOSX or Linux depending on which it is run. It now is a two step process on MacOSX and a three step process on Linux to build code and package it. The build process is foolproof because github workflow uses it to build the code

  • Linux appimage support added. All Linux apps now are download and run without requiring python be installed, etc.

  • MacOSX apps packaged as DMG files. Download, drag program into Applications folder, and run

  • requirements.txt added to the project the encompasses ALL the python modules to build the code from a clean source tree and clean python install.

  • CrossMgr, CrossMgrImpinj, CrossMgrAlien, SeriesMgr, and TagReadWrite now all packaged for MacOSX and Linux.

  • added github workflow to build the Linux and MacOSX apps on github. One need only create a Tag to get a release and all the programs built.

  • added menus to CrossMgrImpinj, CrossMgrAlien, and TagReadWrite as MacOSX doesn't like uses clicking the X button on an app

  • fixed a huge issue in socket handling on CrossMgrImpinj that would require the user to hit the reset button to get it to find CrossMgr when a race starts

  • all applications were build on Github and tested by downloading the build and running each application. CrossMgr and CrossMgrImping were further tested with a RFID read and run a race simulation to make sure chip reads work

  • removed pyllrp from the repo and moved it to a separate repo (because it is shared with RaceDB)

  • added CHANGES.md with gren release note manager

  • added a proper README.md

The next thing I will be tackling is the Windows build. In a week or so, ALL builds will appear on the Release tag.

mbuckaway avatar Dec 26 '19 13:12 mbuckaway

Doesn't work on Ubuntu 16.04, because of Glibc 2.23. Probably makes sense to compile for at least the currently maintenance supported Ubuntu LTS, e.g. currently 16.04. There should be no issues to compile for 14.04 LTS too, since Python3.4 works fine with CrossMgr? I am fine with using the native Python files on 16.04 with Python 3.6 too. [28937] Error loading Python lib '/tmp/.mount_CrossMjYEtqa/usr/bin/libpython3.7m.so.1.0': dlopen: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /tmp/.mount_CrossMjYEtqa/usr/bin/libpython3.7m.so.1.0)

rkantos avatar Jan 01 '20 11:01 rkantos

@rkantos Found that github does support building code on Ubuntu 16.04 LTS. I set it up to build and you can download a test version from here: [https://github.com/mbuckaway/CrossMgr/releases/tag/v3.0.46-20200113225021].

However, when running the build from the older linux, it didn't work correctly on Ubuntu 18.04LTS (libz was missing).

Because we use pyinstaller, there are some lib dependancies that differ, and pyinstall doesn't copy them into the release folder...it misses the c-lib, libz, etc....and it will require some work to figure out how to get ALL the dependancies in the AppImage (which is what is supposed to happen with the appimage).

If you could verify the above release loads on 16.04LTS it would be useful to me.

The other option would be to stop using pyinstaller, and use the Appimage build for Python, and include Ed's code in the image.

mbuckaway avatar Jan 15 '20 15:01 mbuckaway

I was able to make a build myself for Ubuntu 16.04.6 LTS using the Python 3.7 from deadsnakes' PPA. I imagine it would work similary with Python 3.6 too. The main point being, that at least the glibc dependency is not related to using any version of Python (3.5+)

PPA used for Python 3.7 on Ubuntu 16.04 https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa

rkantos avatar Jan 17 '20 13:01 rkantos

After some tinkering including building a docker container to build CrossMgr on Ubuntu 16.04, I found the issue is related to pyinstaller NOT including libc.so.6 and one other library. ldd reports that they are loaded from the system directory and not the appimage...which is incorrect.

I intend to test it again by including these two libs. Theoretically, it should work...in fact, it should be possible to run the 18.04 build on 16.04 as there should be not more lib dependencies.

While I have something that works for me, I think the longer term solution is to dump pyinstaller. It should be possible to create a virtualenv for Crossmgr, install all the requirements into the virtual env, package the virtual env and the CrossMgr python scripts on each platform, and run it as if Python were installed into the system. So long as the image is created on the oldest supported OS, it should work. Either that, or switch to Cpython or CX_freeze.

As for using the private ppa, that might work, but I'm inclined to stick with with Github (ie. Microsoft) provides on their build VM's.

mbuckaway avatar Jan 17 '20 14:01 mbuckaway

Is there a reason why CrossMgr wouldn't be able to run on a pi (ARM) running ubuntu? I realise this build is x86, but is it simply a case of picking up the right dependencies or is there a fundamental issue? I started down this rabbit hole last night, but it got late before I got anywhere substantive. If I'm wasting my time I'll go finish my other bug report with a bit more detail. Thanks.

cclague avatar Jan 31 '20 12:01 cclague

CrossMgr (and RaceDB for that matter) are python applications, and as such, will run on any platform supported by Python and wxPython (the wxWindows python library). The compile.sh script should build the code all the way to the pyinstaller/copy assets stage. The appimage part would require https://github.com/linuxdeploy/linuxdeploy-plugin-appimage to be built for arm. So, yes, it would work with some work. Otherwise, just checkout the code and run it: python3 MainWin.py

I have considered making a binary release for Linux/Arm. Probably, Armbian based on Ubuntu because there are 100's of boards better than a Raspberry PI and Armbian supports them.

Mark

mbuckaway avatar Jan 31 '20 14:01 mbuckaway

Mbuckaway: Don't know if you are the one responsible or not, but thanks if you are the one that enabled me to download successfully and run Crossmgr on my macbook pro this year. I have tried for several years to achieve without success. New user, so still learning. Attempting to use with USB numeric keypad to enter bib numbers but the laptop only recognizes the 0-9 and does not recognize any of the standard keys including the Return / Enter key. The keypad works as it should with excel, numbers, etc.... issue only with Crossmgr. Assume there is a way to have program recognize the numeric keypad inputs, particularly enter, clear, tab keys. As a suggestion, it would be great if some of the keys like the -, +, /, x keys could be remapped to function the DNF, Pull, DNS, DQ options. Attempting to enter bib numbers directly without a caller as a solo scorer. Thanks for your support. Love what I have been able to utilize as a volunteer scoring for a youth racing program.

tonyguymac avatar Sep 21 '20 20:09 tonyguymac

The USB keypad does work. I’ve done it. However, I can’t recall what I did to make it work.

Give me some time to dig out my USB keypad.

Yes, there should be optioned to map the different keys to different functions.

Mark

On Sep 21, 2020, at 4:17 PM, tonyguymac [email protected] wrote:

Mbuckaway: Don't know if you are the one responsible or not, but thanks if you are the one that enabled me to run Crossmgr on my macbook pro this year. I have tried for several years to achieve without success. New user, so still learning. Attempting to use with USB numeric keypad to enter bib numbers but the laptop only recognizes the 0-9 and does not recognize any of the standard keys including the Return / Enter key. The keypad works as it should with excel, numbers, etc.... issue only with Crossmgr. Assume there is a way to have program recognize the numeric keypad inputs, particularly enter, clear, tab keys. As a suggestion, it would be great if some of the keys like the -, +, /, x keys could be remapped to function the DNF, Pull, DNS, DQ options. Attempting to enter bib numbers directly without a caller as a solo scorer. Thanks for your support. Love what I have been able to utilize as a volunteer scoring for a youth racing program.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/esitarski/CrossMgr/issues/35#issuecomment-696349380, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADIY4LX3DASDBN5S3PMKNWTSG6YFRANCNFSM4J7LVVIQ.

mbuckaway avatar Sep 21 '20 20:09 mbuckaway

Mark, Let me tell you what I tried.

I have tried plugging n an older iMac usb keyboard with the numeric keypad and second enter key.
Crossmgr did recognize the numbers 0-9 but not recognize the additional enter key, the decimal point, the clear key. I tried other numeric keyboards said to be compatible with Mac without success. I also activated the keypad display on the entry screen in Crossmgr and although that works as it should it did not enable the other keypad enter keys.

I looked into keyboard preferences and function keys on the Mac but did not find any obvious solutions.

Crossmgr apparently filters the inputs to the entry screen / bib number box because it doesn’t recognize decimal points. Perhaps it needs code to recognize the additional enter key?

Outside my wheelhouse. Looking for comprehensive guide to use the additional compatible programs and wireless connection. Welcome references or mentors. Thanks Tony Philpin USAC #430628 USAC Road A, Moto B Voluntarily serving as an official and scoring Crit and cross events for CT Cycling Advancement Program locally.

On Sep 21, 2020, at 4:25 PM, Mark Buckaway [email protected] wrote:

The USB keypad does work. I’ve done it. However, I can’t recall what I did to make it work.

Give me some time to dig out my USB keypad.

Yes, there should be optioned to map the different keys to different functions.

Mark

On Sep 21, 2020, at 4:17 PM, tonyguymac [email protected] wrote:

Mbuckaway: Don't know if you are the one responsible or not, but thanks if you are the one that enabled me to run Crossmgr on my macbook pro this year. I have tried for several years to achieve without success. New user, so still learning. Attempting to use with USB numeric keypad to enter bib numbers but the laptop only recognizes the 0-9 and does not recognize any of the standard keys including the Return / Enter key. The keypad works as it should with excel, numbers, etc.... issue only with Crossmgr. Assume there is a way to have program recognize the numeric keypad inputs, particularly enter, clear, tab keys. As a suggestion, it would be great if some of the keys like the -, +, /, x keys could be remapped to function the DNF, Pull, DNS, DQ options. Attempting to enter bib numbers directly without a caller as a solo scorer. Thanks for your support. Love what I have been able to utilize as a volunteer scoring for a youth racing program.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/esitarski/CrossMgr/issues/35#issuecomment-696349380, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADIY4LX3DASDBN5S3PMKNWTSG6YFRANCNFSM4J7LVVIQ.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/esitarski/CrossMgr/issues/35#issuecomment-696353806, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARCZOUPBO5ZJJA3VJOG77OTSG6ZCLANCNFSM4J7LVVIQ.

tonyguymac avatar Sep 21 '20 21:09 tonyguymac

@tonyguymac

Ed just updated the beta version of CrossMgr to log invalid keycodes. I suggest installed that and trying it. I won't have time to look into the issue until the weekend at least. I seem to recall either I or Ed had to modify the code to recognize the keys on the keypad. I suspect if I changed the code, it never got checked in because I was running a private build for a while.

Let us know what keycodes the USB keypad is producing.

Mark

mbuckaway avatar Sep 23 '20 16:09 mbuckaway

So, ran crossmgr 3.0.51 from today's build. As it turns out, the standard server keyboard for a mac with the numeric keypad does not allow the keypad enter key to work. The log has the errors:

2020-09-30T11:43:26 (v3.0.51-20200930100435 Darwin) handleNumKeypress: ignoring keycode: >= 255 370 2020-09-30T11:43:26 (v3.0.51-20200930100435 Darwin) handleNumKeypress: ignoring keycode: >= 255 370 2020-09-30T11:43:26 (v3.0.51-20200930100435 Darwin) handleNumKeypress: ignoring keycode: >= 255 370 2020-09-30T11:43:27 (v3.0.51-20200930100435 Darwin) handleNumKeypress: ignoring keycode: >= 255 370

Hopefully, that points to the problem.

Moved to issue 66.

Mark

mbuckaway avatar Sep 30 '20 15:09 mbuckaway