Fix packaging

This commit is contained in:
Star Brilliant 2013-10-01 09:07:54 +08:00
parent f395566104
commit beffb79613
2 changed files with 9 additions and 6 deletions

View File

@ -6,6 +6,7 @@ PREFIX=/usr/local
CP=cp
INSTALL=install
LN=ln
MKDIR=mkdir -p
PYTHON=python3
RM=rm -f -v
@ -13,14 +14,15 @@ RM=rm -f -v
all:
install:
$(INSTALL) -Dm0755 danmaku2ass.py "$(DESTDIR)$(PREFIX)/bin/danmaku2ass"
$(MKDIR) "$(DESTDIR)$(PREFIX)/share"
$(CP) -R locale "$(DESTDIR)$(PREFIX)/share/"
$(MKDIR) "$(DESTDIR)$(PREFIX)/share/danmaku2ass"
$(INSTALL) -Dm0755 danmaku2ass.py "$(DESTDIR)$(PREFIX)/share/danmaku2ass"
$(CP) -R locale "$(DESTDIR)$(PREFIX)/share/danmaku2ass/"
$(MKDIR) "$(DESTDIR)$(PREFIX)/bin"
$(LN) -s "$(PREFIX)/share/danmaku2ass/danmaku2ass.py" "$(DESTDIR)$(PREFIX)/bin/danmaku2ass"
clean:
$(RM) -R __pycache__
uninstall:
$(RM) "$(DESTDIR)$(PREFIX)/bin/danmaku2ass"
$(RM) "$(DESTDIR)$(PREFIX)/share/locale/"*"/LC_MESSAGES/danmaku2ass."*
$(RM) "$(DESTDIR)$(PREFIX)/bin/danmaku2ass" "$(DESTDIR)$(PREFIX)/share/danmaku2ass"

View File

@ -6,11 +6,12 @@ import gettext
import json
import logging
import math
import os
import sys
import xml.dom.minidom
gettext.install('danmaku2ass', 'locale')
gettext.install('danmaku2ass', os.path.join(os.path.dirname(os.path.abspath(__file__)), 'locale'))
def ProcessComments(comments, f, width, height, bottomReserved, fontface, fontsize, alpha, lifetime, reduced):