dennisvang / tufup-example

Example of a self-updating application using tufup.
MIT License
14 stars 8 forks source link

Why updates is not applied #7

Closed 0x0645 closed 2 years ago

0x0645 commented 2 years ago

I built the example with another version and the update got downloaded in the temp file but the files in the app dir not updated and stayed on the old version and still asking for update

0x0645 commented 2 years ago

I read there that there is

A default install script is then started, which copies the new files and folders from the temporary directory to the current app installation directory. On Windows, this script is started in a new process, after which the currently running process will exit.

dennisvang commented 2 years ago

@0x0645 Could you provide some more background? For example:

0x0645 commented 2 years ago

What platform are you using?

Windows

What version of python?

3.9

Are you using a clone of the repository, or did you customize it in some way?

clone just trying the library

How exactly are you running the app?

followed the instruction the readme

Did you check to see if the install dir contains a log file? If so, what does it contain?

no there is no log file

dennisvang commented 2 years ago

And just to be sure: did you confirm installation by entering y in the command window?

(After downloading, the example app asks whether you want to proceed with the installation.)

0x0645 commented 2 years ago

yes also I can see the new version in my temp file after downloading it close instantly

0x0645 commented 2 years ago

just check after opening it again it shows DEBUG:tufup.client:files extracted to C:\Users\Mostafa\AppData\Local\Temp\tufup
Install update in C:\Users\Mostafa\AppData\Local\Programs\my_app? [y]/n

I typed y and it close instantly

dennisvang commented 2 years ago

I typed y and it close instantly

This looks normal: After downloading the new version to the temp dir, once you type y, all it needs to do is move the file(s) to the install dir. This can happen quite fast. The app then closes and does not restart by itself, so you'll need to restart it manually.

And is this windows 10 or 11?

dennisvang commented 2 years ago

@0x0645 Can you also confirm that you are running the app from inside the following directory?

C:\Users\Mostafa\AppData\Local\Programs\my_app

0x0645 commented 2 years ago

windows 10

when starting it again it still showing image but the version inC:\Users\Mostafa\AppData\Local\Programs\my_app close instantly which means there is no update

dennisvang commented 2 years ago

It looks like you are running the main.exe from your temp folder, is that correct?

0x0645 commented 2 years ago

I think i am starting to understand but what isC:\Users\Mostafa\AppData\Local\Programs\my_app why update got installed there it should be installed in INSTALL_DIR which is in my system isC:\Users\Mostafa\Desktop\disktop\tufup-example\temp\my_app or I am missing something

0x0645 commented 2 years ago

It looks like you are running the main.exe from your temp folder, is that correct?

No I am running it from my INSTALL_DIR

dennisvang commented 2 years ago

It looks like there's some confusion here, caused by the way you are running the example app:

In your case, C:\Users\Mostafa\AppData\Local\Programs\my_app is the proper INSTALL_DIR for the default example, so you should always run the main.exe file from there.

The install dir that you mention, C:\Users\Mostafa\Desktop\disktop\tufup-example\temp\my_app, is actually the development install dir. This should only be used for development of the tufup-example package itself.

Have a look at the settings file to see how this works.

0x0645 commented 2 years ago

I understand now I am new to pyinstaller so the frozen thing was new to me and I didn't read the doc in the link above. Thank you for your help.

dennisvang commented 2 years ago

@0x0645 Happy to help. I understand this can be a bit confusing, so I'll try to make the readme a bit clearer.