Would look like this: import platform if architecture = "64bit" : winsparkle = 'venv \\ Lib \\ site-packages \\ pywinsparkle \\ libs \\ 圆4 \\ WinSparkle.dll' else : winsparkle = 'venv \\ Lib \\ site-packages \\ pywinsparkle \\ libs \\ x86 \\ WinSparkle.dll' a = Analysis (, pathex =, binaries =, datas =, hiddenimports =, hookspath =, runtime_hooks =, excludes =, win_no_prefer_redirects = False, win_private_assemblies = False, cipher = block_cipher ) SPEC in Analysis for binaries.Īssuming you are using a virtual environment and it is called “venv” it The documentation for the API can be found at:Īdd an entry to. sleep ( 1 ) if _name_ = "_main_" : main () API Documentation win_sparkle_check_update_without_ui () # dont do it this way, just an example to keep the thread running while True : time. win_sparkle_check_update_with_ui () # alternatively you could check for updates in the # background silently pywinsparkle. win_sparkle_init () # check for updates pywinsparkle. win_sparkle_set_dsa_pub_pem ( pub_key ) # initialize pywinsparkle. isfile ( 'dsa_pub.pem' ): with open ( 'dsa_pub.pem', 'r' ) as file : pub_key = file. win_sparkle_set_app_details ( "VendorName", "TestApp1", "1.0.0" ) if os. win_sparkle_set_appcast_url ( update_url ) pywinsparkle. win_sparkle_set_shutdown_request_callback ( shutdown ) # set application details update_url = "" pywinsparkle. win_sparkle_set_did_not_find_update_callback ( no_update_found ) pywinsparkle. win_sparkle_set_update_cancelled_callback ( update_cancelled ) pywinsparkle. win_sparkle_set_error_callback ( encountered_error ) pywinsparkle. win_sparkle_set_did_find_update_callback ( found_update ) pywinsparkle. Necessary to set the appcast url with win_sparkle_set_appcast_url().īasic Example: from pywinsparkle import pywinsparkle import os def no_update_found (): """ when no update has been found, close the updater""" print ( "No update found" ) print ( "Setting flag to shutdown PassagesUpdater" ) def found_update (): """ log that an update was found """ print ( "New Update Available" ) def encountered_error (): print ( "An error occurred" ) def update_cancelled (): """ when the update was cancelled, close the updater""" print ( "Update was cancelled" ) print ( "Setting flag to shutdown PassagesUpdater" ) def shutdown (): """ The installer is being launched signal the updater to shutdown """ # actually shutdown the app here print ( "Safe to shutdown before installing" ) def main (): # register callbacks pywinsparkle. The Windows Resource files should work though. Instead I have just been using win_sparkle_set_app_details()įunction. In pywinsparkle, I have not tested created Windows Resource files, The function object is required (ie, the name of the function without The only difference is in the argument types whichĪre either python strings or integers. Note: If you are using one of the above versions pip throws and errror,Ĭonsider upgrading pip with pip install -upgrade pip UsageĪll of the API function wrapper names are the same as the original Python 2.7 and all python version after 3.3 Wheels are built for 32bit and 64bit versions of Windows, covering Vaclac Slavik and is therefore technically unofficial. Note: This is package is not affiliated with the original developer The current version of PyWinSparkle includes WinSparkle 0.6.0 The original WinSparkle project is located here: Pywinsparkle is a wrapper for the WinSparkle project originallyĭeveloped by Vaclav Slavik. An auto-update framework for frozen Python applications on Windows.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |