Skip to content

Integrated handling for filesystem and gzipped binaries #8266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
28c79fa
Add functionality to copy generated binaries into sketch folder
gneiss15 Aug 2, 2021
8c7445b
Merge branch 'master' into master
gneiss15 Aug 9, 2021
4f6340e
Integrated handling for filesystem and gzipped Binaries
gneiss15 Aug 13, 2021
5509ba4
Forgot to add new tools to git
gneiss15 Aug 13, 2021
71d4213
Minor bugfix
gneiss15 Aug 13, 2021
62ca3b6
Debug for failed check in Pull-Request
gneiss15 Aug 13, 2021
6091823
Ignore files generated by boards.txt.py & my extra files
gneiss15 Aug 13, 2021
158484f
More Debug for failed check in Pull-Request
gneiss15 Aug 13, 2021
cf02d41
Bugfix for check
gneiss15 Aug 13, 2021
dd93598
And another bigfix :-(
gneiss15 Aug 13, 2021
f39b549
Changed mod a+x (as all other .py)
gneiss15 Aug 13, 2021
43f9e21
Syntax error in utilities.py may be the reason for failed import. Cor…
gneiss15 Aug 13, 2021
6849302
instead of external commd, use python module gzip
gneiss15 Aug 18, 2021
d86910c
Integrated handling for filesystem and gzipped binaries (#1)
gneiss15 Aug 18, 2021
ea98d66
Improved handling of "tkinter not awailable"
gneiss15 Aug 18, 2021
fc74ac7
Merge branch 'master' into Integrated-handling-for-filesystem-and-gzi…
gneiss15 Aug 18, 2021
b827489
Improved selection of actions to be performed
gneiss15 Aug 23, 2021
8c06e83
Merge branch 'master' of https://github.com/esp8266/Arduino into esp8…
gneiss15 Sep 5, 2021
cbc8f4d
Merge branch 'esp8266-master' into Integrated-handling-for-filesystem…
gneiss15 Sep 5, 2021
87eacb4
Remover empthy dir
gneiss15 Sep 8, 2021
32d715a
Merge branch 'Integrated-handling-for-filesystem-and-gzipped-Binaries…
gneiss15 Sep 8, 2021
3380148
Changes as requested by d-a-v
gneiss15 Sep 15, 2021
311c9c3
Removed changes not contained inside master
gneiss15 Sep 15, 2021
b7751e3
platformio-build.py forgotten
gneiss15 Sep 15, 2021
9d1ded0
Merge branch 'master' into Integrated-handling-for-filesystem-and-gzi…
gneiss15 Sep 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improved handling of "tkinter not awailable"
  • Loading branch information
gneiss15 committed Aug 18, 2021
commit ea98d66c182463648f82838435b83cfda2cf86f9
5 changes: 4 additions & 1 deletion tools/postbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ def CreateFs( fsName, mkFsName ):
raise ProcessError( "CreateFs: data dir is not a directory: %s" % dataDir )
FilesInDir = CountFilesInDir( dataDir )
if FilesInDir == 0:
if not ConfirmDialog( "%s Create" % fsName, "No files have been found in your data folder!\nAre you sure you want to create an empty %s image?" % fsName ):
answer = ConfirmDialog( "%s Create" % fsName, "No files have been found in your data folder!\nAre you sure you want to create an empty %s image?" % fsName )
if answer < 0:
raise ProcessError( "tkinter not available.\nCan't ask 'Are you sure you want to create an empty ... image?'\nPlease install it with:\npip3 install tkinter\n" )
elif:
raise ProcessError( "Canceled by user" )
os.makedirs( DstDir, exist_ok = True )
imageName = "%s.%s" % ( Args.name, fsName )
Expand Down
5 changes: 3 additions & 2 deletions tools/utillities.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,15 @@ def RemoveIno( path ):
return path

def ConfirmDialog( title, text ):
""" return -1 if tkinter not installed, 0 if aswer was no, 1 if answer was yes """
try:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a leftover ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is the base of (for ex.) ConfirmDialog & WarningDialog which are used inside postbuild.py

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anything with python must be cross-compatible with all archs.
A portable version of python is shipped by the installer and I doubt tkinter will work in that case.

import tkinter
from tkinter import messagebox
except:
raise ProcessError( "tkinter not available.\nPlease install it with:\npip3 install tkinter\n" )
return -1
rootWin = tkinter.Tk() # Create the object
rootWin.overrideredirect( 1 ) # Avoid it appearing and then disappearing quickly
#rootWin.iconbitmap("PythonIcon.ico") # Set an icon (this is optional - must be in a .ico format)
rootWin.withdraw() # Hide the window as we do not want to see this one
return messagebox.askyesno( title, text, parent = rootWin )
return 1 if messagebox.askyesno( title, text, parent = rootWin ) else 0