diff --git a/Kyoo/.gitignore b/Kyoo/.gitignore index eb271f87..993d5b9f 100644 --- a/Kyoo/.gitignore +++ b/Kyoo/.gitignore @@ -1,12 +1,5 @@ ## PROJECT CUSTOM IGNORES -# Transcoder build (auto generated from Kyoo.Transcoder sub-project) -Transcoder/Kyoo.Transcoder.dll -Transcoder/Kyoo.Transcoder.ilk -Transcoder/Kyoo.Transcoder.lib -Transcoder/Kyoo.Transcoder.pdb - - -/Properties/launchSettings.json +libtranscoder.so ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. diff --git a/Kyoo/InternalAPI/Crawler/Crawler.cs b/Kyoo/InternalAPI/Crawler/Crawler.cs index b31ee00e..89ff7daf 100644 --- a/Kyoo/InternalAPI/Crawler/Crawler.cs +++ b/Kyoo/InternalAPI/Crawler/Crawler.cs @@ -72,7 +72,8 @@ namespace Kyoo.InternalAPI } isScanning = false; - while (!cancellationToken.IsCancellationRequested); + if (watch) + while (!cancellationToken.IsCancellationRequested); Debug.WriteLine("&Crawler stopped"); runningCrawler = null; return null; diff --git a/Kyoo/Kyoo.csproj b/Kyoo/Kyoo.csproj index 2adf6d15..2745ec32 100644 --- a/Kyoo/Kyoo.csproj +++ b/Kyoo/Kyoo.csproj @@ -34,6 +34,13 @@ <_ContentIncludedByDefault Remove="ClientApp\e2e\tsconfig.json" /> + + + + + PreserveNewest + + diff --git a/build.sh b/build.sh new file mode 100755 index 00000000..a431f1d3 --- /dev/null +++ b/build.sh @@ -0,0 +1,65 @@ +#!/bin/bash + +# Checking for packages needed to compile the app. +PKG_EXISTS=1 +dotnet --version >> /dev/null 2>&1 +if [[ $? -ne 0 ]]; then + echo "FATAL: dotnet could not be found." + PKG_EXISTS=false + #Should check if the version is greater of equal to 3.0.100 +fi +cmake --version >> /dev/null 2>&1 +if [[ $? -ne 0 ]]; then + echo "FATAL: cmake could not be found." + PKG_EXISTS=false +fi +gcc -v >> /dev/null 2>&1 +if [[ $? -ne 0 ]]; then + echo "FATAL: gcc could not be found." + PKG_EXISTS=false +fi +make -v >> /dev/null 2>&1 +if [[ $? -ne 0 ]]; then + echo "FATAL: make could not be found." + PKG_EXISTS=false +fi +node -v >> /dev/null 2>&1 +if [[ $? -ne 0 ]]; then + echo "FATAL: node could not be found." + PKG_EXISTS=false +fi +npm -v >> /dev/null 2>&1 +if [[ $? -ne 0 ]]; then + echo "FATAL: npm could not be found." + PKG_EXISTS=false +fi + +if [[ PKG_EXISTS -eq false ]]; then + echo "Some requiered packages could not be found. Install them and run this script again." + exit +fi + +echo "All packages are here, building the app..." + + +# Configure ffmpeg. + +echo "Building ffmpeg..." +cd transcoder/ffmpeg +if [[ ! -f "config.h" ]]; then + ./configure --pkg-config-flags=--static --disable-shared --enable-static --disable-zlib --disable-iconv --disable-asm --disable-ffplay --disable-ffprobe --disable-ffmpeg +fi +make +cd .. +echo "Done." + +echo "Building the transcoder..." +mkdir --parent build && cd build +cmake .. +make +cd ../.. +echo "Done" + +echo "Installing the transcoder..." +mv transcoder/build/libtranscoder.so Kyoo/ +echo "Installation complete." \ No newline at end of file diff --git a/transcoder b/transcoder index 267599a6..d8f72ff8 160000 --- a/transcoder +++ b/transcoder @@ -1 +1 @@ -Subproject commit 267599a6f66044923d4d4772f5d1bd556e12536c +Subproject commit d8f72ff87020f2d38a4552f6083ef0659bf1f2be