File tree Expand file tree Collapse file tree 3 files changed +3
-24
lines changed
Expand file tree Collapse file tree 3 files changed +3
-24
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,6 @@ This is the NanoKVM-USB desktop version project.
55
66## Development
77
8- Linux build tool chain:
9-
10- ``` shell
11- sudo apt update
12- sudo apt install -y build-essential python3 libudev-dev
13- echo " python=/usr/bin/python3.10" >> ~ /.npmrc # This should match you pyton version.
14- ```
15-
168``` shell
179cd desktop
1810pnpm install
@@ -31,10 +23,3 @@ pnpm build:mac
3123# For Linux
3224pnpm build:linux
3325```
34-
35- # For Linux run and install
36- ``` shell
37- dpkg -i dist/nanokvm-usb_1.0.0_amd64.deb
38- sudo chown root:root /opt/NanoKVM-USB/chrome-sandbox
39- sudo chmod 4755 /opt/NanoKVM-USB/chrome-sandbox
40- ```
Original file line number Diff line number Diff line change 1919 executableName : NanoKVM-USB
2020
2121nsis :
22- oneClick : false # show installer wizard
23- perMachine : true # install for all users
22+ oneClick : false
2423 allowToChangeInstallationDirectory : true
25- allowElevation : true # request elevation when needed
2624 artifactName : ${productName}-${version}-setup.${ext}
2725 shortcutName : ${productName}
2826 uninstallDisplayName : ${productName}
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ function createWindow(): void {
2626 mainWindow . on ( 'ready-to-show' , ( ) => {
2727 mainWindow . show ( )
2828 mainWindow . maximize ( )
29- //mainWindow.webContents.openDevTools()
3029 } )
3130
3231 mainWindow . webContents . setWindowOpenHandler ( ( details ) => {
@@ -45,11 +44,8 @@ app.whenReady().then(() => {
4544 electronApp . setAppUserModelId ( 'com.sipeed.usbkvm' )
4645
4746 session . defaultSession . setPermissionRequestHandler ( ( _ , permission , callback ) => {
48- if ( [ 'media' , 'clipboard-read' ] . includes ( permission ) ) {
49- callback ( true )
50- } else {
51- callback ( false )
52- }
47+ const allowedPermissions = [ 'media' , 'clipboard-read' ]
48+ callback ( allowedPermissions . includes ( permission ) )
5349 } )
5450
5551 app . on ( 'browser-window-created' , ( _ , window ) => {
You can’t perform that action at this time.
0 commit comments