Skip to content

Commit

Permalink
Build using containers
Browse files Browse the repository at this point in the history
  • Loading branch information
frafra committed Dec 13, 2020
1 parent 300a6b5 commit 7c9fa5c
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 7 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
dist
downloads
bluos-controller.*
output/
downloads/
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM registry.opensuse.org/opensuse/tumbleweed:latest

RUN zypper -n install lynx wget jq npm10 p7zip-full patch
ADD bs-bashpatch.sh .
ADD patches patches

CMD ["/bin/bash", "bs-bashpatch.sh"]
51 changes: 49 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,64 @@
# What is that?

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

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

# How to build

## Using Docker or Podman (suggested)

Replace `docker` with `podman` if you prefer to use Podman.

```
podman build -t bs-bashpatch .
mkdir -p downloads output
podman run --rm -v $PWD/output:/output -v $PWD/downloads:/downloads bs-bashpatch
```

## Without using Docker or Podman

### Install dependencies

- bash
- wget
- lynx
- jq
- p7zip
- Debian: p7zip-full
- OpenSUSE Tumbleweed: p7zip-full
- OpenSUSE Leap 15: p7zip
- Fedora: p7zip-plugins
- patch
- npm
- OpenSUSE: npm10

### Run the script

```
./bs-bashpatch.sh
```

# How to run

## Default mode

Open the output directory and run the generated AppImage.

## Expert mode

Run the latest generated AppImage and print console messages:

```
ELECTRON_ENABLE_LOGGING=true "$(ls output/*.AppImage | sort | head -n1)"
```

# Common issues

## Program crashes when opened after few seconds

Try to delete the configuration and try again:

```
ELECTRON_ENABLE_LOGGING=true ./dist/linux-unpacked/bluos
rm -rf ~/.config/BluOS\ Controller
```
5 changes: 3 additions & 2 deletions bs-bashpatch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eux

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

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

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

# Install dependencies
Expand All @@ -40,7 +41,7 @@ done
npx electron-builder -l AppImage

# Move results
mv dist "$OLDPWD"
mv dist/*.AppImage "$OLDPWD/output"

# Cleanup
cleanup

0 comments on commit 7c9fa5c

Please sign in to comment.