mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-05 10:49:24 +02:00
wip: add scrcpy module
This commit is contained in:
parent
20b914fe6f
commit
c02dea23e8
31 changed files with 2678 additions and 10 deletions
26
libraries/scrcpy/scripts/fetch-server.js
Normal file
26
libraries/scrcpy/scripts/fetch-server.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
const { fetchVersion } = require('gh-release-fetch');
|
||||
const path = require('path');
|
||||
const fs = require('fs').promises;
|
||||
|
||||
const SERVER_VERSION = '1.19';
|
||||
|
||||
(async () => {
|
||||
console.log('Downloading scrcpy server binary...');
|
||||
|
||||
const binFolder = path.resolve(__dirname, '..', 'bin');
|
||||
|
||||
await fetchVersion({
|
||||
repository: 'Genymobile/scrcpy',
|
||||
version: `v${SERVER_VERSION}`,
|
||||
package: `scrcpy-server-v${SERVER_VERSION}`,
|
||||
destination: binFolder,
|
||||
extract: false,
|
||||
});
|
||||
|
||||
await fs.rename(
|
||||
path.resolve(binFolder, `scrcpy-server-v${SERVER_VERSION}`),
|
||||
path.resolve(binFolder, 'scrcpy-server')
|
||||
);
|
||||
|
||||
fs.writeFile(path.resolve(__dirname, '..', 'src', 'version.ts'), `export const BUNDLED_SERVER_VERSION = "${SERVER_VERSION}";`);
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue