mirror of
https://github.com/keirf/greaseweazle-firmware.git
synced 2025-10-31 11:06:44 -07:00
Windows exe: Add new target 'windist' for making the Windows zip.
This commit is contained in:
12
Makefile
12
Makefile
@@ -2,7 +2,7 @@
|
||||
export FW_MAJOR := 0
|
||||
export FW_MINOR := 16
|
||||
|
||||
TARGETS := all blinky clean dist mrproper ocd flash start serial
|
||||
TARGETS := all blinky clean dist windist mrproper ocd flash start serial
|
||||
.PHONY: $(TARGETS)
|
||||
|
||||
ifneq ($(RULES_MK),y)
|
||||
@@ -65,6 +65,16 @@ dist:
|
||||
$(MAKE) clean
|
||||
$(ZIP) $(PROJ)-$(VER).zip $(PROJ)-$(VER)
|
||||
|
||||
windist:
|
||||
rm -rf $(PROJ)-*
|
||||
wget https://github.com/keirf/Greaseweazle/releases/download/$(VER)/$(PROJ)-$(VER).zip
|
||||
$(UNZIP) $(PROJ)-$(VER).zip
|
||||
cp -a scripts/setup.py $(PROJ)-$(VER)/scripts
|
||||
cd $(PROJ)-$(VER)/scripts && $(PYTHON) setup.py build
|
||||
cp -a $(PROJ)-$(VER)/scripts/build/exe.win*/* $(PROJ)-$(VER)/
|
||||
rm -rf $(PROJ)-$(VER)/scripts $(PROJ)-$(VER)/*.py
|
||||
$(ZIP) $(PROJ)-$(VER)-win.zip $(PROJ)-$(VER)
|
||||
|
||||
mrproper: clean
|
||||
rm -rf $(PROJ)-*
|
||||
|
||||
|
||||
2
Rules.mk
2
Rules.mk
@@ -6,9 +6,11 @@ LD = $(TOOL_PREFIX)ld
|
||||
ifeq ($(OS), Windows_NT)
|
||||
PYTHON = python
|
||||
ZIP = "C:/Program Files/7-Zip/7z.exe" a
|
||||
UNZIP = "C:/Program Files/7-Zip/7z.exe" x
|
||||
else
|
||||
PYTHON = python3
|
||||
ZIP = zip -r
|
||||
UNZIP = unzip
|
||||
endif
|
||||
|
||||
ifneq ($(VERBOSE),1)
|
||||
|
||||
19
scripts/setup.py
Normal file
19
scripts/setup.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from cx_Freeze import setup, Executable
|
||||
from greaseweazle import version
|
||||
|
||||
buildOptions = dict(
|
||||
packages = ['greaseweazle'],
|
||||
excludes = [],
|
||||
include_msvcr = True)
|
||||
|
||||
base = 'Console'
|
||||
|
||||
executables = [
|
||||
Executable('gw.py', base=base)
|
||||
]
|
||||
|
||||
setup(name='Greaseweazle',
|
||||
version = f'{version.major}.{version.minor}',
|
||||
description = '',
|
||||
options = dict(build_exe = buildOptions),
|
||||
executables = executables)
|
||||
Reference in New Issue
Block a user