mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-08 07:10:32 +00:00
797891c995
* Initial Library Loader * Load library as part of Model factory * Dynamically search and find the dlls * Update tests to use locally built runtimes * Fix dylib loading, add macos runtime support for sample/tests * Bypass automatic loading by default. * Only set CMAKE_OSX_ARCHITECTURES if not already set, allow cross-compile * Switch Loading again * Update build scripts for mac/linux * Update bindings to support newest breaking changes * Fix build * Use llmodel for Windows * Actually, it does need to be libllmodel * Name * Remove TFMs, bypass loading by default * Fix script * Delete mac script --------- Co-authored-by: Tim Miller <innerlogic4321@ghmail.com>
17 lines
584 B
PowerShell
17 lines
584 B
PowerShell
$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
|
|
cp "$BUILD_DIR\bin\*.dll" $LIBS_DIR
|
|
mv $LIBS_DIR\llmodel.dll $LIBS_DIR\libllmodel.dll |