diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 4cc41b6..1be609c 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -1,4 +1,4 @@ -name: C/C++ CI +name: C/C++ Build CI on: push: @@ -13,20 +13,24 @@ jobs: steps: - uses: actions/checkout@v2 - name: make-dir - run: make dir + run: make -f Makefile.own dir - name: linux-build - run: make build + run: make -f Makefile.own build - name: make run - run: make run + run: make -f Makefile.own run + - name: Linux CMake Build + run: cmake . && make build-windows: runs-on: windows-2019 steps: - uses: actions/checkout@v2 - - name: install-make - run: choco install make + # - name: install-make + # run: choco install make cmake - name: make-directory - run: make dir + run: make -f Makefile.own dir - name: windows-build - run: make winbuild + run: make -f Makefile.own winbuild + - name: Windows CMake Build + run: cmake -G "MinGW Makefiles" && cmake . && make diff --git a/.gitignore b/.gitignore index 561229e..e99d69a 100755 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,22 @@ bin/* passphrase.bin s_lockValue.bin -release-configs/* \ No newline at end of file +release-configs/* + +### CMake ### +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps +CMakeUserPresets.json +build/* +### CMake Patch ### +# External projects +*-prefix/ \ No newline at end of file diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 572ba24..373b167 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -21,13 +21,13 @@ "${workspaceFolder}/include/ffmpeg-coder/**", "${workspaceFolder}/include/**", "${workspaceFolder}/lib" - ], "defines": [], "compilerPath": "C:\\MinGW\\bin\\gcc.exe", "cStandard": "${default}", "cppStandard": "c++14", - "intelliSenseMode": "${default}" + "intelliSenseMode": "${default}", + "configurationProvider": "ms-vscode.cmake-tools" }, { "name": "Surface", @@ -36,7 +36,6 @@ "${workspaceFolder}/include/ffmpeg-coder/**", "${workspaceFolder}/include/**", "${workspaceFolder}/lib" - ], "defines": [], "compilerPath": "C:\\Program Files (x86)\\mingw-w64\\i686-8.1.0-posix-dwarf-rt_v6-rev0\\mingw32\\bin\\gcc.exe", diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..2be9949 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.12) +project(ffmpeg-coder VERSION 1.0.0) +message("FFMPEG CODER BUILD PROCESS") +message("--------------------------") + +set(CMAKE_CXX_FLAGS "-Wall -v") +include_directories(include/ffmpeg-coder lib) + +# Placing the executable in the bin dir +set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) + + + +add_executable(ffmpeg-coder src/ffmpeg-coder.cpp) + diff --git a/Makefile b/Makefile.own similarity index 94% rename from Makefile rename to Makefile.own index ddc6fd1..a2ded7f 100644 --- a/Makefile +++ b/Makefile.own @@ -1,5 +1,6 @@ # make script for the ffmpeg-coder project to build the project from source code # By Abir-Tx +# Use make -f Makefile.own winbuild to use this file # variables @@ -33,6 +34,7 @@ run: dir: echo Creating directories..... mkdir bin + mkdir build .PHONY: debpackage debpackage: build diff --git a/include/ffmpeg-coder/ffmpeg_coder.hpp b/include/ffmpeg-coder/ffmpeg_coder.hpp index 250b56d..9589e52 100644 --- a/include/ffmpeg-coder/ffmpeg_coder.hpp +++ b/include/ffmpeg-coder/ffmpeg_coder.hpp @@ -1,5 +1,5 @@ -#if !defined(FFMPEG_CODER_H) -#define FFMPEG_CODER_H +#if !defined(FFMPEG_CODER_HPP) +#define FFMPEG_CODER_HPP #include "utils.hpp" #include @@ -330,6 +330,9 @@ class ffmpeg { } } } + +// Quick convert function + void quickConvert(){}; }; ffmpeg::ffmpeg() {} diff --git a/include/ffmpeg-coder/frontend_funcs.hpp b/include/ffmpeg-coder/frontend_funcs.hpp index b3816f2..5a2ef51 100644 --- a/include/ffmpeg-coder/frontend_funcs.hpp +++ b/include/ffmpeg-coder/frontend_funcs.hpp @@ -1,5 +1,5 @@ -#if !defined(FRONTEND_FUNC_H) -#define FRONTEND_FUNC_H +#if !defined(FRONTEND_FUNC_HPP) +#define FRONTEND_FUNC_HPP #include "rang.hpp" #include @@ -108,7 +108,7 @@ void homepage() ffmpeg.selected_action(); } else if (choice == 2){ - cout << "Work in progress !!" << endl; + ffmpeg.quickConvert(); } else if (choice == 3) { diff --git a/include/ffmpeg-coder/s_lock.hpp b/include/ffmpeg-coder/s_lock.hpp index c57801a..28e137d 100644 --- a/include/ffmpeg-coder/s_lock.hpp +++ b/include/ffmpeg-coder/s_lock.hpp @@ -1,5 +1,5 @@ -#if !defined(S_LOCK_H) -#define S_LOCK_H +#if !defined(S_LOCK_HPP) +#define S_LOCK_HPP #include "rang.hpp" #include diff --git a/include/ffmpeg-coder/utils.hpp b/include/ffmpeg-coder/utils.hpp index 2f4318b..5981a09 100644 --- a/include/ffmpeg-coder/utils.hpp +++ b/include/ffmpeg-coder/utils.hpp @@ -1,5 +1,5 @@ -#if !defined(UTILS_H) -#define UTILS_H +#if !defined(UTILS_HPP) +#define UTILS_HPP #include "rang.hpp" #include