-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sh
executable file
·33 lines (27 loc) · 986 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
if [ "$1" == "image" ]; then
cd /tmp
#git clone https://github.com/jiahaog/nativefier.git
git clone https://github.com/Fmstrat/nativefier.git
cd nativefier
git checkout argv-url
docker build -t nativefier .
exit
fi
sudo rm -rf compile binaries
mkdir -p compile
mkdir -p binaries
cp apps/office/icon.png compile
chmod a+rw compile -R
chmod a+rw binaries -R
cd compile
# Linux
docker run -v "${PWD}":/target nativefier --name Loffice365 -p linux --internal-urls "(.*)" --browserwindow-options '{"webPreferences":{"nativeWindowOpen":true}}' --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36 Edg/90.0.818.41" https://www.office.com/ /target/
sudo chown $(id -u):$(id -g) . -R
mv Loffice365-linux-x64 loffice-365
cp -a ../apps loffice-365/apps
tar cvfz loffice-365.tgz loffice-365
mv loffice-365.tgz ../binaries
cd ..
sudo rm -rf compile
sudo chown $(id -u):$(id -g) binaries -R