Browse Source

Rebuild electron

Bob Mottram 7 years ago
parent
commit
44d8d33d56
1 changed files with 9 additions and 5 deletions
  1. 9
    5
      src/freedombone-image-customise

+ 9
- 5
src/freedombone-image-customise View File

561
 
561
 
562
 INSTALLING_MESH=
562
 INSTALLING_MESH=
563
 
563
 
564
+PATCHWORK_REPO="https://github.com/ssbc/patchwork"
565
+PATCHWORK_COMMIT='25cb5fbe705ef585e23e59387689122668c9c1b3'
566
+
564
 install_patchwork() {
567
 install_patchwork() {
565
     get_npm_arch
568
     get_npm_arch
566
 
569
 
567
-    git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork
570
+    git clone $PATCHWORK_REPO $rootdir/etc/patchwork
571
+    cd $rootdir/etc/patchwork
572
+    git checkout $PATCHWORK_COMMIT -b $PATCHWORK_COMMIT
568
 
573
 
569
     cat <<EOF > $rootdir/usr/bin/install_patchwork
574
     cat <<EOF > $rootdir/usr/bin/install_patchwork
570
 #!/bin/bash
575
 #!/bin/bash
571
 cd /etc/patchwork
576
 cd /etc/patchwork
572
-npm install --arch=$NPM_ARCH electron
573
-npm install --arch=$NPM_ARCH
574
-#npm rebuild --arch=$NPM_ARCH leveldown
575
-npm rebuild --arch=$NPM_ARCH
577
+npm install --arch=$NPM_ARCH --build-from-source
578
+npm install --arch=$NPM_ARCH --save-dev electron-rebuild
579
+./node_modules/.bin/electron-rebuild
576
 EOF
580
 EOF
577
     chroot "$rootdir" /bin/chmod +x /usr/bin/install_patchwork
581
     chroot "$rootdir" /bin/chmod +x /usr/bin/install_patchwork
578
     chroot "$rootdir" /usr/bin/install_patchwork
582
     chroot "$rootdir" /usr/bin/install_patchwork