Skip to content

Commit e740fb0

Browse files
committed
Fix ZIP stuff
1 parent a4ae7f2 commit e740fb0

File tree

2 files changed

+23
-37
lines changed

2 files changed

+23
-37
lines changed

.github/workflows/build_n_test.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ jobs:
1818
- uses: actions/checkout@v3
1919
with:
2020
fetch-depth: 0
21-
- run: make zip
22-
- name: Rename ZIPs
21+
- run: make zip CROSS=win32
22+
- name: Rename ZIP
2323
run: |
2424
mv flexptools.zip "flexptools-win32-`git describe --tags --always`.zip"
25-
mv spin2cpp.zip "spin2cpp-win32-`git describe --tags --always`.zip"
2625
- uses: actions/upload-artifact@v3
2726
with:
2827
name: release_zips_win32
@@ -36,10 +35,9 @@ jobs:
3635
with:
3736
fetch-depth: 0
3837
- run: make zip CROSS=linux-musl
39-
- name: Rename ZIPs
38+
- name: Rename ZIP
4039
run: |
4140
mv flexptools.zip "flexptools-linux-amd64-`git describe --tags --always`.zip"
42-
mv spin2cpp.zip "spin2cpp-linux-amd64-`git describe --tags --always`.zip"
4341
- uses: actions/upload-artifact@v3
4442
with:
4543
name: release_zips_linux_amd64

Makefile

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -55,31 +55,31 @@ ifeq ($(CROSS),win32)
5555
# CC=i586-mingw32msvc-gcc
5656
CC=i686-w64-mingw32-gcc -Wl,--stack -Wl,8000000 -O
5757
EXT=.exe
58-
BUILD=./build-win32
58+
BUILD=build-win32
5959
else ifeq ($(CROSS),rpi)
6060
CC=arm-linux-gnueabihf-gcc -O
6161
EXT=
62-
BUILD=./build-rpi
62+
BUILD=build-rpi
6363
else ifeq ($(CROSS),linux32)
6464
CC=gcc -m32
6565
EXT=
66-
BUILD=./build-linux32
66+
BUILD=build-linux32
6767
else ifeq ($(CROSS),macosx)
6868
CC=o64-clang -DMACOSX -O
6969
EXT=
70-
BUILD=./build-macosx
70+
BUILD=build-macosx
7171
else ifeq ($(OS),Windows_NT)
7272
CC=gcc
7373
EXT=.exe
74-
BUILD=./build
74+
BUILD=build
7575
else ifeq ($(CROSS),linux-musl)
7676
CC=musl-gcc -static -fno-pie
7777
EXT=
78-
BUILD=./build
78+
BUILD=build
7979
else
8080
CC=gcc
8181
EXT=
82-
BUILD=./build
82+
BUILD=build
8383
endif
8484

8585
INC=-I. -I./backends -I./frontends -I$(BUILD)
@@ -267,35 +267,23 @@ sys/%.bas.h: sys/%.bas
267267
#
268268
-include $(SPINOBJS:.o=.d)
269269

270-
#
271-
# targets to build a .zip file for a release
272-
#
273-
spin2cpp.exe: .PHONY
274-
$(MAKE) CROSS=win32
275-
cp build-win32/spin2cpp.exe .
276-
277-
flexspin.exe: .PHONY
278-
$(MAKE) CROSS=win32
279-
cp build-win32/flexspin.exe .
280-
281-
flexcc.exe: .PHONY
282-
$(MAKE) CROSS=win32
283-
cp build-win32/flexcc.exe .
284-
285-
spin2cpp.linux: .PHONY
286-
$(MAKE) CROSS=linux32
287-
cp build-linux32/spin2cpp ./spin2cpp.linux
288270

289271
COMMONDOCS=COPYING Changelog.txt doc
290272
ALLDOCS=README.md Flexspin.md $(COMMONDOCS)
291273

292-
zip: flexcc.exe flexspin.exe spin2cpp.exe
293-
$(SIGN) flexspin
294-
mv flexspin.signed.exe flexspin.exe
295-
$(SIGN) flexcc
296-
mv flexcc.signed.exe flexcc.exe
297-
zip -r spin2cpp.zip $(ALLDOCS) spin2cpp.exe flexspin.exe flexcc.exe
298-
zip -r flexptools.zip flexcc.exe flexspin.exe Flexspin.md doc include
274+
zip: all
275+
276+
ifeq ($(CROSS),win32)
277+
$(SIGN) $(BUILD)/flexspin
278+
mv $(BUILD)/flexspin.signed.exe $(BUILD)/flexspin.exe
279+
$(SIGN) $(BUILD)/flexcc
280+
mv $(BUILD)/flexcc.signed.exe $(BUILD)/flexcc.exe
281+
endif
282+
zip -r flexptools.zip $(BUILD)/spin2cpp$(EXT) $(BUILD)/flexcc$(EXT) $(BUILD)/flexspin$(EXT) $(ALLDOCS) include
283+
# I could not make this work in one command idk
284+
printf "@ $(BUILD)/spin2cpp$(EXT)\n@=bin/spin2cpp$(EXT)\n" | zipnote -w flexptools.zip
285+
printf "@ $(BUILD)/flexcc$(EXT)\n@=bin/flexcc$(EXT)\n" | zipnote -w flexptools.zip
286+
printf "@ $(BUILD)/flexspin$(EXT)\n@=bin/flexspin$(EXT)\n" | zipnote -w flexptools.zip
299287

300288
#
301289
# target to build a windows spincvt GUI

0 commit comments

Comments
 (0)