To prove my theory try executing this in your FreeCAD console, also calling the start method of the updater will start the update but you don't know that it is updating(i.e no log but it is doing it's job). See the AppImage's directory you should have a .part file when you start the update.
Code: Select all
from PySide.QtCore import QTimer
def printSomething():
print("Hello World")
QTimer.singleShot(1000, printSomething)
# You cannot see anything even after 1 second
# Now Try this
Test = '' # Empty string
def handleTimeout():
global Test
Test = 'This was called'
QTimer.singleShot(1000, handleTimeout)
# After 1 second
print(Test) # This should print 'This was called'
Try executing this to see what's the updater is doing if you are using FreeCAD's console.
Code: Select all
import sys
import os
import time
from PySide2.QtCore import QCoreApplication,QObject,QTimer,QPluginLoader
messages = []
def handleLog(msg, appimage):
global messages
messages.append(msg)
path = os.path.join(os.environ['PREFIX'], "lib", "libAppImageUpdaterBridge.so")
loader = QPluginLoader()
loader.setFileName(path)
loader.load()
appimageupdaterbridge = loader.instance()
appimageupdaterbridge.setAppImage(os.environ['APPIMAGE'])
appimageupdaterbridge.logger.connect(handleLog)
# Now call any method
appimageupdaterbridge.start()
# Now after sometime, Try printing the messages list
print(messages) # Do not put this in a loop, this will block the main thread.