Skip to content

Commit

Permalink
Flasher: add icon and setup.py for py2app
Browse files Browse the repository at this point in the history
Add Make rule to generate executable.
  • Loading branch information
Matthias Puech committed Nov 16, 2015
1 parent 4a61cae commit 23d09ff
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build/
dist/
.DS_Store
*.pyc
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ ORIGINAL_BIN = $(RESOURCES)/original_firmware.bin

include stmlib/makefile.inc

flasher: bin
python2.7 flasher/setup.py py2app

# Rule for uploading the original firmware
upload_original_serial:
python2.7 $(STM32LOADER_PATH)stm32loader.py \
Expand Down
Binary file added flasher/icon.icns
Binary file not shown.
22 changes: 22 additions & 0 deletions flasher/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""

from setuptools import setup

APP = ['flasher/Flasher.py']
DATA_FILES = ['flasher/logo.gif']
OPTIONS = {
'argv_emulation': True,
'iconfile':'flasher/icon.icns',
}

setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)

0 comments on commit 23d09ff

Please sign in to comment.