Add presenter to bapsicle.

This commit is contained in:
Matthew Stratford 2021-04-16 20:30:50 +01:00
parent 0dcd0b4ae6
commit 39d352ebec
8 changed files with 67 additions and 18 deletions

View file

@ -19,6 +19,7 @@ jobs:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Build .app - name: Build .app
run: | run: |
npm run presenter-make
build/build-macos.sh build/build-macos.sh
zip -r build/output/BAPSicle.zip build/output/BAPSicle.app zip -r build/output/BAPSicle.zip build/output/BAPSicle.app
- name: Archive Build - name: Archive Build
@ -45,6 +46,7 @@ jobs:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Build executable - name: Build executable
run: | run: |
npm run presenter-make
build/build-linux.sh build/build-linux.sh
- name: Archive Build - name: Archive Build
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@ -70,6 +72,7 @@ jobs:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Build .exe - name: Build .exe
run: | run: |
npm run presenter-make
build/build-windows.bat build/build-windows.bat
- name: Archive Build - name: Archive Build
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2

26
.gitignore vendored
View file

@ -2,31 +2,25 @@
.vscode/settings.json .vscode/settings.json
__pycache__/ __pycache__/
*.egg-info/ *.egg-info/
*.pyo
venv/
build/build-exe-config.json build/build-exe-config.json
build/build-exe-pyinstaller-command.bat
build/build-exe-pyinstaller-command.sh
build/build/BAPSicle/
build/output/
*.spec
install/*.exe install/*.exe
install/nssm install/nssm
*.pyo
*.spec
build/build-exe-pyinstaller-command.bat
build/build/BAPSicle/
build/output/
build.py build.py
venv/
dev/welcome.mp3 dev/welcome.mp3
build/build-exe-pyinstaller-command.sh
music-tmp/ music-tmp/
presenter-build

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "presenter"]
path = presenter
url = https://github.com/michael-grace/WebStudio.git

12
package-lock.json generated Normal file
View file

@ -0,0 +1,12 @@
{
"name": "bapsicle",
"version": "0.1.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "0.1.0",
"license": "ISC"
}
}
}

26
package.json Normal file
View file

@ -0,0 +1,26 @@
{
"name": "bapsicle",
"version": "0.1.0",
"description": "Broadcast Playout System",
"main": "index.js",
"directories": {
"doc": "docs",
"test": "tests"
},
"scripts": {
"presenter-install": "cd presenter && git submodule update --init && yarn --network-timeout 100000",
"presenter-make": "npm run presenter-install && (rm -r presenter-build || true) && cd presenter && yarn build && cp -r build ../presenter-build && cd ../ && npm install",
"test": "echo \"Error: no test specified\" && exit 1",
"presenter-start": "cd presenter && yarn start"
},
"repository": {
"type": "git",
"url": "git+https://github.com/universityradioyork/bapsicle.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/universityradioyork/bapsicle/issues"
},
"homepage": "https://github.com/universityradioyork/bapsicle#readme"
}

1
presenter Submodule

@ -0,0 +1 @@
Subproject commit 68b5091b5853dab6ee9ace542eb6fe0a8dc1edf0

View file

@ -502,6 +502,16 @@ def serve_static(path: str):
return send_from_directory("ui-static", path) return send_from_directory("ui-static", path)
@app.route("/presenter/")
def serve_presenter_index():
return send_from_directory("presenter-build", "index.html")
@app.route("/presenter/<path:path>")
def serve_presenter_static(path: str):
return send_from_directory("presenter-build", path)
def startServer(): def startServer():
process_title = "startServer" process_title = "startServer"
setproctitle(process_title) setproctitle(process_title)

View file

@ -13,8 +13,8 @@
</div> </div>
<hr> <hr>
<p>Wanted the actual playout controller?</p> <p>Wanted the actual playout controller?</p>
<a href="#" class="btn btn-primary btn-user btn-block"> <a href="/presenter/" class="btn btn-primary btn-user btn-block">
Open WebStudio Open BAPS Presenter
</a> </a>
<hr> <hr>
<p>Version: {{data.server_version}} - Build: {{data.server_build}}</p> <p>Version: {{data.server_version}} - Build: {{data.server_build}}</p>