File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11Unreleased
22
3+ * FIXED: #186 Skip download and symlink when using libzim_local
4+
354.2.0
46* NEW: Use libzim 9.7.0
57* NEW: Add addAlias method to Creator
Original file line number Diff line number Diff line change 11import dotenv from "dotenv" ;
22dotenv . config ( ) ;
3+ import fs from "fs" ;
34import { mkdirp } from "mkdirp" ;
45import exec from "exec-then" ;
56import os from "os" ;
67
78mkdirp . sync ( "./build/Release" ) ;
89
10+ const bindingGypText = fs . readFileSync ( "binding.gyp" , { encoding : "utf8" } ) ;
11+ if ( bindingGypText . match ( / " l i b z i m _ l o c a l " \s * : \s * " t r u e " / ) ) {
12+ console . log ( "the build is using system libzim -> not bundling libzim, skipping download and copy steps" ) ;
13+ process . exit ( ) ;
14+ }
15+
916const isMacOS = os . type ( ) === "Darwin" ;
1017const isLinux = os . type ( ) === "Linux" ;
1118
@@ -30,6 +37,7 @@ if (isLinux) {
3037 exec ( `cp download/${ libDir } /libzim.so.9 build/Release/libzim.so.9` ) ;
3138 exec ( "ln -sf build/Release/libzim.so.9 build/Release/libzim.so" ) ; // convenience only, not required
3239}
40+
3341if ( isMacOS ) {
3442 console . info ( "Copying libzim.9.dylib to build folder" ) ;
3543 exec ( "cp download/lib/libzim.9.dylib build/Release/libzim.9.dylib" ) ;
You can’t perform that action at this time.
0 commit comments