handle missing libunrar. update macos makefile. remove version check window. bump version.

This commit is contained in:
Davide Romanini 2017-04-07 19:38:36 +02:00
parent 14713d8ad0
commit 70e28c7863
6 changed files with 30 additions and 17 deletions

View File

@ -30,11 +30,13 @@ import StringIO
from natsort import natsorted
from PyPDF2 import PdfFileReader
from unrar import rarfile
from unrar import unrarlib
from unrar import constants
#import UnRAR2
#from UnRAR2.rar_exceptions import *
try:
from unrar import rarfile
from unrar import unrarlib
from unrar import constants
except:
print "WARNING: cannot find libunrar, rar support is disabled"
pass
if platform.system() == "Windows":
import _subprocess

View File

@ -1,4 +1,21 @@
#!/usr/bin/env python
import os
import sys
if getattr(sys, 'frozen', False):
# we are running in a bundle
frozen = 'ever so'
bundle_dir = sys._MEIPASS
else:
# we are running in a normal Python environment
bundle_dir = os.path.dirname(os.path.abspath(__file__))
# setup libunrar
if not os.environ.get("UNRAR_LIB_PATH", None):
os.environ["UNRAR_LIB_PATH"] = bundle_dir + "/libunrar.so"
print os.environ.get("UNRAR_LIB_PATH", None)
print bundle_dir
from comictaggerlib.main import ctmain

View File

@ -1,3 +1,3 @@
# This file should contain only these comments, and the line below.
# Used by packaging makefiles and app
version = "1.1.15-beta"
version = "1.1.16-beta-rc"

View File

@ -344,14 +344,6 @@ For more help visit the wiki at: http://code.google.com/p/comictagger/
"ComicTagger {0}: Copyright (c) 2012-2014 Anthony Beville".format(ctversion.version))
print(
"Distributed under Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)")
new_version = VersionChecker().getLatestVersion("", False)
if new_version is not None and new_version != ctversion.version:
print(
"--------------------------------------------------------------------------")
print(
"New version available online: {0}".format(new_version))
print(
"--------------------------------------------------------------------------")
sys.exit(0)
if o in ("-t", "--type"):
if a.lower() == "cr":

View File

@ -279,7 +279,8 @@ class TaggerWindow(QtGui.QMainWindow):
self.settings.ask_about_usage_stats = False
if self.settings.check_for_new_version:
self.checkLatestVersionOnline()
#self.checkLatestVersionOnline()
pass
def sigint_handler(self, *args):
# defer the actual close in the app loop thread

View File

@ -1,7 +1,7 @@
#PYINSTALLER_CMD := VERSIONER_PYTHON_PREFER_32_BIT=yes arch -i386 python $(HOME)/pyinstaller-2.0/pyinstaller.py
#PYINSTALLER_CMD := python $(HOME)/pyinstaller-2.0/pyinstaller.py
PYINSTALLER_CMD := pyinstaller
TAGGER_BASE ?= $(HOME)/Dropbox/tagger/comictagger
TAGGER_BASE ?= ../
TAGGER_SRC := $(TAGGER_BASE)/comictaggerlib
APP_NAME := ComicTagger
@ -11,7 +11,7 @@ MAC_BASE := $(TAGGER_BASE)/mac
DIST_DIR := $(MAC_BASE)/dist
STAGING := $(MAC_BASE)/$(APP_NAME)
APP_BUNDLE := $(DIST_DIR)/$(APP_NAME).app
VOLUME_NAME := $(APP_NAME)-$(VERSION_STR)
VOLUME_NAME := "$(APP_NAME)-$(VERSION_STR)"
DMG_FILE := $(VOLUME_NAME).dmg
all: clean dist diskimage
@ -21,6 +21,7 @@ dist:
$(PYINSTALLER_CMD) $(TAGGER_BASE)/comictagger.py -w -n $(APP_NAME) -s
cp -a $(TAGGER_SRC)/ui $(APP_BUNDLE)/Contents/MacOS
cp -a $(TAGGER_SRC)/graphics $(APP_BUNDLE)/Contents/MacOS
cp $(MAC_BASE)/libunrar.so $(APP_BUNDLE)/Contents/MacOS
cp $(MAC_BASE)/app.icns $(APP_BUNDLE)/Contents/Resources/icon-windowed.icns
# fix the version string in the Info.plist
sed -i -e 's/0\.0\.0/$(VERSION_STR)/' $(MAC_BASE)/dist/ComicTagger.app/Contents/Info.plist