Skip to content

Commit

Permalink
ProLinuxD refactor (add state container)
Browse files Browse the repository at this point in the history
  • Loading branch information
Seshpenguin committed Dec 25, 2023
1 parent d2c0902 commit 4cfe38b
Show file tree
Hide file tree
Showing 11 changed files with 402 additions and 262 deletions.
2 changes: 1 addition & 1 deletion distro-files/layout/etc/motd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ Copyright (C) 2023 Seshan Ravikumar
This is free software, and you are welcome to redistribute it
under the conditions of the GNU GPLv3 or later.

Warning: Changes made to the rootfs will not persist.
Warning: Changes made to the rootfs will not persist if the root-lock is enabled.
---

15 changes: 2 additions & 13 deletions ocs2-prolinuxd/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
#!/usr/bin/env bash
set -e
USER=user
HOST=192.168.11.109
HOST=172.16.42.1
PORT=22
DIR=/opt/prolinuxd/

#swift build -c release --static-swift-stdlib
rsync -avz -e "ssh -p ${PORT}" --delete dist/ ${USER}@${HOST}:${DIR}
rsync -avz -e "ssh -p ${PORT}" --delete distro-files/prolinuxd.initd ${USER}@${HOST}:${DIR}
rsync -avz -e "ssh -p ${PORT}" --delete distro-files/session-wrapper.desktop ${USER}@${HOST}:${DIR}
#rsync -avz -e "ssh -p ${PORT}" --delete distro-files/prolinux.toml ${USER}@${HOST}:${DIR}
rsync -avz -e "ssh -p ${PORT}" --delete distro-files/prolinuxd ${USER}@${HOST}:${DIR}
rsync -avz -e "ssh -p ${PORT}" --delete distro-files/plctl ${USER}@${HOST}:${DIR}
#rsync -avz -e "ssh -p ${PORT}" --delete distro-files/aarch64-alpine-pty.node ${USER}@${HOST}:${DIR}/session-wrapper/build/Release/pty.node
rsync -avz -e "ssh -p ${PORT}" --delete distro-files/prolinux-config.desktop ${USER}@${HOST}:${DIR}
rsync -avz -e "ssh -p ${PORT}" --delete distro-files/app-icon.png ${USER}@${HOST}:${DIR}


rsync -avz -e "ssh -p ${PORT}" dist/ ${USER}@${HOST}:${DIR}
exit 0
128 changes: 128 additions & 0 deletions ocs2-prolinuxd/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions ocs2-prolinuxd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "ts-node src/index.ts",
"build_app": "ncc build app-src/prolinux-config.ts --v8-cache -m -o dist/prolinux-config",
"build_cli": "ncc build cli-src/plctl.ts --v8-cache -m -o dist/prolinux-cli",
"clone_plamo_nightly": "if cd plasma-mobile-nightly; then git pull; else git clone https://github.com/Sineware/plasma-mobile-nightly.git; fi",
"build_plama_nightly": "ncc build plasma-mobile-nightly/src/index.ts --v8-cache -m -o dist/plasma-mobile-nightly",
"build": "ncc build session-wrapper-src/wrapper.ts --v8-cache -m -o dist/session-wrapper && ncc build src/index.ts --v8-cache -m -o dist/ && npm run build_app && npm run build_cli"
"build": "tsc"
},
"author": "Seshan Ravikumar",
"license": "GPL-2.0",
"devDependencies": {
"@types/deep-extend": "^0.6.2",
"@types/lodash": "^4.14.200",
"@types/node": "^18.11.17",
"@types/uuid": "^9.0.0",
"@types/ws": "^8.5.3",
"@types/deep-extend": "^0.6.2",
"@types/lodash": "^4.14.200",
"ts-node": "^10.9.1",
"typescript": "^4.9.4"
},
Expand All @@ -32,6 +28,7 @@
"is-reachable": "^5.2.1",
"node-pty": "^0.10.1",
"uuid": "^9.0.0",
"valtio": "^1.12.1",
"ws": "^8.11.0",
"zod": "^3.20.2"
}
Expand Down
5 changes: 5 additions & 0 deletions ocs2-prolinuxd/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export enum LocalActions {
SET_REMOTE_API = "set-remote-api",
SET_RESET_PERSISTROOT_FLAG = "set-reset-persistroot-flag",
}
export interface LocalWSMessage {
action: LocalActions,
payload: any,
id?: string | null
}
export interface ProLinuxInfo {
buildnum: string,
uuid: string,
Expand Down

0 comments on commit 4cfe38b

Please sign in to comment.