Skip to content

Commit 7c9fa5c

Browse files
committed
Build using containers
1 parent 300a6b5 commit 7c9fa5c

File tree

4 files changed

+61
-7
lines changed

4 files changed

+61
-7
lines changed

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
dist
2-
downloads
3-
bluos-controller.*
1+
output/
2+
downloads/

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM registry.opensuse.org/opensuse/tumbleweed:latest
2+
3+
RUN zypper -n install lynx wget jq npm10 p7zip-full patch
4+
ADD bs-bashpatch.sh .
5+
ADD patches patches
6+
7+
CMD ["/bin/bash", "bs-bashpatch.sh"]

README.md

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,64 @@
11
# What is that?
22

3-
This script repackages BluOS Controller to make it work on Linux.
3+
This script repackages the latest version of the BluOS Controller to make it work on Linux.
44

55
See: https://support1.bluesound.com/hc/en-us/community/posts/360033533054-BluOS-controller-app-on-Linux
66

77
# How to build
88

9+
## Using Docker or Podman (suggested)
10+
11+
Replace `docker` with `podman` if you prefer to use Podman.
12+
13+
```
14+
podman build -t bs-bashpatch .
15+
mkdir -p downloads output
16+
podman run --rm -v $PWD/output:/output -v $PWD/downloads:/downloads bs-bashpatch
17+
```
18+
19+
## Without using Docker or Podman
20+
21+
### Install dependencies
22+
23+
- bash
24+
- wget
25+
- lynx
26+
- jq
27+
- p7zip
28+
- Debian: p7zip-full
29+
- OpenSUSE Tumbleweed: p7zip-full
30+
- OpenSUSE Leap 15: p7zip
31+
- Fedora: p7zip-plugins
32+
- patch
33+
- npm
34+
- OpenSUSE: npm10
35+
36+
### Run the script
37+
938
```
1039
./bs-bashpatch.sh
1140
```
1241

1342
# How to run
1443

44+
## Default mode
45+
46+
Open the output directory and run the generated AppImage.
47+
48+
## Expert mode
49+
50+
Run the latest generated AppImage and print console messages:
51+
52+
```
53+
ELECTRON_ENABLE_LOGGING=true "$(ls output/*.AppImage | sort | head -n1)"
54+
```
55+
56+
# Common issues
57+
58+
## Program crashes when opened after few seconds
59+
60+
Try to delete the configuration and try again:
61+
1562
```
16-
ELECTRON_ENABLE_LOGGING=true ./dist/linux-unpacked/bluos
63+
rm -rf ~/.config/BluOS\ Controller
1764
```

bs-bashpatch.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -eux
44

55
URL="https://www.bluesound.com/downloads/"
66

7-
# Create temporary directory
7+
# Create directories
88
tmp=$(realpath $(mktemp -d bluos-controller.XXX))
99
cleanup() {
1010
rm -rf "$tmp"
@@ -23,6 +23,7 @@ wget -N -P downloads "$archive_url"
2323

2424
# Unpack
2525
7z e "downloads/${archive_url##*/}" -r app.asar -o"$tmp"
26+
npm add --save-dev npx
2627
npx asar extract "$tmp/app.asar" "$tmp/app"
2728

2829
# Install dependencies
@@ -40,7 +41,7 @@ done
4041
npx electron-builder -l AppImage
4142

4243
# Move results
43-
mv dist "$OLDPWD"
44+
mv dist/*.AppImage "$OLDPWD/output"
4445

4546
# Cleanup
4647
cleanup

0 commit comments

Comments
 (0)