2023-05-22 20:33:19 +00:00
# used for distlocal
OS = $( shell uname)
2021-03-04 17:40:53 +00:00
dist : version locales inx
2023-05-22 20:33:19 +00:00
python bin/generate-flaskserverport-file
2020-08-18 18:52:47 +00:00
bash bin/build-python
bash bin/build-electron
bash bin/build-distribution-archives
2018-01-14 01:18:50 +00:00
distclean :
2023-05-22 20:33:19 +00:00
rm -rf build dist inx locales artifacts win mac *.spec *.tar.gz *.zip electron/node_modules electron/dist electron/build/mac electron/build/mac-arm64 electron/build/win-ia32-unpacked electron/build/linux-unpacked electron/build/linux-arm64-unpacked electron/src/lib/flaskserverport.json
distlocal :
@case ${ OS } in "Darwin" ) export BUILD = osx ; ; "Linux" ) export BUILD = linux ; ; *) export BUILD = windows ; ; esac ; export VERSION = local-build; make distclean && make dist;
manual :
make inx && cd electron && yarn install && cd ..
2018-02-05 03:38:24 +00:00
2018-08-20 19:07:12 +00:00
.PHONY : inx
2021-03-04 17:40:53 +00:00
inx : version locales
2024-02-07 20:00:07 +00:00
python bin/generate-inx-files;
2018-08-20 19:07:12 +00:00
.PHONY : messages .po
2021-09-27 09:33:07 +00:00
messages.po : inx
2018-02-05 03:38:24 +00:00
rm -f messages.po
2021-09-26 09:42:17 +00:00
xgettext inx/*.inx --its= its/inx.its -o messages-inx.po
2021-12-09 14:05:21 +00:00
# There seems to be no proper way to set the charset to utf-8
2021-09-27 09:33:07 +00:00
sed -i 's/charset=CHARSET/charset=UTF-8/g' messages-inx.po
2018-08-20 19:17:55 +00:00
bin/pyembroidery-gettext > pyembroidery-format-descriptions.py
2019-04-03 03:07:38 +00:00
bin/inkstitch-fonts-gettext > inkstitch-fonts-metadata.py
2023-02-19 03:24:58 +00:00
bin/inkstitch-tiles-gettext > inkstitch-tiles-metadata.py
2021-10-13 20:44:13 +00:00
# After the inx files are finished building, we don't need the src/ folder anymore.
# We don't want babel to grab possible translation strings from that folder, so let's remove it
rm -rf src/
2020-04-28 16:34:05 +00:00
pybabel extract -o messages-babel.po -F babel.conf --add-location= full --add-comments= l10n,L10n,L10N --sort-by-file --strip-comments -k N_ -k '$$gettext' .
2023-02-19 03:24:58 +00:00
rm pyembroidery-format-descriptions.py inkstitch-fonts-metadata.py inkstitch-tiles-metadata.py
2020-05-21 00:40:56 +00:00
cd electron && yarn --link-duplicates --pure-lockfile
2020-04-28 16:34:05 +00:00
find electron/src -name '*.html' -o -name '*.js' -o -name '*.vue' | xargs electron/node_modules/.bin/gettext-extract --quiet --attribute v-translate --output messages-vue.po
2021-09-26 09:42:17 +00:00
msgcat -o messages.po messages-babel.po messages-vue.po messages-inx.po
2020-04-28 16:34:05 +00:00
2021-03-05 16:19:25 +00:00
electron/src/renderer/assets/translations.json : $( wildcard translations /messages_ *.po )
find translations -name '*.po' -a ! -empty | \
2020-04-28 16:34:05 +00:00
xargs electron/node_modules/.bin/gettext-compile --output electron/src/renderer/assets/translations.json
%.po : %.mo
msgunfmt -o $@ $<
2018-02-05 03:38:24 +00:00
2018-09-15 17:01:41 +00:00
.PHONY : clean
clean :
rm -f messages.po pyembroidery-format-descriptions.py
2018-02-05 03:38:24 +00:00
.PHONY : locales
locales :
2021-09-26 09:42:17 +00:00
bash bin/generate-translation-files
2018-08-22 18:54:14 +00:00
2021-03-04 17:40:53 +00:00
.PHONY : version
version :
bash bin/generate-version-file
2018-08-22 18:54:14 +00:00
.PHONY : style
style :
2022-04-29 02:37:34 +00:00
bash -x bin/style-check