@@ -220,35 +220,18 @@ trait CliLaunchers extends SbtModule { self =>
220
220
else " lib"
221
221
os.copy.over(libPath, destDir / s " ${prefix}sodiumjni. $ext" )
222
222
}
223
- private def copyLibsodiumTo (cs : String , destDir : os.Path ): Unit = {
224
- val (osPart, suffix, relPath, ext) = sys.props.get(" os.arch" ) match {
225
- case Some (" x86_64" | " amd64" ) =>
226
- if (Properties .isWin)
227
- (" win-64" , " -h62dcd97_1" , os.rel / " Library" / " lib" / " libsodium.lib" , " lib" )
228
- else if (Properties .isLinux)
229
- (" linux-64" , " -h36c2ea0_1" , os.rel / " lib" / " libsodium.a" , " a" )
230
- else if (Properties .isMac) (" osx-64" , " -hbcb3906_1" , os.rel / " lib" / " libsodium.a" , " a" )
231
- else sys.error(s " Unsupported OS for x86_64 platform: ${sys.props(" os.name" )}" )
232
- case Some (" aarch64" ) =>
233
- if (Properties .isLinux)
234
- (" linux-aarch64" , " -hb9de7d4_1" , os.rel / " lib" / " libsodium.a" , " a" )
235
- else sys.error(s " Unsupported OS for aarch64 platform: ${sys.props(" os.name" )}" )
236
- case Some (arch) =>
237
- sys.error(s " Unsupported architecture: $arch" )
238
- case None =>
239
- sys.error(" Cannot determine CPU architecture" )
240
- }
223
+ private def copyLibsodiumStaticTo (cs : String , destDir : os.Path ): Unit = {
241
224
val dirRes = os.proc(
242
225
cs,
243
226
" get" ,
244
227
" --archive" ,
245
- s " https://anaconda. org/conda-forge/ libsodium/ $libsodiumVersion /download/ $osPart / libsodium-$libsodiumVersion$suffix .tar.bz2 "
228
+ " https://download.libsodium. org/libsodium/releases/ libsodium-1.0.18-stable-msvc.zip "
246
229
).call()
247
230
val dir = os.Path (dirRes.out.text().trim, os.pwd)
248
- val prefix =
249
- if ( Properties .isWin) " "
250
- else " lib"
251
- os.copy.over(dir / relPath, destDir / s " ${prefix} sodium. $ext " )
231
+ os.copy.over(
232
+ dir / " libsodium " / " x64 " / " Release " / " v143 " / " static " / " libsodium.lib " ,
233
+ destDir / " sodium. lib"
234
+ )
252
235
}
253
236
private def copyAlpineLibsodiumTo (cs : String , destDir : os.Path ): Unit = {
254
237
val arcPath = os.proc(
@@ -284,7 +267,7 @@ trait CliLaunchers extends SbtModule { self =>
284
267
os.makeDir.all(dir)
285
268
286
269
if (Properties .isWin) {
287
- copyLibsodiumTo (cs(), dir)
270
+ copyLibsodiumStaticTo (cs(), dir)
288
271
copyLibsodiumjniTo(cs(), dir)
289
272
copyCsjniutilTo(cs(), dir)
290
273
}
0 commit comments