kopia lustrzana https://github.com/inkstitch/inkstitch
Build inx files in locale folders and build release for each locale
rodzic
d388dc6085
commit
944834593d
12
Makefile
12
Makefile
|
@ -7,7 +7,6 @@ ARCH:=$(shell uname -m)
|
|||
|
||||
dist: distclean locales inx
|
||||
bin/build-dist $(EXTENSIONS)
|
||||
cp inx/*.inx dist
|
||||
cp -a images/examples dist/inkstitch
|
||||
cp -a palettes dist/inkstitch
|
||||
cp -a symbols dist/inkstitch
|
||||
|
@ -15,11 +14,16 @@ dist: distclean locales inx
|
|||
cp -a icons dist/inkstitch/bin
|
||||
cp -a locales dist/inkstitch/bin
|
||||
cp -a print dist/inkstitch/bin
|
||||
for d in inx/*; do \
|
||||
lang=$${d%.*}; \
|
||||
lang=$${lang#*/}; \
|
||||
cp $$d/*.inx dist; \
|
||||
if [ "$$BUILD" = "windows" ]; then \
|
||||
cd dist; zip -r ../inkstitch-$(VERSION)-win32.zip *; \
|
||||
cd dist; zip -r ../inkstitch-$(VERSION)-win32-$$lang.zip *; cd ..; \
|
||||
else \
|
||||
cd dist; tar zcf ../inkstitch-$(VERSION)-$(OS)-$(ARCH).tar.gz *; \
|
||||
fi
|
||||
cd dist; tar zcf ../inkstitch-$(VERSION)-$(OS)-$(ARCH)-$$lang.tar.gz *; cd ..; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
distclean:
|
||||
rm -rf build dist inx locales *.spec *.tar.gz *.zip
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import errno
|
||||
import os
|
||||
import gettext
|
||||
from os.path import dirname
|
||||
|
@ -28,8 +29,16 @@ def build_environment():
|
|||
|
||||
|
||||
def write_inx_file(name, contents):
|
||||
inx_file_name = "inkstitch_%s_%s.inx" % (name, current_locale)
|
||||
with open(os.path.join(inx_path, inx_file_name), 'w') as inx_file:
|
||||
inx_locale_dir = os.path.join(inx_path, current_locale)
|
||||
|
||||
try:
|
||||
os.makedirs(inx_locale_dir)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
inx_file_name = "inkstitch_%s.inx" % name
|
||||
with open(os.path.join(inx_locale_dir, inx_file_name), 'w') as inx_file:
|
||||
print >> inx_file, contents.encode("utf-8")
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue