diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index e24aa99f..8c61abfb 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -28,7 +28,7 @@ jobs: misc/cirun -u 1000 misc/version.sh - name: 'Build Dist Assets' run: | - misc/cirun -u 1000 misc/mkassets.sh + misc/cirun -u 1000 make mkassets - uses: actions/upload-artifact@v3 with: { name: assets, path: assets/ } - name: 'Upload API Docs' # http://tim-janik.github.io/docs/anklang diff --git a/.gitignore b/.gitignore index 4e30669d..78ac2582 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ /config-defaults\.mk /out/ /TAGS -/TODO\.md -/BACKLOG\.md /rand/ +/\.submodule-stamp /\.dlcache/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..4b873336 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,18 @@ +[submodule "minizip-ng"] + path = external/minizip-ng + url = https://github.com/zlib-ng/minizip-ng.git +[submodule "rapidjson"] + path = external/rapidjson + url = https://github.com/Tencent/rapidjson.git +[submodule "clap"] + path = external/clap + url = https://github.com/free-audio/clap.git +[submodule "websocketpp"] + path = external/websocketpp + url = https://github.com/zaphoyd/websocketpp.git +[submodule "blake3"] + path = external/blake3 + url = https://github.com/BLAKE3-team/BLAKE3.git +[submodule "blobs4anklang"] + path = external/blobs4anklang + url = https://github.com/tim-janik/blobs4anklang.git diff --git a/Makefile.mk b/Makefile.mk index 58d4e8c2..6946c0a5 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -120,7 +120,8 @@ LS_TREE_LST ::= # added to by ls-tree.d $>/ls-tree.d: $(GITCOMMITDEPS) | $>/ $(QGEN) $Q if test -r .git ; then \ - git ls-tree -r --name-only HEAD > $>/ls-tree.lst ; \ + git ls-tree -r --name-only HEAD \ + | grep -v '^external/' > $>/ls-tree.lst ; \ else \ $(CP) ./ls-tree.lst $>/ls-tree.lst ; \ fi @@ -128,6 +129,13 @@ $>/ls-tree.d: $(GITCOMMITDEPS) | $>/ && sed 's/$$/ \\/' $>/ls-tree.lst && echo ')' ) > $@ -include $>/ls-tree.d +# == .submodule-stamp == +.submodule-stamp: $(GITCOMMITDEPS) + $(QGEN) + $Q test ! -e .git || git submodule update --init --recursive + $Q touch $@ +Makefile.mk: .submodule-stamp + # == enduser targets == all: FORCE check: FORCE @@ -320,6 +328,14 @@ endef # == dist == extradist ::= ChangeLog doc/copyright TAGS ls-tree.lst # doc/README +dist_exclude := $(strip \ + external/rapidjson/bin \ + external/rapidjson/doc \ + external/websocketpp/test \ + external/clap/artwork \ + external/minizip-ng/test \ + external/minizip-ng/lib \ +) dist: $(extradist:%=$>/%) @$(eval distname := anklang-$(version_short)) $(QECHO) MAKE $(distname).tar.zst @@ -327,6 +343,9 @@ dist: $(extradist:%=$>/%) $Q rm -rf $>/dist/$(distname)/ && mkdir -p $>/dist/$(distname)/ assets/ $Q $(CP) $>/ChangeLog assets/ChangeLog-$(version_short).txt $Q git archive -o assets/$(distname).tar --prefix=$(distname)/ HEAD + $Q git submodule foreach \ + 'git archive --prefix="$(distname)/$${displaypath}/" -o tmp~.tar HEAD && tar Af "$(abspath assets/$(distname).tar)" tmp~.tar && rm tmp~.tar' + $Q tar f assets/$(distname).tar --delete $(dist_exclude:%=$(distname)/%) $Q cd $>/ && $(CP) --parents $(extradist) $(abspath $>/dist/$(distname)) $Q tar f assets/$(distname).tar --delete $(distname)/NEWS.md \ && misc/mknews.sh > $>/dist/$(distname)/NEWS.md \ diff --git a/ase/Makefile.mk b/ase/Makefile.mk index c8534756..e2b96625 100644 --- a/ase/Makefile.mk +++ b/ase/Makefile.mk @@ -11,7 +11,6 @@ ase/noglob.cc ::= ase/main.cc $(ase/gtk2wrap.sources) $(ase/jackdriver.sources ase/libsources.cc ::= $(filter-out $(ase/noglob.cc), $(wildcard ase/*.cc)) ase/libsources.c ::= $(wildcard ase/*.c) ase/include.deps ::= $>/ase/sysconfig.h -ase/include.deps += $>/external/rapidjson/rapidjson.h # == AnklangSynthEngine definitions == lib/AnklangSynthEngine ::= $>/lib/AnklangSynthEngine @@ -32,9 +31,6 @@ ase/AnklangSynthEngine.objects ::= $(sort \ ase/AnklangSynthEngine.objects += $(devices/4ase.objects) ALL_TARGETS += $(lib/AnklangSynthEngine) -# Work around legacy code in external/websocketpp/*.hpp -ase/websocket.cc.FLAGS = -Wno-deprecated-dynamic-exception-spec - # == AnklangSynthEngine-fma == $(lib/AnklangSynthEngine)-fma: $(QGEN) @@ -109,86 +105,30 @@ int main (int argc, const char *argv[]) { } endef -# == external/minizip == -$>/external/minizip/mz_zip.h: ase/Makefile.mk | $>/external/ - @ $(eval H := 80d745e1c8caf6f81f6457403b0d9212e8a138b2badd6060e8a5da8583da2551) - @ $(eval U := https://github.com/zlib-ng/minizip-ng/archive/refs/tags/2.9.0.tar.gz) - @ $(eval T := minizip-ng-2.9.0.tar.gz) - $(QECHO) FETCH "$U" - $Q cd $>/external/ && rm -rf minizip* \ - $(call AND_DOWNLOAD_SHAURL, $H, $U, $T) && tar xf $T && rm $T - $Q ln -s $(T:.tar.gz=) $>/external/minizip - $Q test -e $@ && touch $@ -$(wildcard ase/*.cc ase/*.c): $>/external/minizip/mz_zip.h - -# == external/websocketpp == -$>/external/websocketpp/server.hpp: ase/Makefile.mk | $>/external/ - @ $(eval H := 6ce889d85ecdc2d8fa07408d6787e7352510750daa66b5ad44aacb47bea76755) - @ $(eval U := https://github.com/zaphoyd/websocketpp/archive/0.8.2.tar.gz) - @ $(eval T := websocketpp-0.8.2.tar.gz) - $(QECHO) FETCH "$U" - $Q cd $>/external/ && rm -rf websocketpp* \ - $(call AND_DOWNLOAD_SHAURL, $H, $U, $T) && tar xf $T && rm $T - $Q ln -s $(T:.tar.gz=)/websocketpp $>/external/websocketpp - $Q test -e $@ && touch $@ -$>/external/websocketpp/config/asio_no_tls.hpp: $>/external/websocketpp/server.hpp -ase/websocket.cc: $>/external/websocketpp/config/asio_no_tls.hpp - -# == external/rapidjson == -$>/external/rapidjson/rapidjson.h: ase/Makefile.mk | $>/external/ - @ $(eval H := b9290a9a6d444c8e049bd589ab804e0ccf2b05dc5984a19ed5ae75d090064806) - @ $(eval U := https://github.com/Tencent/rapidjson/archive/232389d4f1012dddec4ef84861face2d2ba85709.tar.gz) - @ $(eval T := rapidjson-232389d4f1012dddec4ef84861face2d2ba85709.tar.gz) - $(QECHO) FETCH "$U" - $Q cd $>/external/ && rm -rf rapidjson* \ - $(call AND_DOWNLOAD_SHAURL, $H, $U, $T) && tar xf $T && rm $T - $Q ln -s $(T:.tar.gz=)/include/rapidjson $>/external/rapidjson - $Q test -e $@ && touch $@ -$(wildcard ase/*.cc): $>/external/rapidjson/rapidjson.h - -# == external/clap == -$>/external/clap/clap.h: ase/Makefile.mk | $>/external/ - @ $(eval H := eef67a38df6c20fd4cb79698772d35d30aefc2e1a8d5275a5169f58cd530333e) - @ $(eval U := https://github.com/free-audio/clap/archive/refs/tags/1.1.1.tar.gz) - @ $(eval T := clap-1.1.1.tar.gz) - $(QECHO) FETCH "$U" - $Q cd $>/external/ && rm -rf clap* \ - $(call AND_DOWNLOAD_SHAURL, $H, $U, $T) && tar xf $T && rm $T - $Q ln -s $(T:.tar.gz=)/include/clap $>/external/clap - $Q test -e $@ && touch $@ -$(wildcard ase/clap*.cc): $>/external/clap/clap.h - -# == external/blake3 == -$>/external/blake3/blake3.h: ase/Makefile.mk | $>/external/ - @ $(eval H := 112becf0983b5c83efff07f20b458f2dbcdbd768fd46502e7ddd831b83550109) - @ $(eval U := https://github.com/BLAKE3-team/BLAKE3/archive/refs/tags/1.3.1.tar.gz) - @ $(eval T := BLAKE3-1.3.1.tar.gz) - $(QECHO) FETCH "$U" - $Q cd $>/external/ && rm -rf blake3* \ - $(call AND_DOWNLOAD_SHAURL, $H, $U, $T) && tar xf $T && rm $T - $Q ln -s $(T:.tar.gz=)/c $>/external/blake3 - $Q test -e $@ && touch $@ -ase/compress.cc: $>/external/blake3/blake3.h - # == blake3impl.c == -$>/ase/blake3impl.c: $>/external/blake3/blake3.h | $>/ase/ +$>/ase/blake3impl.c: | $>/ase/ $(QGEN) - $Q echo -e '#ifdef __AVX512F__\n' ' #include "blake3/blake3_avx512.c"\n' '#endif' > $>/ase/blake3avx512.c - $Q echo -e '#ifdef __AVX2__\n' ' #include "blake3/blake3_avx2.c"\n' '#endif' > $>/ase/blake3avx2.c - $Q echo -e '#ifdef __SSE4_1__\n' ' #include "blake3/blake3_sse41.c"\n' '#endif' > $>/ase/blake3sse41.c - $Q echo -e '#ifdef __SSE2__\n' ' #include "blake3/blake3_sse2.c"\n' '#endif' > $>/ase/blake3sse2.c + $Q echo -e '#ifdef __AVX512F__\n' ' #include "external/blake3/c/blake3_avx512.c"\n' '#endif' > $>/ase/blake3avx512.c + $Q echo -e '#ifdef __AVX2__\n' ' #include "external/blake3/c/blake3_avx2.c"\n' '#endif' > $>/ase/blake3avx2.c + $Q echo -e '#ifdef __SSE4_1__\n' ' #include "external/blake3/c/blake3_sse41.c"\n' '#endif' > $>/ase/blake3sse41.c + $Q echo -e '#ifdef __SSE2__\n' ' #include "external/blake3/c/blake3_sse2.c"\n' '#endif' > $>/ase/blake3sse2.c $Q echo -e '#ifndef __AVX512F__\n' ' #define BLAKE3_NO_AVX512\n' '#endif' > $>/ase/blake3impl.c $Q echo -e '#ifndef __AVX2__\n' ' #define BLAKE3_NO_AVX2\n' '#endif' >> $>/ase/blake3impl.c $Q echo -e '#ifndef __SSE4_1__\n' ' #define BLAKE3_NO_SSE41\n' '#endif' >> $>/ase/blake3impl.c $Q echo -e '#ifndef __SSE2__\n' ' #define BLAKE3_NO_SSE2\n' '#endif' >> $>/ase/blake3impl.c - $Q echo -e '#include "blake3/blake3.c"' >> $>/ase/blake3impl.c - $Q echo -e '#include "blake3/blake3_portable.c"' >> $>/ase/blake3impl.c - $Q echo -e '#include "blake3/blake3_dispatch.c"' >> $>/ase/blake3impl.c + $Q echo -e '#include "external/blake3/c/blake3.c"' >> $>/ase/blake3impl.c + $Q echo -e '#include "external/blake3/c/blake3_portable.c"' >> $>/ase/blake3impl.c + $Q echo -e '#include "external/blake3/c/blake3_dispatch.c"' >> $>/ase/blake3impl.c $>/ase/blake3avx512.c $>/ase/blake3avx2.c $>/ase/blake3sse41.c $>/ase/blake3sse2.c: $>/ase/blake3impl.c # == AnklangSynthEngine == +ASE_EXTERNAL_INCLUDES := $(strip \ + -Iexternal/clap/include \ + -Iexternal/rapidjson/include \ + -Iexternal/websocketpp \ +) $(ase/AnklangSynthEngine.objects): $(ase/include.deps) $(ase/libase.deps) -$(ase/AnklangSynthEngine.objects): EXTRA_INCLUDES ::= -Iexternal/ -I$> -I$>/external/ $(ASEDEPS_CFLAGS) +$(ase/AnklangSynthEngine.objects): EXTRA_INCLUDES ::= $(ASE_EXTERNAL_INCLUDES) -I$> -I$>/external/ $(ASEDEPS_CFLAGS) $(lib/AnklangSynthEngine): | $>/lib/ $(call BUILD_PROGRAM, \ $(lib/AnklangSynthEngine), \ @@ -196,8 +136,8 @@ $(call BUILD_PROGRAM, \ $(lib/libase.so), \ $(BOOST_SYSTEM_LIBS) $(ASEDEPS_LIBS) $(ALSA_LIBS) -lzstd -ldl, \ ../lib) -# silence some websocketpp warnings -$(ase/AnklangSynthEngine.objects): EXTRA_CXXFLAGS ::= -Wno-sign-promo +# Work around legacy code in external/websocketpp/*.hpp +ase/websocket.cc.FLAGS = -Wno-deprecated-dynamic-exception-spec -Wno-sign-promo # == jackdriver.so == lib/jackdriver.so ::= $>/lib/jackdriver.so diff --git a/ase/compress.cc b/ase/compress.cc index 23a991ef..dc91b0fc 100644 --- a/ase/compress.cc +++ b/ase/compress.cc @@ -10,7 +10,7 @@ #error "Missing from libzstd-dev, please set CXXFLAGS and LDFLAGS" #endif #include -#include +#include "external/blake3/c/blake3.h" namespace Ase { diff --git a/ase/minizip.c b/ase/minizip.c index 0146ac4e..1d5e1bb2 100644 --- a/ase/minizip.c +++ b/ase/minizip.c @@ -2,15 +2,15 @@ #define HAVE_ZLIB #include "minizip.h" -#include "external/minizip/mz_zip.c" -#include "external/minizip/mz_strm.c" -#include "external/minizip/mz_crypt.c" // mz_crypt_crc32_update -#include "external/minizip/mz_zip_rw.c" -#include "external/minizip/mz_strm_buf.c" -#include "external/minizip/mz_strm_mem.c" -#include "external/minizip/mz_strm_zlib.c" -#include "external/minizip/mz_strm_split.c" -#include "external/minizip/mz_os.c" -#include "external/minizip/mz_os_posix.c" -#include "external/minizip/mz_strm_os_posix.c" -//#include "external/minizip/mz_compat.c" +#include "external/minizip-ng/mz_zip.c" +#include "external/minizip-ng/mz_strm.c" +#include "external/minizip-ng/mz_crypt.c" // mz_crypt_crc32_update +#include "external/minizip-ng/mz_zip_rw.c" +#include "external/minizip-ng/mz_strm_buf.c" +#include "external/minizip-ng/mz_strm_mem.c" +#include "external/minizip-ng/mz_strm_zlib.c" +#include "external/minizip-ng/mz_strm_split.c" +#include "external/minizip-ng/mz_os.c" +#include "external/minizip-ng/mz_os_posix.c" +#include "external/minizip-ng/mz_strm_os_posix.c" +//#include "external/minizip-ng/mz_compat.c" diff --git a/ase/minizip.h b/ase/minizip.h index f53ae5b9..9e301f98 100644 --- a/ase/minizip.h +++ b/ase/minizip.h @@ -8,17 +8,17 @@ #define MZ_ZIP_NO_ENCRYPTION // Minizip API -#include "external/minizip/mz.h" -#include "external/minizip/mz_os.h" -#include "external/minizip/mz_zip.h" -#include "external/minizip/mz_strm.h" -//#include "external/minizip/mz_crypt.h" -#include "external/minizip/mz_strm_buf.h" -#include "external/minizip/mz_strm_mem.h" -#include "external/minizip/mz_strm_zlib.h" -#include "external/minizip/mz_strm_split.h" -#include "external/minizip/mz_strm_os.h" -#include "external/minizip/mz_zip_rw.h" -//#include "external/minizip/mz_compat.h" +#include "external/minizip-ng/mz.h" +#include "external/minizip-ng/mz_os.h" +#include "external/minizip-ng/mz_zip.h" +#include "external/minizip-ng/mz_strm.h" +//#include "external/minizip-ng/mz_crypt.h" +#include "external/minizip-ng/mz_strm_buf.h" +#include "external/minizip-ng/mz_strm_mem.h" +#include "external/minizip-ng/mz_strm_zlib.h" +#include "external/minizip-ng/mz_strm_split.h" +#include "external/minizip-ng/mz_strm_os.h" +#include "external/minizip-ng/mz_zip_rw.h" +//#include "external/minizip-ng/mz_compat.h" #endif // __ASE_MINIZIP_H__ diff --git a/ase/storage.cc b/ase/storage.cc index 533d8e76..5632bbd1 100644 --- a/ase/storage.cc +++ b/ase/storage.cc @@ -423,7 +423,7 @@ class StorageReader::Impl { mz_zip_file *file_info = nullptr; if (MZ_OK == mz_zip_reader_entry_get_info (reader, &file_info) && file_info->filename && file_info->filename[0]) { - if (!strchr (file_info->filename, '/') && // see: https://github.com/nmoinvaz/minizip/issues/433 + if (!strchr (file_info->filename, '/') && // see: https://github.com/zlib-ng/minizip-ng/issues/433 !strchr (file_info->filename, '\\')) list.push_back (file_info->filename); } diff --git a/doc/copyright.ini b/doc/copyright.ini index f7109528..47ec3b3c 100644 --- a/doc/copyright.ini +++ b/doc/copyright.ini @@ -28,6 +28,7 @@ patterns = files = .gitattributes .gitignore + .gitmodules NEWS.md README.md devices/blepsynth/TODO diff --git a/external/blake3 b/external/blake3 new file mode 160000 index 00000000..4e84c8c7 --- /dev/null +++ b/external/blake3 @@ -0,0 +1 @@ +Subproject commit 4e84c8c7ae3da71d3aff5ba54d8ffa39a9b90fa0 diff --git a/external/blobs4anklang b/external/blobs4anklang new file mode 160000 index 00000000..7b0a4a68 --- /dev/null +++ b/external/blobs4anklang @@ -0,0 +1 @@ +Subproject commit 7b0a4a68a1e9efbe68fc9761bef080995f4b4d6b diff --git a/external/clap b/external/clap new file mode 160000 index 00000000..af1e05ce --- /dev/null +++ b/external/clap @@ -0,0 +1 @@ +Subproject commit af1e05ce6487151c6b36003fdb47566dbb50194e diff --git a/external/minizip-ng b/external/minizip-ng new file mode 160000 index 00000000..10ac291d --- /dev/null +++ b/external/minizip-ng @@ -0,0 +1 @@ +Subproject commit 10ac291d91d061d4ed52ba2e9ce878d1180e2eaf diff --git a/external/rapidjson b/external/rapidjson new file mode 160000 index 00000000..232389d4 --- /dev/null +++ b/external/rapidjson @@ -0,0 +1 @@ +Subproject commit 232389d4f1012dddec4ef84861face2d2ba85709 diff --git a/external/websocketpp b/external/websocketpp new file mode 160000 index 00000000..56123c87 --- /dev/null +++ b/external/websocketpp @@ -0,0 +1 @@ +Subproject commit 56123c87598f8b1dd471be83ca841ceae07f95ba diff --git a/misc/Makefile.mk b/misc/Makefile.mk index e79c0f75..66c815cd 100644 --- a/misc/Makefile.mk +++ b/misc/Makefile.mk @@ -103,13 +103,22 @@ check-copyright: misc/mkcopyright.py doc/copyright.ini $>/ls-tree.lst $Q misc/mkcopyright.py -b -u -e -c doc/copyright.ini $$(cat $>/ls-tree.lst) CHECK_TARGETS += $(if $(HAVE_GIT), check-copyright) -# == appimage-runtime-zstd == -$>/appimagetools/appimage-runtime-zstd: | $>/appimagetools/ - $(QECHO) FETCH $(@F), linuxdeploy # fetch AppImage tools - $Q test -e $(ABSPATH_DLCACHE)/linuxdeploy-x86_64.AppImage \ - || ( curl -sfSL https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -o $(ABSPATH_DLCACHE)/linuxdeploy-x86_64.AppImage.tmp \ - && mv $(ABSPATH_DLCACHE)/linuxdeploy-x86_64.AppImage.tmp $(ABSPATH_DLCACHE)/linuxdeploy-x86_64.AppImage ) - $Q $(CP) $(ABSPATH_DLCACHE)/linuxdeploy-x86_64.AppImage $(@D) && chmod +x $(@D)/linuxdeploy-x86_64.AppImage - $Q cd $(@D) $(call foreachpair, AND_DOWNLOAD_SHAURL, \ - 0c4c18bb44e011e8416fc74fb067fe37a7de97a8548ee8e5350985ddee1c0164 https://github.com/tim-janik/appimage-runtime/releases/download/21.6.0/appimage-runtime-zstd ) +# == appimagetools/appimage-runtime-zstd == +$>/appimagetools/appimage-runtime-zstd: | $>/appimagetools/ + $(QECHO) FETCH linuxdeploy, appimage-runtime-zstd + $Q mkdir -p .dlcache/ + $Q test -e .dlcache/linuxdeploy-x86_64.AppImage \ + || ( curl -sfSL https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -o .dlcache/linuxdeploy-x86_64.AppImage.tmp \ + && chmod +x .dlcache/linuxdeploy-x86_64.AppImage.tmp \ + && mv .dlcache/linuxdeploy-x86_64.AppImage.tmp .dlcache/linuxdeploy-x86_64.AppImage ) + $Q test -e .dlcache/appimage-runtime-zstd \ + || ( curl -sfSL https://github.com/tim-janik/appimage-runtime/releases/download/21.6.0/appimage-runtime-zstd -o .dlcache/appimage-runtime-zstd.tmp \ + && mv .dlcache/appimage-runtime-zstd.tmp .dlcache/appimage-runtime-zstd ) + $Q $(CP) .dlcache/linuxdeploy-x86_64.AppImage .dlcache/appimage-runtime-zstd $(@D) + +# == mkassets == +# Let misc/mkassets.sh do the work, just pre-cache needed downloads +mkassets: $>/appimagetools/appimage-runtime-zstd + $Q exec misc/mkassets.sh +.PHONY: mkassets CLEANDIRS += $>/mkdeb/ diff --git a/misc/mkcopyright.py b/misc/mkcopyright.py index f889f1f1..1255a917 100755 --- a/misc/mkcopyright.py +++ b/misc/mkcopyright.py @@ -94,7 +94,11 @@ def parse_years (yearstring): year_range = re.compile (r'([1-9][0-9][0-9][0-9]|[0-9][0-9])\b\s*[—-]\s*([1-9][0-9][0-9][0-9]|[0-9][0-9])\b') def open_as_utf8 (filename): - for line in open (filename, 'rb'): + try: + ofile = open (filename, 'rb') + except IsADirectoryError: + return # ignore dirs + for line in ofile: try: string = line.decode ('utf-8') except: string = None if string != None: yield string diff --git a/misc/package.json.in b/misc/package.json.in index 3dc25e85..42ecf182 100644 --- a/misc/package.json.in +++ b/misc/package.json.in @@ -27,6 +27,7 @@ "eslint-plugin-lit": "^1.8.3", "eslint-plugin-unused-imports": "^2.0.0", "eslint-plugin-vue": "^9.14.1", + "fork-awesome": "^1.2.0", "icon-gen": "^3.0.1", "jsdoc": "^4.0.2", "jsdoc-api": "^8.0.0", diff --git a/ui/Makefile.mk b/ui/Makefile.mk index 2c7b2a0a..e7a846bf 100644 --- a/ui/Makefile.mk +++ b/ui/Makefile.mk @@ -159,26 +159,22 @@ $>/ui/material-icons.css: ui/Makefile.mk | $>/ui/ $>/node_modules/.npm.done $Q mv $@.tmp $@ UI/GLOBALSCSS_IMPORTS += $>/ui/material-icons.css # AnklangIcons -$>/ui/AnklangIcons.css: ui/Makefile.mk | $>/ui/ - $(QECHO) FETCH AnklangIcons - @ $(eval S := ae0daeee324a1be1051f722e5393cdef445b5209119b97330ab92f9052b7206a https://github.com/tim-janik/anklang/releases/download/buildassets-v0/anklangicons-201123.1.tgz) - @ $(eval H := $(firstword $(S))) $(eval U := $(lastword $(S))) $(eval T := $(notdir $(U))) - $Q cd $>/ui/ $(call AND_DOWNLOAD_SHAURL, $H, $U) - $Q rm -fr $>/ui/anklangicons/ && tar -xf $>/ui/$T -C $>/ui/ && rm $>/ui/$T - $Q cd $>/ui/anklangicons/ && $(CP) AnklangIcons.woff2 .. && $(CP) AnklangIcons.css ../AnklangIcons.css.tmp - $Q sed -e 's|@font-face *{|@font-face { font-display: block; |' -i $>/ui/AnklangIcons.css.tmp +$>/ui/assets/AnklangIcons.css: ui/Makefile.mk | $>/ui/assets/ + $(QGEN) + $Q rm -fr $>/ui/anklangicons/ && tar xf external/blobs4anklang/icons/anklangicons-201123.1.tgz -C $>/ui/ + $Q cd $>/ui/anklangicons/ && $(CP) AnklangIcons.woff2 ../assets/ && $(CP) AnklangIcons.css ../assets/AnklangIcons.css.tmp + $Q sed -e 's|@font-face *{|@font-face { font-display: block; |' -i $>/ui/assets/AnklangIcons.css.tmp $Q rm -r $>/ui/anklangicons/ && mv $@.tmp $@ -UI/GLOBALSCSS_IMPORTS += $>/ui/AnklangIcons.css +UI/GLOBALSCSS_IMPORTS += $>/ui/assets/AnklangIcons.css # Fork-Awesome -$>/ui/forkawesome.css: ui/Makefile.mk | $>/ui/ - $(QECHO) FETCH Fork-Awesome - $Q cd $>/ui/ $(call foreachpair, AND_DOWNLOAD_SHAURL, \ - 844517a2bc5430242cb857e56b6dccf002f469c4c1b295ed8d0b7211fb452f50 https://raw.githubusercontent.com/ForkAwesome/Fork-Awesome/b0605a81632452818bf19c8fa97469da1206b52b/fonts/forkawesome-webfont.woff2 \ - 630b0e84fa43579f7e97a26fd47d4b70cb5516ca7e6e73393597d12ca249a8ee https://raw.githubusercontent.com/ForkAwesome/Fork-Awesome/b0605a81632452818bf19c8fa97469da1206b52b/css/fork-awesome.css) +$>/ui/assets/fork-awesome.css: ui/Makefile.mk | $>/node_modules/.npm.done $>/ui/assets/ + $(QGEN) + $Q $(CP) $>/node_modules/fork-awesome/fonts/forkawesome-webfont.woff2 $>/ui/assets/ $Q sed -e "/^ *src: *url/s,src: *url(.*);,src: url('forkawesome-webfont.woff2');," \ - -e 's|@font-face *{|@font-face { font-display: block; |' -i $>/ui/fork-awesome.css - $Q mv $>/ui/fork-awesome.css $@ -UI/GLOBALSCSS_IMPORTS += $>/ui/forkawesome.css + -e 's|@font-face *{|@font-face { font-display: block; |' \ + $>/node_modules/fork-awesome/css/fork-awesome.css > $@.tmp + $Q mv $@.tmp $@ +UI/GLOBALSCSS_IMPORTS += $>/ui/assets/fork-awesome.css # ui/cursors/ $>/ui/cursors/cursors.css: $(wildcard ui/cursors/*) Makefile.mk | $>/ui/cursors/ $(QECHO) COPY $< @@ -258,16 +254,9 @@ $(ui/cjs.targets): $>/ui/%.cjs: ui/%.js | $>/ui/b/ $>/ui/.build1-stamp: $(ui/cjs.targets) # == Inter Typeface == -$>/ui/InterVariable.woff2: ui/Makefile.mk | $>/ui/ - $(QECHO) FETCH Inter Typeface - $Q $(RM) -r $>/ui/tmp-inter/ && mkdir $>/ui/tmp-inter/ - $Q cd $>/ui/tmp-inter/ $(call foreachpair, AND_DOWNLOAD_SHAURL, \ - 41b1253ed9b5e9cb5093249c8dd71f0094cb4dfb4ef92ec69125fcb90566e4c7 https://github.com/rsms/inter/releases/download/v4.0-beta9g/Inter-4.0-beta9g.zip ) - $Q cd $>/ui/tmp-inter/ \ - && unzip -q Inter-4.0-beta9g.zip \ - && mv web/InterVariable.woff2 .. - $Q $(RM) -r $>/ui/tmp-inter/ - $Q touch $@ +$>/ui/InterVariable.woff2: external/blobs4anklang/fonts/InterVariable.woff2 | $>/ui/ + $(QGEN) + $Q $(CP) $< $@ $>/ui/.build1-stamp: $>/ui/InterVariable.woff2 # == $>/ui/browserified.js == diff --git a/ui/global.scss b/ui/global.scss index d529f533..8b21def6 100644 --- a/ui/global.scss +++ b/ui/global.scss @@ -2,8 +2,8 @@ // Provide icon collections, using fonts is most resource friendly @import url('material-icons.css'); -@import url('AnklangIcons.css'); -@import url('forkawesome.css'); +@import url('assets/AnklangIcons.css'); +@import url('assets/fork-awesome.css'); // Provide cursor CSS variables on :root @import url('cursors/cursors.css'); diff --git a/ui/index.html b/ui/index.html index 7e8f38a2..b76c81ca 100644 --- a/ui/index.html +++ b/ui/index.html @@ -28,12 +28,12 @@ - + - + - - + +