BUILD: code cleanup, VERSION fix

Performed code cleanup, made changes to version number Make gets from
Git to make it consistent across git versions
master
Nick Zatkovich 2017-07-31 14:23:33 -07:00 committed by Mike Swanson
parent e9015b43b3
commit 09f39d4e64
8 changed files with 21 additions and 20 deletions

View File

@ -1,6 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
VERSION=$(shell git describe --dirty 2>/dev/null || cat VERSION)
VERSION=$(shell git describe --abbrev=8 --dirty 2>/dev/null || cat VERSION)
WADS=wads
CPP=scripts/simplecpp
DEUTEX=deutex

View File

@ -56,7 +56,7 @@ all: text_strings help.png credit.png wikilrs.png wivctms.png titlepic
# Generate the menu and level strings
text_strings: config.py fontchars ../../lumps/dehacked.lmp
python textgen.py
python textgen
cp $(TEXTGEN_GRAPHIC_LUMPS) ../
# Background for the help screen is a color shifted version of INTERPIC:
@ -65,8 +65,8 @@ helpbg.png: ../interpic.png
# Generate transparent image containing text for the HELP screen:
help.png: text_strings helpbg.png
python smtextgen.py help.png 320x200 \
-background "helpbg.png" \
python smtextgen help.png 320x200 \
-background "helpbg.png" \
150,5 "file:helpttl.png" \
10,25 "Weapons" \
80,25 "file:../../sprites/shota0.png" \
@ -123,14 +123,14 @@ help.png: text_strings helpbg.png
credit.png: text_strings helpbg.png credit.txt
python smtextgen.py credit.png 320x200 \
-background "helpbg.png" \
120,5 "file:freettl.png" \
python smtextgen credit.png 320x200 \
-background "helpbg.png" \
120,5 "file:freettl.png" \
10,30 "include:credit.txt"
cp $@ ../
wikilrs_horiz.png:
python smtextgen.py $@ 49x7 \
python smtextgen $@ 49x7 \
0,0 killers
wikilrs.png: wikilrs_horiz.png
@ -138,7 +138,7 @@ wikilrs.png: wikilrs_horiz.png
cp $@ ../
wivctms.png:
python smtextgen.py $@ 54x7 \
python smtextgen $@ 54x7 \
0,0 victims
cp $@ ../
@ -157,12 +157,12 @@ fdmtitle.png: ../titlepic/freedm_titlepic.png
cp $@ ../
clean:
rm -f $(TEXTGEN_GRAPHICS) helpbg.png help.png \
graphics.stamp *.pyc credtext.png \
credtext.png credit.png dmwilv*.png wikilrs.png \
rm -f $(TEXTGEN_GRAPHICS) helpbg.png help.png \
graphics.stamp *.pyc credtext.png \
credtext.png credit.png dmwilv*.png wikilrs.png \
wivctms.png wikilrs_horiz.png ../credit.png ../help.png \
../wikilrs.png ../wivctms.png \
fd1title.png fd2title.png fdmtitle.png \
../wikilrs.png ../wivctms.png \
fd1title.png fd2title.png fdmtitle.png \
../fd1title.png ../fd2title.png ../fdmtitle.png
for graphic in $(TEXTGEN_GRAPHICS); do rm -f ../$$graphic; done
rm -fr __pycache__

10
graphics/text/create_caption.py Normal file → Executable file
View File

@ -1,18 +1,18 @@
#!/usr/bin/env python
# coding=utf-8
# encoding: utf-8
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import unicode_literals
from PIL import Image, ImageFont, ImageDraw
import sys
import os
#create_caption.py <background_image> <title?> <phase?> <outfile>
#try:
# font = ImageFont.truetype("DejaVuSansCondensed-Bold.ttf", 11)
#except IOError:
font = ImageFont.load_default()
txt1= u"© 2001-2017"
txt1= "© 2001-2017"
txt2= os.environ['VERSION']
background_image = Image.open(sys.argv[1])
background_image.load()

1
graphics/text/image_dimensions.py Normal file → Executable file
View File

@ -1,3 +1,4 @@
#!/usr/bin/env python
# SPDX-License-Identifier: BSD-3-Clause
import re

0
graphics/text/rotate.py Normal file → Executable file
View File

2
graphics/text/tint.py Normal file → Executable file
View File

@ -50,4 +50,4 @@ if __name__ == '__main__':
import os
import sys
main(sys.argv[1], sys.argv[2], sys.argv[3])
main(sys.argv[1], sys.argv[2], sys.argv[3])