Merge pull request #552 from frankmorgner/innosetup

Improve the state of travis ci
This commit is contained in:
Frank Morgner 2015-09-17 13:23:56 +02:00
commit 547494f012
9 changed files with 85 additions and 151 deletions

View File

@ -1,10 +1,31 @@
language: C
language: c
sudo: false
addons:
apt_packages:
- binutils-mingw-w64-i686
- binutils-mingw-w64-x86-64
- docbook-xsl
- gcc-mingw-w64-i686
- gcc-mingw-w64-x86-64
- libpcsclite-dev
- mingw-w64
- wine
- xsltproc
coverity_scan:
project:
name: "OpenSC/OpenSC"
description: "Build submitted via Travis CI"
notification_email: viktor.tarasov@gmail.com
build_command: "make -j 4"
branch_pattern: coverity_scan
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "UkHn7wy4im8V1nebCWbAetnDSOLRUbOlF6++ovk/7Bnso1/lnhXHelyzgRxfD/oI68wm9nnRV+RQEZ9+72Ug1CyvHxyyxxkwal/tPeHH4B/L+aGdPi0id+5OZSKIm77VP3m5s102sJMJgH7DFd03+nUd0K26p0tk8ad4j1geV4c="
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "UkHn7wy4im8V1nebCWbAetnDSOLRUbOlF6++ovk/7Bnso1/lnhXHelyzgRxfD/oI68wm9nnRV+RQEZ9+72Ug1CyvHxyyxxkwal/tPeHH4B/L+aGdPi0id+5OZSKIm77VP3m5s102sJMJgH7DFd03+nUd0K26p0tk8ad4j1geV4c="
matrix:
include:
@ -23,41 +44,22 @@ matrix:
- os: linux
env: HOST=i686-w64-mingw32
before_install:
- if [ $TRAVIS_OS_NAME == linux ]; then
sudo apt-get update || true;
fi
install:
- if [ $TRAVIS_OS_NAME == linux ]; then
if [ -z "$HOST" ]; then
sudo apt-get install libpcsclite-dev xsltproc docbook-xsl;
elif [ "${HOST}" == i686-w64-mingw32 ]; then
sudo apt-get install mingw-w64 binutils-mingw-w64-i686 gcc-mingw-w64-i686;
elif [ "${HOST}" == x86_64-w64-mingw32 ]; then
sudo apt-get install mingw-w64 binutils-mingw-w64-x86-64 gcc-mingw-w64-x86-64;
fi
fi
before_script:
- ./bootstrap
- if [ -z "$HOST" ]; then
./configure $ENABLE_DOC --enable-dnie-ui;
else
if [ ! -f "$(winepath 'C:/Program Files (x86)/Inno Setup 5/ISCC.exe')" ]; then
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16;
export DISPLAY=:99.0;
wget http://files.jrsoftware.org/is/5/isetup-5.5.6.exe;
wine isetup-5.5.6.exe /SILENT /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART;
fi;
unset CC;
unset CXX;
./configure --host=$HOST --disable-openssl;
./configure --host=$HOST --disable-openssl --disable-readline --disable-zlib --prefix=${TRAVIS_BUILD_DIR}/win32/opensc || cat config.log;
fi
addons:
coverity_scan:
project:
name: "OpenSC/OpenSC"
description: "Build submitted via Travis CI"
notification_email: viktor.tarasov@gmail.com
build_command: "make -j 4"
branch_pattern: coverity_scan
script:
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then
if [ $TRAVIS_OS_NAME == osx ]; then
@ -66,7 +68,13 @@ script:
make;
fi;
fi
- if [ -z "$HOST" -a "${COVERITY_SCAN_BRANCH}" != 1 -a "$TRAVIS_OS_NAME" != "osx" ]; then
- if [ -z "$HOST" -a "${COVERITY_SCAN_BRANCH}" != 1 ]; then
make check;
make dist;
fi
- if [ ! -z "$HOST" -a "${COVERITY_SCAN_BRANCH}" != 1 ]; then
make install;
wine "C:/Program Files (x86)/Inno Setup 5/ISCC.exe" win32/OpenSC.iss;
fi
cache: ccache

View File

@ -51,16 +51,6 @@ rm -f target/Library/OpenSC/lib/*.la
# generate .bundle (required by Adobe Acrobat)
./MacOSX/libtool-bundle target/Library/OpenSC/lib/opensc-pkcs11.so target/Library/OpenSC/lib
# Build engine_pkcs11 + libp11
test -d libp11 || git clone http://github.com/OpenSC/libp11.git
(cd libp11
test -x configure || ./bootstrap
./configure --enable-static --disable-shared --disable-dependency-tracking --prefix=${BUILDPATH}/build && make && make install)
test -d engine_pkcs11 || git clone http://github.com/OpenSC/engine_pkcs11.git
(cd engine_pkcs11
test -x configure || ./bootstrap
PKG_CONFIG_PATH=${BUILDPATH}/build/lib/pkgconfig:${PKG_CONFIG_PATH} ./configure --disable-dependency-tracking --prefix=/Library/OpenSC && make install DESTDIR=${BUILDPATH}/target)
# Check out OpenSC.tokend, if not already fetched.
if ! test -e OpenSC.tokend; then
git clone http://github.com/OpenSC/OpenSC.tokend.git

View File

@ -4,7 +4,7 @@ AC_PREREQ(2.60)
define([PRODUCT_NAME], [OpenSC])
define([PRODUCT_TARNAME], [opensc])
define([PRODUCT_BUGREPORT], [opensc-devel@lists.sourceforge.net])
define([PRODUCT_BUGREPORT], [https://github.com/OpenSC/OpenSC/issues])
define([PACKAGE_VERSION_MAJOR], [0])
define([PACKAGE_VERSION_MINOR], [15])
define([PACKAGE_VERSION_FIX], [0])
@ -13,8 +13,11 @@ define([PACKAGE_VERSION_REVISION], [0])
define([VS_FF_LEGAL_COPYRIGHT], [OpenSC Project])
define([VS_FF_LEGAL_COMPANY_NAME], [OpenSC Project])
define([VS_FF_LEGAL_COMPANY_URL], [https://github.com/OpenSC])
define([VS_FF_COMMENTS], [Provided under the terms of the GNU Lesser General Public License (LGPLv2.1+).])
define([VS_FF_PRODUCT_NAME], [OpenSC smartcard framework])
define([VS_FF_PRODUCT_UPDATES], [https://github.com/OpenSC/OpenSC/releases])
define([VS_FF_PRODUCT_URL], [https://github.com/OpenSC/OpenSC])
m4_include(version.m4)
m4_sinclude(version.m4.ci)
@ -32,8 +35,11 @@ OPENSC_VERSION_REVISION="PACKAGE_VERSION_REVISION"
OPENSC_VS_FF_LEGAL_COPYRIGHT="VS_FF_LEGAL_COPYRIGHT"
OPENSC_VS_FF_COMPANY_NAME="VS_FF_LEGAL_COMPANY_NAME"
OPENSC_VS_FF_COMPANY_URL="VS_FF_LEGAL_COMPANY_URL"
OPENSC_VS_FF_COMMENTS="VS_FF_COMMENTS"
OPENSC_VS_FF_PRODUCT_NAME="VS_FF_PRODUCT_NAME"
OPENSC_VS_FF_PRODUCT_UPDATES="VS_FF_PRODUCT_UPDATES"
OPENSC_VS_FF_PRODUCT_URL="VS_FF_PRODUCT_URL"
# LT Version numbers, remember to change them just *before* a release.
# (Code changed: REVISION++)
@ -654,6 +660,9 @@ AC_DEFINE_UNQUOTED([OPENSC_VS_FF_LEGAL_COPYRIGHT], [${OPENSC_VS_FF_LEGAL_COPYRIG
AC_DEFINE_UNQUOTED([OPENSC_VS_FF_COMPANY_NAME], [${OPENSC_VS_FF_COMPANY_NAME}], [OpenSC version-info CompanyName value])
AC_DEFINE_UNQUOTED([OPENSC_VS_FF_COMMENTS], [${OPENSC_VS_FF_COMMENTS}], [OpenSC version-info Comments])
AC_DEFINE_UNQUOTED([OPENSC_VS_FF_PRODUCT_NAME], [${OPENSC_VS_FF_PRODUCT_NAME}], [OpenSC version-info ProductName])
AC_DEFINE_UNQUOTED([OPENSC_VS_FF_PRODUCT_UPDATES], [${OPENSC_VS_FF_PRODUCT_UPDATES}], [OpenSC version-info UpdateURL])
AC_DEFINE_UNQUOTED([OPENSC_VS_FF_PRODUCT_URL], [${OPENSC_VS_FF_PRODUCT_URL}], [OpenSC version-info ProductURL])
AC_DEFINE_UNQUOTED([OPENSC_VS_FF_COMPANY_URL], [${OPENSC_VS_FF_COMPANY_URL}], [OpenSC version-info UpdateURL])
pkcs11dir="\$(libdir)/pkcs11"
@ -667,6 +676,9 @@ AC_SUBST([OPENSC_VS_FF_LEGAL_COPYRIGHT])
AC_SUBST([OPENSC_VS_FF_COMPANY_NAME])
AC_SUBST([OPENSC_VS_FF_COMMENTS])
AC_SUBST([OPENSC_VS_FF_PRODUCT_NAME])
AC_SUBST([OPENSC_VS_FF_PRODUCT_UPDATES])
AC_SUBST([OPENSC_VS_FF_PRODUCT_URL])
AC_SUBST([OPENSC_VS_FF_COMPANY_URL])
AC_SUBST([OPENSC_LT_CURRENT])
AC_SUBST([OPENSC_LT_REVISION])
AC_SUBST([OPENSC_LT_AGE])
@ -757,13 +769,16 @@ OpenSC has been configured with the following options:
Version: ${PACKAGE_VERSION}
Version fix: ${OPENSC_VERSION_FIX}
Version revision: ${OPENSC_VERSION_REVISION}
Version fix: ${OPENSC_VERSION_FIX}
Version revision: ${OPENSC_VERSION_REVISION}
Copyright: ${OPENSC_VS_FF_LEGAL_COPYRIGHT}
Company: ${OPENSC_VS_FF_COMPANY_NAME}
Company URL: ${OPENSC_VS_FF_COMPANY_URL}
Comments: ${OPENSC_VS_FF_COMMENTS}
Product name: ${OPENSC_VS_FF_PRODUCT_NAME}
Product updates: ${OPENSC_VS_FF_PRODUCT_UPDATES}
Product URL: ${OPENSC_VS_FF_PRODUCT_URL}
User binaries: $(eval eval eval echo "${bindir}")
Configuration files: $(eval eval eval echo "${sysconfdir}")

View File

@ -3,14 +3,10 @@ include $(top_srcdir)/win32/ltrc.inc
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in $(srcdir)/versioninfo.rc $(srcdir)/winconfig.h \
$(srcdir)/OpenSC.iss $(srcdir)/OpenSC.wxs $(srcdir)/OpenSC.ico $(srcdir)/license.rtf \
$(srcdir)/dlgbmp.bmp $(srcdir)/bannrbmp.bmp $(srcdir)/versioninfo-customactions.rc
EXTRA_DIST = ltrc.inc Makefile.mak Make.rules.mak opensc-install.bat \
EXTRA_DIST = ltrc.inc Makefile.mak Make.rules.mak \
versioninfo.rc.in winconfig.h.in OpenSC.iss.in OpenSC.wxs.in versioninfo-customactions.rc.in
dist_noinst_HEADERS = versioninfo.rc winconfig.h OpenSC.iss OpenSC.wxs license.rtf OpenSC.ico dlgbmp.bmp bannrbmp.bmp
if WIN32
sbin_SCRIPTS = opensc-install.bat
endif
if ENABLE_MINIDRIVER
lib_LTLIBRARIES = customactions@LIBRARY_BITNESS@.la

View File

@ -1,10 +1,10 @@
[Setup]
AppName=OpenSC
AppVerName=OpenSC @PACKAGE_VERSION@
AppPublisher=OpenSC Project
AppPublisherURL=http://www.opensc-project.org/
AppSupportURL=http://www.opensc-project.org/opensc/
AppUpdatesURL=http://www.opensc-project.org/opensc/
AppName=@OPENSC_VS_FF_PRODUCT_NAME@
AppVerName=@OPENSC_VS_FF_PRODUCT_NAME@ @PACKAGE_VERSION@
AppPublisher=@OPENSC_VS_FF_LEGAL_COMPANY_NAME@
AppPublisherURL=@OPENSC_VS_FF_COMPANY_URL@
AppSupportURL=@PRODUCT_BUGREPORT@
AppUpdatesURL=@OPENSC_VS_FF_PRODUCT_UPDATES@
DefaultDirName={pf}\OpenSC Project\OpenSC
OutputBaseFilename=OpenSC-@PACKAGE_VERSION@
Compression=lzma/normal
@ -22,17 +22,17 @@ AppendDefaultDirName=false
AppVersion=@PACKAGE_VERSION@
VersionInfoVersion=@OPENSC_VERSION_MAJOR@.@OPENSC_VERSION_MINOR@.@OPENSC_VERSION_FIX@
VersionInfoDescription=OpenSC tools and libraries
VersionInfoTextVersion=v@PACKAGE_VERSION@
VersionInfoTextVersion=@PACKAGE_VERSION@
DisableReadyPage=true
InternalCompressLevel=max
VersionInfoCopyright=2010 OpenSC Project
VersionInfoCopyright=@OPENSC_VS_FF_LEGAL_COPYRIGHT@
DisableStartupPrompt=true
AlwaysShowComponentsList=false
ShowComponentSizes=false
FlatComponentsList=false
WizardImageBackColor=clWhite
DisableFinishedPage=false
InfoBeforeFile=README.rtf
InfoBeforeFile=license.rtf
VersionInfoProductName=OpenSC
VersionInfoProductVersion=@OPENSC_VERSION_MAJOR@.@OPENSC_VERSION_MINOR@.@OPENSC_VERSION_FIX@
AllowRootDirectory=true
@ -42,11 +42,11 @@ DefaultGroupName=OpenSC
[Tasks]
[Files]
Source: opensc\*.profile; DestDir: {app}\profiles
Source: opensc\*.dll; DestDir: {sys}; Flags: overwritereadonly replacesameversion ignoreversion uninsnosharedfileprompt restartreplace
Source: opensc\*.exe; DestDir: {app}; Flags: overwritereadonly replacesameversion ignoreversion
Source: engine_pkcs11\*.dll; DestDir: {sys}; Components: OpenSSL_engine; Flags: overwritereadonly replacesameversion ignoreversion
Source: opensc.conf; DestDir: {app};
Source: opensc\share\opensc\*.profile; DestDir: {app}\profiles
Source: opensc\bin\*.dll; DestDir: {sys}; Flags: overwritereadonly replacesameversion ignoreversion uninsnosharedfileprompt restartreplace
Source: opensc\bin\*.exe; DestDir: {app}; Flags: overwritereadonly replacesameversion ignoreversion
;Source: engine_pkcs11\*.dll; DestDir: {sys}; Components: OpenSSL_engine; Flags: overwritereadonly replacesameversion ignoreversion
Source: opensc\etc\opensc.conf; DestDir: {app};
;Source: www.opensc-project.org.url; DestDir: {app}
[Icons]
;Name: {group}\OpenSC Project website; Filename: {app}\www.opensc-project.org.url; Comment: Go to OpenSC Project website; Components:
@ -54,6 +54,6 @@ Source: opensc.conf; DestDir: {app};
[Registry]
Root: HKLM; Subkey: Software\OpenSC Project\OpenSC; ValueType: string; ValueName: ConfigFile; ValueData: {app}\opensc.conf; Flags: uninsdeletekey; Components:
Root: HKLM; Subkey: Software\OpenSC Project\OpenSC; ValueType: string; ValueName: ProfileDir; ValueData: {app}\profiles; Flags: uninsdeletekey; Components:
[Components]
Name: OpenSC; Description: OpenSC core library; Flags: fixed; Types: custom compact full
Name: OpenSSL_engine; Description: OpenSSL engine for using PKCS11 modules; Types: custom full
;[Components]
;Name: OpenSC; Description: OpenSC core library; Flags: fixed; Types: custom compact full
;Name: OpenSSL_engine; Description: OpenSSL engine for using PKCS11 modules; Types: custom full

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="windows-1252"?>
<?if $(var.Platform) = x64 ?>
<?define ProductName = "OpenSC (64bit)" ?>
<?define ProductName = "@OPENSC_VS_FF_PRODUCT_NAME@ (64bit)" ?>
<?define Win64YesNo="yes" ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define PlatformSystemFolder = "System64Folder" ?>
<?define PlatformUpgradeCode = "{9A449570-69A2-11E0-9CC6-955B4824019B}" ?>
<?else ?>
<?define ProductName = "OpenSC" ?>
<?define ProductName = "@OPENSC_VS_FF_PRODUCT_NAME@" ?>
<?define Win64YesNo="no" ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?define PlatformSystemFolder = "SystemFolder" ?>
@ -20,11 +20,11 @@
Language="1033"
Codepage="1252"
Version="@OPENSC_VERSION_MAJOR@.@OPENSC_VERSION_MINOR@.@OPENSC_VERSION_FIX@.0"
Manufacturer="OpenSC Project">
Manufacturer="@OPENSC_VS_FF_COMPANY_NAME@">
<Package Platform="$(var.Platform)"
Description="OpenSC Installer"
Comments="OpenSC Project home page https://github.com/OpenSC/OpenSC/wiki"
Manufacturer="OpenSC Project"
Description="@VS_FF_PRODUCT_NAME@ Installer"
Comments="@OPENSC_VS_FF_COMMENTS@"
Manufacturer="@OPENSC_VS_FF_COMPANY_NAME@"
InstallerVersion="300"
Languages="1033"
Compressed="yes"
@ -36,10 +36,10 @@
<WixVariable Id="WixUIBannerBmp" Value="bannrbmp.bmp"/>
<WixVariable Id="WixUIDialogBmp" Value="dlgbmp.bmp"/>
<!-- Links in info -->
<Property Id="ARPHELPLINK" Value="http://www.opensc-project.org/opensc/wiki/ReportingBugs"/>
<Property Id="ARPURLINFOABOUT" Value="http://www.opensc-project.org/"/>
<Property Id="ARPURLUPDATEINFO" Value="http://www.opensc-project.org/opensc/wiki/WindowsInstaller"/>
<Property Id="ARPCONTACT" Value="OpenSC"/>
<Property Id="ARPHELPLINK" Value="@PRODUCT_BUGREPORT@"/>
<Property Id="ARPURLINFOABOUT" Value="@OPENSC_VS_FF_PRODUCT_URL@"/>
<Property Id="ARPURLUPDATEINFO" Value="@OPENSC_VS_FF_PRODUCT_UPDATES@"/>
<Property Id="ARPCONTACT" Value="@OPENSC_VS_FF_COMPANY_URL@"/>
<Icon Id="OpenSC.ico" SourceFile="OpenSC.ico" />
<Property Id="ARPPRODUCTICON" Value="OpenSC.ico" />

View File

@ -1 +0,0 @@
README for OpenSC win32 installer.

View File

@ -1,30 +0,0 @@
#!/bin/bash
set -ex
build_dir=${1:-win32/build}
if ! [ -d ${build_dir} ]; then
svn co http://www.opensc-project.org/svn/build/trunk ${build_dir}
mkdir -p ${build_dir}/sources
fi
# build a fresh targzip
rm -f opensc-*.tar.gz
make dist
rm -f ${build_dir}/sources/opensc*.tar.gz
cp opensc-0.12.*.tar.gz ${build_dir}/sources/
# use mingw to generate binaries
(cd ${build_dir}; CHOST=i586-mingw32msvc CBUILD=i686-pc-linux-gnu ./build)
# Copy files
cp ${build_dir}/image/opensc/etc/opensc.conf win32
mkdir -p win32/opensc
cp ${build_dir}/image/opensc/bin/*.dll ${build_dir}/image/opensc/bin/*.exe win32/opensc
cp ${build_dir}/image/opensc/share/opensc/*.profile win32/opensc
mkdir -p win32/engine_pkcs11
cp ${build_dir}/image/engine_pkcs11/bin/libp11-1.dll ${build_dir}/image/engine_pkcs11/lib/engines/engine_pkcs11.dll win32/engine_pkcs11
# Build installer
wine ~/.wine/drive_c/Program\ Files/Inno\ Setup\ 5/ISCC.exe win32/OpenSC.iss

View File

@ -1,44 +0,0 @@
@echo off
rem This script installs OpenSC
rem Parameters:
rem user - Install for this user only.
setlocal
set MODE=%1
set KEY=HKEY_LOCAL_MACHINE
if "%MODE%" == "user" set KEY=HKEY_CURRENT_USER
cd %0\..\..
if not exist bin\opensc-tool.exe goto error
for /f %%f in (".") do set OPENSC_HOME=%%~ff
set OPENSC_HOME_ESCAPED=%OPENSC_HOME:\=\\%
set REG_FILE=%TEMP%\opensc-install.reg
echo Windows Registry Editor Version 5.00 > %REG_FILE%
echo [%KEY%\SOFTWARE\OpenSC Project\OpenSC] >> %REG_FILE%
echo "ConfigFile"="%OPENSC_HOME_ESCAPED%\\etc\\opensc.conf" >> %REG_FILE%
echo [%KEY%\SOFTWARE\PKCS11-Spy] >> %REG_FILE%
echo "Module"="%OPENSC_HOME_ESCAPED%\\bin\\opensc-pkcs11.dll" >> %REG_FILE%
regedit /s %REG_FILE%
del /q %REG_FILE%
"%OPENSC_HOME%\bin\opensc-tool" -S "app:default:profile_dir:%OPENSC_HOME%\share\opensc"
echo You may also want to add "%OPENSC_HOME%\bin" to your PATH, for use by other applications.
goto end
:error
echo Invalid installation
goto end
:end
endlocal