diff --git a/CMakeLists.txt b/CMakeLists.txt index 24eeecf..dfd10bd 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ cmake_minimum_required(VERSION 3.18) project(${PROJ_NAME} LANGUAGES C CXX) set(CMAKE_BUILD_TYPE Debug) set(CMAKE_CXX_STANDARD 20) -file(STRINGS "./tools/build.nr" BUILD_NUMBER) +file(STRINGS "./build.nr" BUILD_NUMBER) #----------------------------------------------------------------------------------------- message("** Building ${PROJ_NAME} ${MAJOR_VER}.${MINOR_VER}.${BUILD_NUMBER}") @@ -66,28 +66,6 @@ if (UNIX) endif (UNIX) #----------------------------------------------------------------------------------------- -#BuildNumber Target -#----------------------------------------------------------------------------------------- -if (WIN32) - add_custom_command ( OUTPUT ./tools/build.nr - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tools/inc_bnr.exe - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tools/ - ) -endif (WIN32) -if (UNIX) - add_custom_command ( OUTPUT ./tools/build.nr - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tools/inc_bnr - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tools/ - ) -endif (UNIX) - -add_custom_target( - IncBnr ALL - DEPENDS ./tools/build.nr -) -#----------------------------------------------------------------------------------------- - - #Finalize #----------------------------------------------------------------------------------------- add_custom_command(TARGET ${OMNIA_STD_LIB} POST_BUILD diff --git a/README.md b/README.md index e3667d7..d74864c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ + # OmniaFramework -Compile instructions on Windows +A collection of C++ classes and tools that I have created over the years + +## Build instructions - Windows **Step 1:** download MSYS2 from https://www.msys2.org/ and install it @@ -9,7 +12,7 @@ download MSYS2 from https://www.msys2.org/ and install it run MSYS2, and in the terminal run: ``` pacman -Syuu -pacman -S --needed base-devel mingw-w64-ucrt-x86_64-clang mingw-w64-ucrt-x86_64-gdb mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-sfml mingw-w64-ucrt-x86_64-make mingw-w64-ucrt-x86_64-boost +pacman -S --needed base-devel mingw-w64-ucrt-x86_64-clang mingw-w64-ucrt-x86_64-gdb mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-make mingw-w64-ucrt-x86_64-boost ``` **Step 3:** @@ -20,3 +23,31 @@ execute this command: ``` ./compile ``` +## Build instructions - Linux (Arch) +**Step 1:** +open a terminal and run: +``` +sudo pacman -Syuu +sudo pacman -S --needed base-devel clang gdb cmake make boost +``` + +**Step 2:** +open a terminal inside the root directory of the project and run this command: +``` +./compile +``` +## Build instructions - Linux (Ubuntu) +**Step 1:** +open a terminal and run: +``` +sudo apt update && sudo apt upgrade +sudo apt install clang gdb make cmake libboost-all-dev +``` + +**Step 2:** +open a terminal inside the root directory of the project and run this command: +``` +./compile +``` + +#### For other Linux distros, install the dependencies using your package manager. \ No newline at end of file diff --git a/build.nr b/build.nr new file mode 100644 index 0000000..b4c6992 --- /dev/null +++ b/build.nr @@ -0,0 +1 @@ +1796 diff --git a/compile b/compile index 266a8e8..e3707e7 100755 --- a/compile +++ b/compile @@ -7,9 +7,43 @@ if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then cd bin make cd .. + if [ $? -eq 0 ]; then + mkdir -p ./Release/lib + + cp ./bin/libostd.so ./Release/lib + + mkdir -p ./Release/include/ostd/vendor + find ./src/ostd -maxdepth 1 -name "*.hpp" -exec cp {} ./Release/include/ostd \; + find ./src/ostd/vendor -maxdepth 1 -name "*.hpp" -exec cp {} ./Release/include/ostd/vendor \; + cp -r ./licences ./Release + + typeset -i build_number=$(cat build.nr) + ((build_number++)) + truncate -s 0 build.nr + echo $build_number >> build.nr + fi elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then cmake -B bin -S ./ -G "MinGW Makefiles" cd bin mingw32-make.exe cd .. + if [ $? -eq 0 ]; then + mkdir -p ./Release/lib + + cp ./bin/libostd.dll ./Release/lib + + cp C:/msys64/ucrt64/bin/libgcc_s_seh-1.dll ./Release/lib + cp C:/msys64/ucrt64/bin/libstdc++-6.dll ./Release/lib + cp C:/msys64/ucrt64/bin/libwinpthread-1.dll ./Release/lib + + mkdir -p ./Release/include/ostd/vendor + find ./src/ostd -maxdepth 1 -name "*.hpp" -exec cp {} ./Release/include/ostd \; + find ./src/ostd/vendor -maxdepth 1 -name "*.hpp" -exec cp {} ./Release/include/ostd/vendor \; + cp -r ./licences ./Release + + typeset -i build_number=$(cat build.nr) + ((build_number++)) + truncate -s 0 build.nr + echo $build_number >> build.nr + fi fi \ No newline at end of file diff --git a/src/ostd/BaseObject.hpp b/src/ostd/BaseObject.hpp index c0f5adb..451805b 100755 --- a/src/ostd/BaseObject.hpp +++ b/src/ostd/BaseObject.hpp @@ -31,7 +31,6 @@ namespace ostd inline bool compareByOID(const BaseObject& other) const { return m_oid == other.m_oid; } inline static BaseObject& InvalidRef(void) { return BaseObject::s_invalid_obj; } - // inline static BaseObject InvalidInst(void) { return BaseObject::s_invalid_obj; } inline void setTypeName(const StringEditor& tn) { m_typeName = tn.str(); } inline String getTypeName(void) const { return m_typeName; } diff --git a/tools/CppResourceMaker b/tools/CppResourceMaker deleted file mode 100755 index 6d78724..0000000 Binary files a/tools/CppResourceMaker and /dev/null differ diff --git a/tools/build.nr b/tools/build.nr deleted file mode 100755 index 0fbe6bb..0000000 --- a/tools/build.nr +++ /dev/null @@ -1 +0,0 @@ -1789 diff --git a/tools/inc_bnr b/tools/inc_bnr deleted file mode 100755 index 4a0e37b..0000000 Binary files a/tools/inc_bnr and /dev/null differ diff --git a/tools/inc_bnr.exe b/tools/inc_bnr.exe deleted file mode 100755 index ba3b943..0000000 Binary files a/tools/inc_bnr.exe and /dev/null differ