- Posts: 311
- Thank you received: 51
How does PathPilot know what Python files to start?
7 years 9 months ago #125115
by smgvbest
Replied by smgvbest on topic How does PathPilot know what Python files to start?
If you want to look at how they do the update check check_for_pathpilot_update in pathpilotmanager.py
this is what does the update and also. those tgp files and just pgp encrypted tgz files (the password is in the script btw)
so if you wanted to look at an update you can do this
gpg --yes --no-use-agent --decrypt --passphrase=moravianvalley --output=v2.1.6.tgz v2.1.6.tgp
then
tar -zxvf v2.1.6.tgz
that will create the v2.1.6 directory in the current folder
you can look and compare (diff) the update vs your current tmc directory and create a patch file
apply the patch
do the symbolic switch and you on the new one with your updates
I maintain 2 system, my actual lathe version and my development vmware image (i'm modified vmcheck.py to detect VMWare and put me in sim mode
this is what does the update and also. those tgp files and just pgp encrypted tgz files (the password is in the script btw)
so if you wanted to look at an update you can do this
gpg --yes --no-use-agent --decrypt --passphrase=moravianvalley --output=v2.1.6.tgz v2.1.6.tgp
then
tar -zxvf v2.1.6.tgz
that will create the v2.1.6 directory in the current folder
you can look and compare (diff) the update vs your current tmc directory and create a patch file
apply the patch
do the symbolic switch and you on the new one with your updates
I maintain 2 system, my actual lathe version and my development vmware image (i'm modified vmcheck.py to detect VMWare and put me in sim mode
The following user(s) said Thank You: jwatte
Please Log in or Create an account to join the conversation.
7 years 9 months ago #125123
by jwatte
Replied by jwatte on topic How does PathPilot know what Python files to start?
My approach would probably be to keep the one-line change to the HAL files as a diff/patch hunk.
Then, on start-up, I'd check whether the desired target line exists in the installed copy, and if not, apply the patch. I can use systemd to make sure that this happens before the GUI starts up.
The one-line change would then launch my UI thread script, and I'd be able to do whatever I want at that point.
After an update, when I reboot, the patch gets re-applied, and if it doesn't apply cleanly, I can detect that and take appropriate measures.
Then, on start-up, I'd check whether the desired target line exists in the installed copy, and if not, apply the patch. I can use systemd to make sure that this happens before the GUI starts up.
The one-line change would then launch my UI thread script, and I'd be able to do whatever I want at that point.
After an update, when I reboot, the patch gets re-applied, and if it doesn't apply cleanly, I can detect that and take appropriate measures.
Please Log in or Create an account to join the conversation.
Time to create page: 0.124 seconds