feat: add appveyor configuration

This commit is contained in:
davide-romanini 2018-01-17 13:35:10 -08:00 committed by GitHub
parent a7288a94cc
commit cf43513d52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 42 additions and 15 deletions

View File

@ -1,7 +1,19 @@
TAGGER_BASE ?= .
TAGGER_SRC := $(TAGGER_BASE)/comictaggerlib
VERSION_STR := $(shell grep version $(TAGGER_SRC)/ctversion.py| cut -d= -f2 | sed 's/\"//g')
all: clean
VERSION_STR := $(shell python -c 'import comictaggerlib.ctversion; print comictaggerlib.ctversion.version')
ifeq ($(OS),Windows_NT)
APP_NAME=comictagger.exe
FINAL_NAME=ComicTagger-$(VERSION_STR).exe
else ifeq ($(shell uname -s),Darwin)
APP_NAME=ComicTagger.app
FINAL_NAME=ComicTagger-$(VERSION_STR).app
else
APP_NAME=comictagger
FINAL_NAME=ComicTagger-$(VERSION_STR)
endif
.PHONY: all clean pydist upload unrar dist
all: clean dist
clean:
rm -rf *~ *.pyc *.pyo
@ -24,9 +36,15 @@ upload:
python setup.py register
python setup.py sdist --formats=zip upload
.PHONY: unrar dist
unrar:
$(MAKE) -C unrar lib
ifeq ($(OS),Windows_NT)
# statically compile mingw dependencies
# https://stackoverflow.com/questions/18138635/mingw-exe-requires-a-few-gcc-dlls-regardless-of-the-code
$(MAKE) -C unrar LDFLAGS='-Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive -pthread -static-libgcc -static-libstdc++' lib
else
$(MAKE) -C unrar lib
endif
dist: unrar
pyinstaller comictagger.spec
pyinstaller -y comictagger.spec
mv dist/$(APP_NAME) dist/$(FINAL_NAME)

6
appveyor.yml Normal file
View File

@ -0,0 +1,6 @@
version: 1.0.{build}
build_script:
- cmd: powershell -exec bypass -File windows\fullbuild.ps1
artifacts:
- path: dist\*.exe
name: ComicTagger

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.16-beta-rc2"
version = "1.1.20-SNAPSHOT"

View File

@ -8,13 +8,7 @@ LIBFLAGS=-fPIC
DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
STRIP=strip
AR=ar
ifeq ($(OS),Windows_NT)
# statically compile mingw dependencies
# https://stackoverflow.com/questions/18138635/mingw-exe-requires-a-few-gcc-dlls-regardless-of-the-code
LDFLAGS=-Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive -pthread -static-libgcc -static-libstdc++
else
LDFLAGS=-pthread
endif
LDFLAGS=-pthread
DESTDIR=/usr
# Linux using LCC

9
windows/fullbuild.ps1 Normal file
View File

@ -0,0 +1,9 @@
# Script to be run inside appveyor for a full build
$env:PATH="C:\tools\mingw64\bin;C:\Miniconda-x64;C:\Miniconda-x64\Scripts;$env:path"
choco install -y mingw
C:\Miniconda-x64\Scripts\conda create -y --name comictagger python=2
C:\Miniconda-x64\Scripts\activate comictagger
C:\Miniconda-x64\Scripts\conda install -y pyqt=4
C:\Miniconda-x64\Scripts\pip install -r .\requirements.txt
mingw32-make dist
objdump -af unrar/libunrar.so