Skip to content

Commit

Permalink
Version 7.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Feb 28, 2020
2 parents 078d7ce + 623c8ca commit c3ac4da
Show file tree
Hide file tree
Showing 333 changed files with 22,129 additions and 11,828 deletions.
36 changes: 19 additions & 17 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,56 @@
version: '{build}'
image: Visual Studio 2017

environment:
APPVEYOR: 1
DEPLOY: 0
BREAKPAD: 0
MYSQL_VERSION: mysql-5.7.14-win32
APNG_PLUGIN: apng-1.1.05.10.1
APNG_PLUGIN: apng-1.1.2-65.12.6
QSCINTILLA_VERSION: QScintilla_gpl-2.10.8

matrix:
# MSVC x86
- PLATFORM: amd64_x86
QTDIR: C:\Qt\5.10.1\msvc2015
OPENSSLDIR: C:\OpenSSL-Win32
QTDIR: C:\Qt\5.12.6\msvc2017
OPENSSLDIR: C:\OpenSSL-v111-Win32
MAKE: nmake
MAKEFILES: NMake Makefiles
DEPLOY: 1

# MSVC x64
- PLATFORM: amd64
QTDIR: C:\Qt\5.10.1\msvc2015_64
OPENSSLDIR: C:\OpenSSL-Win64
QTDIR: C:\Qt\5.12.6\msvc2017_64
OPENSSLDIR: C:\OpenSSL-v111-Win64
MAKE: nmake
MAKEFILES: NMake Makefiles
DEPLOY: 1

# MinGW
- PLATFORM: mingw
QTDIR: C:\Qt\5.10.1\mingw53_32
OPENSSLDIR: C:\OpenSSL-Win32
QTDIR: C:\Qt\5.12.6\mingw73_32
OPENSSLDIR: C:\OpenSSL-v111-Win32
MAKE: mingw32-make
MAKEFILES: MinGW Makefiles

cache:
- release\sites\node_modules -> release\sites\package.json
- mysql-5.7.14-win32 -> .appveyor.yml
- apng-1.1.05.10.1 -> .appveyor.yml
- apng-1.1.2-65.12.6 -> .appveyor.yml
- QScintilla_gpl-2.10.8 -> .appveyor.yml
- depot_tools -> .appveyor.yml
- breakpad -> .appveyor.yml

init:
- git config --global core.autocrlf input
- if %PLATFORM%==mingw set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- if %PLATFORM%==mingw set PATH=C:\Qt\Tools\mingw492_32\bin;%PATH%
- if %PLATFORM%==mingw set PATH=C:\Qt\Tools\mingw530_32\bin;%PATH%
- set PATH=%QTDIR%\bin;%PATH%
- if not %PLATFORM%==mingw call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
- if not %PLATFORM%==mingw call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
- set PATH=%PATH%;"C:\\Program Files (x86)\\Inno Setup 5"
- if "%APPVEYOR_REPO_TAG%"=="true" (set "GRABBER_IS_NIGHTLY=0") else (set "GRABBER_IS_NIGHTLY=1")
- if "%APPVEYOR_REPO_TAG%"=="true" (set "GRABBER_VERSION=%APPVEYOR_REPO_TAG_NAME%") else (set "GRABBER_VERSION=nightly")
- if "%PLATFORM%"=="X86" (set "PLATFORM_NAME=x86") else (set "PLATFORM_NAME=x64")
- if "%PLATFORM%"=="x86" (set "PLATFORM_NAME=x86") else (set "PLATFORM_NAME=x64")

install:
- git submodule update --init --recursive
Expand All @@ -62,7 +64,7 @@ build_script:

# Build Google Breakpad
- set "BREAKPAD_BUILD=0"
- if %DEPLOY%==1 if not exist "breakpad" set "BREAKPAD_BUILD=1"
- if %BREAKPAD%==1 if not exist "breakpad" set "BREAKPAD_BUILD=1"
- if %BREAKPAD_BUILD%==1 mkdir breakpad
- if %BREAKPAD_BUILD%==1 cd breakpad
- if %BREAKPAD_BUILD%==1 gclient config https://github.com/google/breakpad --unmanaged --name=src
Expand All @@ -71,7 +73,7 @@ build_script:
- if %BREAKPAD_BUILD%==1 sed -i -e "s/<\/RuntimeLibrary>/DLL<\/RuntimeLibrary>/g;" *.vcxproj # <TreatWChar_tAsBuiltInType>false<\/TreatWChar_tAsBuiltInType>
- if %BREAKPAD_BUILD%==1 sed -i -e "s/<\/RuntimeLibrary>/DLL<\/RuntimeLibrary>/g;" */*.vcxproj
- if %BREAKPAD_BUILD%==1 sed -i -e "s/<\/RuntimeLibrary>/DLL<\/RuntimeLibrary>/g;" */*/*.vcxproj
- if %BREAKPAD_BUILD%==1 if "%PLATFORM%"=="X86" (set "BREAKPAD_PLATFORM=Win32") else (set "BREAKPAD_PLATFORM=x64")
- if %BREAKPAD_BUILD%==1 if "%PLATFORM%"=="x86" (set "BREAKPAD_PLATFORM=Win32") else (set "BREAKPAD_PLATFORM=x64")
- if %BREAKPAD_BUILD%==1 msbuild breakpad_client.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /m /verbosity:normal /p:Configuration=Release /p:Platform="%BREAKPAD_PLATFORM%"
- if %BREAKPAD_BUILD%==1 cd "%APPVEYOR_BUILD_FOLDER%"

Expand All @@ -80,7 +82,7 @@ build_script:
- if %DEPLOY%==1 if not exist %QSCINTILLA_VERSION% set "QSCINTILLA_BUILD=1"
- if %QSCINTILLA_BUILD%==1 curl -L "https://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-2.10.8/%QSCINTILLA_VERSION%.zip" -o "%QSCINTILLA_VERSION%.zip"
- if %QSCINTILLA_BUILD%==1 7z x "%QSCINTILLA_VERSION%.zip" -y
- if %DEPLOY%==1 call "%QTDIR%/bin/qtenv2.bat"
- if %DEPLOY%==1 call "%QTDIR%\bin\qtenv2.bat"
- if %DEPLOY%==1 cd "%APPVEYOR_BUILD_FOLDER%/%QSCINTILLA_VERSION%/Qt4Qt5"
- if %QSCINTILLA_BUILD%==1 qmake qscintilla.pro
- if %QSCINTILLA_BUILD%==1 if not %PLATFORM%==mingw (nmake) else (mingw32-make)
Expand All @@ -96,21 +98,21 @@ build_script:
- cd ..

# Download APNG plugin DLL
- if %DEPLOY%==1 if not exist %APNG_PLUGIN% curl -L https://install.skycoder42.de/qtmodules/windows_x86/qt5101/qt.qt5.5101.skycoder42.png.win32_msvc2015/1.1.05.10.1.7z -o "%APNG_PLUGIN%.7z"
- if %DEPLOY%==1 if not exist %APNG_PLUGIN% curl -L https://install.skycoder42.de/qtmodules/windows_x86/qt5126/qt.qt5.5126.skycoder42.apng.win32_msvc2017/1.1.2-65.12.6.7z -o "%APNG_PLUGIN%.7z"
- if %DEPLOY%==1 if not exist %APNG_PLUGIN% 7z x "%APNG_PLUGIN%.7z" -y -o"%APNG_PLUGIN%"

# Download Mysql DLL
- if %DEPLOY%==1 if not exist %MYSQL_VERSION% curl -L -O "https://dev.mysql.com/get/Downloads/MySQL-5.7/%MYSQL_VERSION%.zip"
- if %DEPLOY%==1 if not exist %MYSQL_VERSION% 7z x "%MYSQL_VERSION%.zip" -y

# Generate installer
- if %DEPLOY%==1 iscc /Q /DMyAppVersion="%GRABBER_VERSION%" /DPlatformName="%PLATFORM_NAME%" /DQtDir="%QTDIR%\bin" /DOpenSSLDir="%OPENSSLDIR%" /DMySQLDir="%APPVEYOR_BUILD_FOLDER%\%MYSQL_VERSION%" /DQtApngDll="%APPVEYOR_BUILD_FOLDER%\%APNG_PLUGIN%\5.10.1\msvc2015\plugins\imageformats\qapng.dll" releases/setup.iss
- if %DEPLOY%==1 iscc /Q /DMyAppVersion="%GRABBER_VERSION%" /DPlatformName="%PLATFORM_NAME%" /DQtDir="%QTDIR%\bin" /DOpenSSLDir="%OPENSSLDIR%" /DMySQLDir="%APPVEYOR_BUILD_FOLDER%\%MYSQL_VERSION%" /DQtApngDll="%APPVEYOR_BUILD_FOLDER%\%APNG_PLUGIN%\5.12.6\msvc2017\plugins\imageformats\qapng.dll" releases/setup.iss

# Package symbol files to zip
- if %DEPLOY%==1 if "%BUILD_TYPE%"=="RelWithDebInfo" 7z a "releases\Grabber_%GRABBER_VERSION%_%PLATFORM_NAME%_symbols.zip" ".\build\gui\Grabber.pdb" ".\build\cli\Grabber-cli.pdb"

test_script:
- build\tests\tests.exe
- build\tests\tests.exe -s

artifacts:
- path: releases\Grabber_*.exe
Expand Down
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
patreon: bionus
custom: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=bio%2enus%40hotmail%2efr&lc=EN&item_name=Bionus&item_number=Grabber&currency_code=EUR
custom: https://www.paypal.me/jvasti
119 changes: 119 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: CI
on: [push]

jobs:
Windows:
timeout-minutes: 15
runs-on: windows-2019

env:
MYSQL_VERSION: mysql-5.7.14-win32
QSCINTILLA_VERSION: QScintilla_gpl-2.10.8

steps:
- name: Checkout
uses: actions/checkout@v1
with:
submodules: recursive

- name: Set environment
shell: cmd
run: |
echo ::set-env name=GRABBER_VERSION::nightly
echo ::set-env name=GRABBER_IS_NIGHTLY::1
echo ::set-env name=PLATFORM_NAME::x64
echo ::set-env name=OPENSSL_ROOT_DIR::%GITHUB_WORKSPACE%\vendor\OpenSSL
echo ::set-env name=MYSQL_INSTALL_DIR::%GITHUB_WORKSPACE%\vendor\%MYSQL_VERSION%
echo ::set-env name=APNG_PLUGIN_DLL::%GITHUB_WORKSPACE%\vendor\APNG\5.12.6\msvc2017\plugins\imageformats\qapng.dll
- name: Vendor cache
uses: actions/cache@v1
id: vendor-cache
with:
path: vendor
key: ${{ runner.os }}-vendor-${{ hashFiles('.github/workflows/build.yml') }}

- name: Create vendor dirs
shell: cmd
run: |
mkdir vendor
mkdir vendor_qt
- name: Install Qt
uses: jurplel/install-qt-action@v2.1.0
with:
version: 5.12.6

- name: Install QScintilla
working-directory: vendor_qt
shell: cmd
run: |
curl -Lo "%QSCINTILLA_VERSION%.zip" "https://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-2.10.8/%QSCINTILLA_VERSION%.zip"
7z x "%QSCINTILLA_VERSION%.zip" -y
rm "%QSCINTILLA_VERSION%.zip"
cd "%QSCINTILLA_VERSION%\Qt4Qt5"
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
qmake qscintilla.pro
nmake
nmake install
cd ..\..
- name: Install OpenSSL
if: steps.vendor-cache.outputs.cache-hit != 'true'
working-directory: vendor
shell: cmd
run: |
curl -Lo OpenSSL.exe https://slproweb.com/download/Win64OpenSSL-1_1_1d.exe
OpenSSL.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="%OPENSSL_ROOT_DIR%"
rm OpenSSL.exe
- name: Download MySQL
if: steps.vendor-cache.outputs.cache-hit != 'true'
working-directory: vendor
shell: cmd
run: |
curl -Lo "%MYSQL_VERSION%.zip" "https://dev.mysql.com/get/Downloads/MySQL-5.7/%MYSQL_VERSION%.zip"
7z x "%MYSQL_VERSION%.zip" -y
rm "%MYSQL_VERSION%.zip"
- name: Download APNG plugin
if: steps.vendor-cache.outputs.cache-hit != 'true'
working-directory: vendor
shell: cmd
run: |
curl -Lo APNG.7z https://install.skycoder42.de/qtmodules/windows_x86/qt5126/qt.qt5.5126.skycoder42.apng.win32_msvc2017/1.1.2-65.12.6.7z
7z x APNG.7z -y -oAPNG
rm APNG.7z
- name: Create build dir
shell: cmd
run: mkdir build

- name: Configure
working-directory: build
shell: cmd
run: cmake .. -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=Release -DNIGHTLY=%GRABBER_IS_NIGHTLY% -DCOMMIT="%GITHUB_SHA%" -DVERSION="%GRABBER_VERSION%"

- name: Compile
working-directory: build
shell: cmd
run: |
cmake --build . --config Release --target sites
cmake --build . --config Release
- name: Test
shell: cmd
run: build\tests\Release\tests.exe
env:
QTDIR: ${{ env.Qt5_Dir }}
QT_PLUGIN_PATH: ${{ env.Qt5_Dir }}\plugins

- name: Generate installer
shell: cmd
run: iscc /Q /DMyAppVersion="%GRABBER_VERSION%" /DPlatformName="%PLATFORM_NAME%" /DQtDir="%Qt5_Dir%\bin" /DOpenSSLDir="%OPENSSL_ROOT_DIR%" /DMySQLDir="%MYSQL_INSTALL_DIR%" /DQtApngDll="%APNG_PLUGIN_DLL%" releases\setup.iss

- name: Upload installer artifact
uses: actions/upload-artifact@v1
with:
name: windows-setup
path: releases/Grabber_${{ env.GRABBER_VERSION }}_${{ env.PLATFORM_NAME }}.exe
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ Sessionx.vim
## Temporary
.netrwhist
*~
## Auto-generated tag files
tags

## Persistent undo
[._]*.un~

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "cmake/cotire"]
path = cmake/cotire
url = https://github.com/sakra/cotire.git
[submodule "tests/src/vendor/catch"]
path = tests/src/vendor/catch
url = https://github.com/catchorg/Catch2.git
65 changes: 46 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ addons:
- qtmultimedia5-dev
- qttools5-dev
- qttools5-dev-tools
- sshpass
- lcov

# OS X build
Expand Down Expand Up @@ -57,7 +56,6 @@ before_install:
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update &&
brew install https://raw.githubusercontent.com/hudochenkov/homebrew-sshpass/master/sshpass.rb &&
brew install qt5 &&
QT_PATH=$(find /usr/local/Cellar/qt/* -maxdepth 0 -type d | head -1)
PATH=$QT_PATH/bin:$PATH &&
Expand All @@ -78,13 +76,12 @@ before_script:

# Build Grabber
script:
- mkdir build && cd build
- cmake ..
- make -j8
- cd ..
- ./scripts/build.sh
- ./build/tests/tests

after_success:
# Clean-up workspace
- git checkout .
# Upload code coverage (codecov)
- if [[ "$COVERAGE" == 1 ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
lcov --directory . --capture --output-file coverage.info &&
Expand All @@ -98,24 +95,54 @@ after_success:
; fi
# Generate release name
- if [[ "$TRAVIS_TAG" == "" ]]; then
export BUILD_LABEL=$TRAVIS_BRANCH
export BUILD_LABEL=nightly
; else
export BUILD_LABEL=$TRAVIS_TAG
; fi
# Build and upload release
- if [[ "$PACKAGE" == "1" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
cp "build/gui/Grabber" "release/Grabber" &&
touch "release/settings.ini" &&
rm "release/CDR.exe" &&
cd release && zip -r ../Grabber.zip . -x "sites/node_modules/*" && cd - &&
export OUTPUT_FILE="Grabber_${BUILD_LABEL}_linux.zip" &&
sshpass -p "$SSH_PASS" scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no Grabber.zip $SSH_USER@$SSH_HOST:$OUTPUT_FILE
./scripts/package-linux.sh &&
mv "Grabber.tar.gz" "Grabber_${BUILD_LABEL}.tar.gz"
; fi
- if [[ "$PACKAGE" == "1" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
cp "build/gui/Grabber" "release/Grabber" &&
touch "release/settings.ini" &&
rm "release/CDR.exe" &&
cd release && zip -r ../Grabber.zip . -x "sites/node_modules/*" && cd - &&
export OUTPUT_FILE="Grabber_${BUILD_LABEL}_mac.app.zip" &&
sshpass -p "$SSH_PASS" scp -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no Grabber.zip $SSH_USER@$SSH_HOST:$OUTPUT_FILE
./scripts/package-mac.sh &&
mv "Grabber.dmg" "Grabber_${BUILD_LABEL}.dmg"
; fi

# Add the nightly tag on develop package-enabled commits to push them to Github
before_deploy:
- if [[ "$PACKAGE" == "1" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]] && [[ "$TRAVIS_BRANCH" == "develop" ]]; then
export TRAVIS_TAG=nightly &&
git tag -f $TRAVIS_TAG
; fi

deploy:
# Nightly
- provider: releases
api_key:
secure: k8kiBfDzlVuL1x2A9Eh3U3uWMZzcKmx9GZjMWjC7wgxmG83cSZRu6RVyFamqbtmoFR8CRoCb+WFRxzUTn46sav6P4w329U2S2Izf3xeSGnONFz5GALqWIMbJ6tS81pQpLYn6GUKbey4f6uqhuyouVAj95lRu2W7K4/lN/Yb4hgA=
file:
- Grabber_$BUILD_LABEL.tar.gz
- Grabber_$BUILD_LABEL.dmg
skip_cleanup: true
draft: true
overwrite: true
on:
repo: Bionus/imgbrd-grabber
branch: develop
condition: $PACKAGE == 1
# Releases
- provider: releases
api_key:
secure: k8kiBfDzlVuL1x2A9Eh3U3uWMZzcKmx9GZjMWjC7wgxmG83cSZRu6RVyFamqbtmoFR8CRoCb+WFRxzUTn46sav6P4w329U2S2Izf3xeSGnONFz5GALqWIMbJ6tS81pQpLYn6GUKbey4f6uqhuyouVAj95lRu2W7K4/lN/Yb4hgA=
file:
- Grabber_$BUILD_LABEL.tar.gz
- Grabber_$BUILD_LABEL.dmg
skip_cleanup: true
draft: false
overwrite: true
on:
repo: Bionus/imgbrd-grabber
branch: master
tags: true
condition: $PACKAGE == 1
Loading

0 comments on commit c3ac4da

Please sign in to comment.