2023-05-22 19:56:49 +00:00
|
|
|
$ROOT_DIR = '.\runtimes\win-x64'
|
|
|
|
$BUILD_DIR = '.\runtimes\win-x64\build\mingw'
|
|
|
|
$LIBS_DIR = '.\runtimes\win-x64\native'
|
|
|
|
|
|
|
|
# cleanup env
|
|
|
|
Remove-Item -Force -Recurse $ROOT_DIR -ErrorAction SilentlyContinue | Out-Null
|
|
|
|
mkdir $BUILD_DIR | Out-Null
|
|
|
|
mkdir $LIBS_DIR | Out-Null
|
|
|
|
|
|
|
|
# build
|
|
|
|
cmake -G "MinGW Makefiles" -S ..\..\gpt4all-backend -B $BUILD_DIR
|
|
|
|
cmake --build $BUILD_DIR --parallel --config Release
|
|
|
|
|
|
|
|
# copy native dlls
|
|
|
|
cp "C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin\*dll" $LIBS_DIR
|
2023-06-13 12:05:34 +00:00
|
|
|
cp "$BUILD_DIR\bin\*.dll" $LIBS_DIR
|
|
|
|
mv $LIBS_DIR\llmodel.dll $LIBS_DIR\libllmodel.dll
|