Skip to content

Commit b303c69

Browse files
authored
Merge pull request popcorn-official#2897 from popcorn-time-ru/libatomic
2 parents c855c9f + 8e051c5 commit b303c69

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

dist/linux/copy-libatomic.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
# launch 'copy-libatomic.sh <destination> <app-name> <platform>'
3+
4+
builddir=$1
5+
projectName=$2
6+
arch=$3
7+
8+
outDir="$1/$2/$3"
9+
10+
sudo dpkg --add-architecture i386
11+
dpkg-query -s libatomic1
12+
if [ ! $? = 0 ]; then
13+
sudo apt update
14+
sudo apt install -y libatomic1
15+
fi
16+
dpkg-query -s libatomic1:i386
17+
if [ ! $? = 0 ]; then
18+
sudo apt update
19+
sudo apt install -y libatomic1:i386
20+
fi
21+
22+
if [[ $arch == "linux64" ]]
23+
then
24+
read source <<< `readlink -f /usr/lib/x86_64*/libatomic.so.*`
25+
else
26+
read source <<< `readlink -f /usr/lib/i386*/libatomic.so.*`
27+
fi
28+
cp $source "$outDir/lib/libatomic.so.1"

gulpfile.js

+16
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,22 @@ gulp.task('nwjs', () => {
422422

423423
return nw.build();
424424
})
425+
.then(() => {
426+
return Promise.all(
427+
nw.options.platforms.map((platform) => {
428+
if (platform.indexOf('linux') === -1) {
429+
return null;
430+
}
431+
const child = spawn('bash', [
432+
'dist/linux/copy-libatomic.sh',
433+
releasesDir,
434+
pkJson.name,
435+
platform
436+
]);
437+
return waitProcess(child);
438+
})
439+
);
440+
})
425441
.catch(function(error) {
426442
console.error(error);
427443
});

0 commit comments

Comments
 (0)