otclient-redemption/recompile.sh
Eduardo Dantas 5531c40416
Fix github actions, cmake rework and integrate with vcpkg and improvement on protobuf (#257)
Full Github Action Rework (GHA), so that builds are fixed: Windows, Linux, Docker; Review checks: C++, Lua, XML and others checks
Complete Cmake Rework, modernized the code so that you can work with GHA.

Removed:
VCPKG Build
Removed generated Files from file .gitignore (all build files are required for Cmake cache generation)
Lib Lua5.1 was removed and maintained only Luajit (faster and better)
Removed the "consoleapplication" file
Removed the "lbitlib" file, after all, if the idea is the project to use updated Libs, why do we want files that bring compatibility to old Libs? I just updated the files to use the functions of the new LIBs

Modified:
The metadata of the Bitwise functions have been changed, now being in place of "bit32." is
"bit."
Protobuf will now be chased along with the client build, avoiding random errors related to Protobuf's version is different from the compiled file (this way, no matter if the repository file is outdated, as a new one will always be generated in a compilation from rebuild all)
Modified the structure of some folders, such as "protobuf" and "cmake" folder, "protobuf" was sent to the src main folder and "cmake" to the client main folder
Namespace protobuf changed from "tibia" to "otclient"
Merged the files of the Protobuf "shared.proto and appearances.proto" in one (appearances)

Added:
Issue Template
Pull Request Template
Pull Request Labeller
Check to inform that clang is not supported (it is possible to use docker on mac, this way we avoid headaches related to support for an OS that is practically not used)

GHA:
Codacy
CodeQL
Review dog
SonarCloud
Build docker
Build Ubuntu
Build Windows

Cmake:
Cmakepresets
VCPKG Manifest
Otcicon

Client:
Added the functions LuaInterface::registerTable and LuaInterface::registerMethod and Bitwise Functions (if necessary at some point compatibility with the Lua 5.1)

Note: Some checks are failing as they should only work after the merge, they should be ignored, the main ones are ok

Thanks to @costallat for for helping and assisting with addition of GHA and CMake build
2022-06-03 17:14:30 -03:00

22 lines
468 B
Bash

#!/bin/bash
if [ -d "build" ]
then
echo "Directory 'build' already exists, moving to it"
cd build
echo "Clean build directory"
rm -rf *
echo "Configuring"
cmake -DCMAKE_TOOLCHAIN_FILE=../../vcpkg/scripts/buildsystems/vcpkg.cmake ..
else
mkdir "build" && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../../vcpkg/scripts/buildsystems/vcpkg.cmake ..
fi
make -j$(nproc) || exit 1
if [ $? -eq 1 ]
then
echo "Compilation failed!"
else
echo "Compilation successful!"
fi