Skip to content

Commit 2a3a4a7

Browse files
committed
Update packaging rules for Windows and Linux
1 parent 6c0f7a3 commit 2a3a4a7

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

project/Distributor.scala

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ object Distributor extends BuildExtra {
220220

221221
platform match {
222222
case "win32" | "win64" =>
223-
// on windows, we need nw.pak, icudt.dll, rename nw.exe -> codepulse.exe, libEGL/libGLES and the d3d DLLs
224223
val inclusions = Set(
225-
"d3dcompiler_47.dll", "icudtl.dat", "libEGL.dll", "libGLESv2.dll", "nw.pak"
224+
"d3dcompiler_47.dll", "ffmpeg.dll", "icudtl.dat", "libEGL.dll", "libGLESv2.dll", "natives_blob.bin",
225+
"node.dll", "nw_100_percent.pak", "nw_200_percent.pak", "nw_elf.dll", "nw.dll", "resources.pak"
226226
).map { inc => s"$root/$inc" }
227227

228228
nwkFiles flatMap {
@@ -253,6 +253,7 @@ object Distributor extends BuildExtra {
253253
Some(ZipEntry(customizedFile, s"$root/codepulse.exe", mode))
254254

255255
case e @ ZipEntry(_, path, _) if inclusions contains path => Some(e)
256+
case e @ ZipEntry(_, path, _) if path startsWith s"$root/locales/" => Some(e)
256257

257258
case ZipEntry(_, path, _) if path endsWith "/" => None // silent
258259
case ZipEntry(_, path, _) => log.info(s"Excluding $path"); None
@@ -309,10 +310,15 @@ object Distributor extends BuildExtra {
309310
}
310311

311312
case "linux-x86" | "linux-x64" =>
312-
// on linux, just keep nw and nw.pak. we don't need media features, so we can skip libffmpegsumo.so
313+
val inclusions = Set(
314+
"lib/libffmpeg.so", "lib/libnode.so", "lib/libnw.so",
315+
"icudtl.dat", "natives_blob.bin", "nw_100_percent.pak", "nw_200_percent.pak", "resources.pak"
316+
).map { inc => s"$root/$inc" }
317+
313318
nwkFiles flatMap {
314319
case ZipEntry(file, path, _) if path == s"$root/nw" => Some(ZipEntry(file, s"$root/codepulse", ExecutableType.Unix.mode)) // executable
315-
case e @ ZipEntry(_, path, _) if path == s"$root/nw.pak" || path == s"$root/icudtl.dat" => Some(e)
320+
case e @ ZipEntry(_, path, _) if inclusions contains path => Some(e)
321+
case e @ ZipEntry(_, path, _) if path startsWith s"$root/locales/" => Some(e)
316322

317323
case ZipEntry(_, path, _) if path endsWith "/" => None // silent
318324
case ZipEntry(_, path, _) => log.info(s"Excluding $path"); None

0 commit comments

Comments
 (0)