Skip to content

Commit fc2a994

Browse files
committed
feat: rebase
1 parent 82d930d commit fc2a994

File tree

19 files changed

+2482
-1245
lines changed

19 files changed

+2482
-1245
lines changed

.husky/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ command_exists () {
55
# Workaround for Windows 10, Git Bash, and Yarn
66
if command_exists winpty && test -t 1; then
77
exec < /dev/tty
8-
fi
8+
fi

examples/bs-app-updater-example/README.md

Lines changed: 0 additions & 64 deletions
This file was deleted.

examples/bs-app-updater-example/index.ts

Lines changed: 0 additions & 146 deletions
This file was deleted.

examples/bs-app-updater-example/package.json

Lines changed: 0 additions & 22 deletions
This file was deleted.
-919 KB
Binary file not shown.

examples/bs-app-updater-example/server/index.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

examples/bs-app-updater-example/server/package.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

examples/bs-app-updater-example/tsconfig.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

examples/bs-app-updater-example/webpack.config.js

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# bs-self-updater
2+
3+
A simple self-updating application written using TypeScript and designed to run on BrightSign players.
4+
5+
## Overview
6+
7+
`bs-app-updater` is a lightweight utility that allows an application running on BrightSign players to update itself by downloading and applying a new `autorun.zip` package. This enables remote updates and maintenance of deployed applications with minimal effort.
8+
9+
## Features
10+
11+
- Calls a configurable server endpoint to download the `autorun.zip` application to run on the player.
12+
- See `SERVER_URL` in `index.ts`.
13+
- Unzips the downloaded package and executes the `autorun.brs` file from the unzipped package.
14+
- Makes periodic calls to the server to check for any updates to the `autorun.zip` file.
15+
16+
## Getting Started
17+
18+
### Prerequisites
19+
20+
- Node.js (v18 or later recommended)
21+
- npm (Node Package Manager)
22+
23+
### Installation
24+
25+
1. Clone this repository or copy the code to your project directory.
26+
2. Install dependencies (if any):
27+
```sh
28+
npm install
29+
```
30+
31+
### Build
32+
33+
Run the following command to compile the TypeScript code into JavaScript:
34+
35+
```sh
36+
npm run build
37+
```
38+
39+
### Deploy and run on player
40+
41+
1. Copy the `autorun.brs` file and `dist/index.js` files to the root of an SD card.
42+
- /storage/sd/autorun.brs
43+
- /storage/sd/index.js
44+
2. Insert the SD card into the BrightSign player.
45+
3. Boot up the player.
46+
47+
## Optional: Local Node.js Server for Testing
48+
49+
You can run a simple Node.js server locally to serve the `autorun.zip` file expected by the JS app. This is useful for development and testing.
50+
51+
### To start the server:
52+
53+
1. Navigate to the `server` directory:
54+
```sh
55+
cd server
56+
```
57+
2. Install dependencies:
58+
```sh
59+
npm install
60+
```
61+
3. Build the app:
62+
```sh
63+
npm run build
64+
```
65+
4. Start the server:
66+
```sh
67+
npm start
68+
```
69+
5. The server will listen on port 7000 by default and has a single endpoint to serve the `autorun.zip` file:
70+
```
71+
http://localhost:7000/autorun.zip
72+
```

0 commit comments

Comments
 (0)