Adding a build script

This commit is contained in:
Zoe Roux 2020-01-12 23:10:30 +01:00
parent ddafabf0d8
commit e9a7bee3a8
5 changed files with 76 additions and 10 deletions

9
Kyoo/.gitignore vendored
View File

@ -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.

View File

@ -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;

View File

@ -34,6 +34,13 @@
<ItemGroup>
<_ContentIncludedByDefault Remove="ClientApp\e2e\tsconfig.json" />
</ItemGroup>
<ItemGroup>
<None Remove="libtranscoder.so" />
<EmbeddedResource Include="libtranscoder.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">
<!-- Ensure Node.js is installed -->

65
build.sh Executable file
View File

@ -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."

@ -1 +1 @@
Subproject commit 267599a6f66044923d4d4772f5d1bd556e12536c
Subproject commit d8f72ff87020f2d38a4552f6083ef0659bf1f2be