Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ set_target_properties(libmcdata PROPERTIES VISIBILITY_INLINES_HIDDEN ON)

if(WIN32)
target_link_libraries(libmcdata ${CMAKE_CURRENT_SOURCE_DIR}/Libraries/SQLite/sqlite3.lib)
elseif(UNIX AND NOT APPLE)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Libraries/SQLite)
target_link_libraries(libmcdata SQLite3)
endif()

# This makes sure symbols are exported
Expand Down
4 changes: 2 additions & 2 deletions Libraries/SQLite/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.7)
project(SQLite3
VERSION 3.31.1
LANGUAGES C
Expand All @@ -11,4 +11,4 @@ set_target_properties(${PROJECT_NAME} PROPERTIES
OUTPUT_NAME sqlite3
PUBLIC_HEADER sqlite3.h
DEBUG_POSTFIX d
)
)
Binary file modified Libraries/SQLite/libsqlite3.a
Binary file not shown.
55 changes: 55 additions & 0 deletions build_clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash

basepath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
builddir="$basepath/build"
outputdir="$builddir/Output"

dirs_to_make[0]="$builddir"
dirs_to_make[1]="$outputdir"
dirs_to_make[2]="$builddir/DevPackage"
dirs_to_make[3]="$builddir/DevPackage/Plugins"
dirs_to_make[4]="$builddir/DevPackage/Framework"
dirs_to_make[5]="$builddir/DevPackage/Framework/HeadersDev"
dirs_to_make[6]="$builddir/DevPackage/Framework/HeadersDev/CppDynamic"
dirs_to_make[7]="$builddir/DevPackage/Framework/HeadersDriver"
dirs_to_make[8]="$builddir/DevPackage/Framework/HeadersDriver/CppDynamic"
dirs_to_make[9]="$builddir/DevPackage/Framework/InterfacesDev"
dirs_to_make[10]="$builddir/DevPackage/Framework/PluginCpp"
dirs_to_make[11]="$builddir/DevPackage/Framework/PluginPython"
dirs_to_make[12]="$builddir/DevPackage/Framework/Dist"

for dir in "${dirs_to_make[@]}"
do
if [ ! -d "$dir" ]; then
echo "Creating directory $dir..."
mkdir "$dir"
else
echo "Directory $dir already exists"
fi
done

git rev-parse --verify --short HEAD > "$builddir/githash.txt"
GITHASH=$(<"$builddir/githash.txt")
echo "git hash: $GITHASH"

cd "$basepath"

echo "Building Go Server..."
go get "github.com/gorilla/handlers"
go build -o "$builddir/Output/amc_server" -ldflags="-s -w" "$basepath/Server/mcserver.go"


#echo "Building Client"
#cd "$basepath/Client"
# TODO: Need to implement script to build client
# Having issues with node packages

cd "$builddir"

echo "Building Core Modules"
cmake ..
cmake --build . --config Release

#echo "Building Developer Package"
# TODO: Copy files to builddir

18 changes: 18 additions & 0 deletions rpi_install_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#sudo apt-get update
echo 'Installing build-essential...'
sudo apt install -y build-essential
echo 'Installing cmake...'
sudo apt install -y cmake
echo 'Installing nodejs...'
sudo apt install -y nodejs
echo 'Installing npm...'
sudo apt install -y npm
echo 'Installing git...'
sudo apt install -y git
echo 'Installing Go...'
GO_VERSION=1.14.7
wget -P "$HOME/Downloads" "https://golang.org/dl/go$GO_VERSION.linux-armv6l.tar.gz"
sudo tar -C /usr/local -xzf "$HOME/Downloads/go$GO_VERSION.linux-armv6l.tar.gz"
export PATH=$PATH:/go/bin:/usr/local/go/bin
echo 'export PATH=$PATH:/go/bin:/usr/local/go/bin' >>~/.bash_profile
source ~/.bash_profile