Skip to content

Commit

Permalink
Port application to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
csparker247 authored Dec 30, 2020
1 parent afdf401 commit 3e1b5fc
Show file tree
Hide file tree
Showing 266 changed files with 4,296 additions and 4,220 deletions.
81 changes: 81 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Linux
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^<[^.>]*>'
Priority: 1
- Regex: '^<c[^.>]*>'
Priority: 2
- Regex: '^<|"vtk.*>'
Priority: 3
- Regex: '^<|"itk.*>'
Priority: 4
- Regex: '^<|"opencv\d?.*>'
Priority: 5
- Regex: '^<|".*'
Priority: 6
- Regex: '.*'
Priority: 7
IndentCaseLabels: true
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: Never
94 changes: 94 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Build

on: [push, workflow_dispatch]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-10.15]
include:
- os: macos-10.15
Qt5_DIR: /usr/local/opt/qt/lib/cmake/Qt5/
MACOSX_DEPLOYMENT_TARGET: 10.15
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
# - os: macos-11.0
# Qt5_DIR: /usr/local/opt/qt/lib/cmake/Qt5/
# MACOSX_DEPLOYMENT_TARGET: 11.0
# SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

steps:
- uses: actions/checkout@v2

- name: Setup Ubuntu
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y cmake qtbase5-dev ninja-build nlohmann-json3-dev gperf
- name: Setup macOS 10.15
if: matrix.os == 'macos-10.15'
run: |
sudo xcode-select -s /Library/Developer/CommandLineTools/
sudo rm /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
sudo rm -rf /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk
sudo ln -sf MacOSX10.15.sdk /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
brew bundle
- name: Setup macOS 11
if: matrix.os == 'macos-11.0'
run: |
sudo xcode-select -s /Library/Developer/CommandLineTools/
brew bundle
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{runner.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -GNinja
env:
Qt5_DIR: ${{matrix.Qt5_DIR}}

- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE

- name: Test
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -V -C $BUILD_TYPE

- name: Package
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE --target package

- name: Upload Installer
uses: actions/upload-artifact@v2
if: matrix.os == 'macos-10.15' && github.ref == 'refs/heads/develop'
with:
name: macOS 10.15+ (x86_64) Installer
path: ${{runner.workspace}}/build/ffdropenc-*.dmg
24 changes: 6 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
.DS_Store
ffdropenc.app
ffdevenc.app
source/ffdropenc.platypus
source/ffimgdrop.platypus
source/graphics/legacy
test/
source/bin/.DS_Store
source/bin/qtfaststart/__init__.pyc
source/bin/qtfaststart/exceptions.pyc
source/bin/qtfaststart/processor.pyc
source/bin/ffmpeg
source/bin/ffprobe
source/bin/x264
source/graphics/dmg
ffdropenc.platypus
cmake-build-*/
build/
*.mp4
Random_Shapes*
ffdropenc
local_*
*.mkv
src/bin
*.sublime*
.idea/
tests/
venv/*
Loading

0 comments on commit 3e1b5fc

Please sign in to comment.