飞猪投屏
This commit is contained in:
commit
d46d35a7e8
5
.idea/.gitignore
generated
vendored
Normal file
5
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
9
.idea/jasen88-toup.iml
generated
Normal file
9
.idea/jasen88-toup.iml
generated
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
6
.idea/misc.xml
generated
Normal file
6
.idea/misc.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/jasen88-toup.iml" filepath="$PROJECT_DIR$/.idea/jasen88-toup.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
BIN
src/AdbWinApi.dll
Normal file
BIN
src/AdbWinApi.dll
Normal file
Binary file not shown.
BIN
src/AdbWinUsbApi.dll
Normal file
BIN
src/AdbWinUsbApi.dll
Normal file
Binary file not shown.
BIN
src/SDL2.dll
Normal file
BIN
src/SDL2.dll
Normal file
Binary file not shown.
BIN
src/adb.exe
Normal file
BIN
src/adb.exe
Normal file
Binary file not shown.
BIN
src/avcodec-61.dll
Normal file
BIN
src/avcodec-61.dll
Normal file
Binary file not shown.
BIN
src/avformat-61.dll
Normal file
BIN
src/avformat-61.dll
Normal file
Binary file not shown.
BIN
src/avutil-59.dll
Normal file
BIN
src/avutil-59.dll
Normal file
Binary file not shown.
BIN
src/icon.png
Normal file
BIN
src/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
src/libusb-1.0.dll
Normal file
BIN
src/libusb-1.0.dll
Normal file
Binary file not shown.
1
src/open_a_terminal_here.bat
Normal file
1
src/open_a_terminal_here.bat
Normal file
@ -0,0 +1 @@
|
||||
@cmd
|
||||
131
src/scrcpy-5.bat
Normal file
131
src/scrcpy-5.bat
Normal file
@ -0,0 +1,131 @@
|
||||
::[Bat To Exe Converter]
|
||||
::
|
||||
::fBE1pAF6MU+EWHreyHcjLQlHcCWxCViGIroL5uT07u6UnkccR+cxINeWzrubMK1C1lbnZ5U9zzcP1skNGHs=
|
||||
::fBE1pAF6MU+EWHreyHcjLQlHcCWxCViGIroL5uT07u6UnkccR+cxINeWzrubMK1C1kznephjxnRd+A==
|
||||
::fBE1pAF6MU+EWHreyHcjLQlHcCWxCViGIroL5uT07u6UnkccR+cxINeWzrubMK1C1kTgd9gozn86
|
||||
::fBE1pAF6MU+EWHreyHcjLQlHcCWxCViGIroL5uT07u6UnkccR+cxINeWzrubMK1C1mTgd6Ek2FtKkYUIABc4
|
||||
::fBE1pAF6MU+EWHreyHcjLQlHcCWxCViGIroL5uT07u6UnkccR+cxINeWzrubMK1C1mTgd6Ek2E9JmuocBVVcch7L
|
||||
::fBE1pAF6MU+EWHreyHcjLQlHcCWxCViGIroL5uT07u6UnkccR+cxINeWzrubMK1C1kTydpkp03kXzppCCBdUHg==
|
||||
::fBE1pAF6MU+EWHreyHcjLQlHcCWxCViGIroL5uT07u6UnkccR+cxINeWzrubMK1C1kTyc5k/23tO1Z1dQh9UcnI=
|
||||
::fBE1pAF6MU+EWHreyHcjLQlHcCWxCViGIroL5uT07u6UnkccR+cxINeWzrubMK1C1kTyYIIk2jcPwYUIABc4
|
||||
::fBE1pAF6MU+EWHreyHcjLQlHcCWxCViGIroL5uT07u6UnkccR+cxINeWzrubMK1C1kntd4M+1DcL1ptCCBdUHg==
|
||||
::fBE1pAF6MU+EWHreyHcjLQlHcCWxCViGIroL5uT07u6UnkccR+cxINeWzrubMK1C1kr0cJgS10VOndkBBRVZci2jax0x52xDogQ=
|
||||
::fBE1pAF6MU+EWHreyHcjLQlHcCWxCViGIroL5uT07u6UnkccR+cxINeWzrubMK1C1lbnZ5U9zzRfgM5s
|
||||
::fBE1pAF6MU+EWHreyHcjLQlHcCWxCViGIroL5uT07u6UnkccR+cxINeWzrubMK1C1lbnZ5U9zzdZl8UfAxddMBCqem8=
|
||||
::fBE1pAF6MU+EWHreyHcjLQlHcCWxCViGIroL5uT07u6UnkccR+cxINeWzrubMK1C1lbnZ5U9zzdUl8gDAghXchfleA0nyQ==
|
||||
::fBE1pAF6MU+EWHreyHcjLQlHcCWxCViGIroL5uT07u6UnkccR+cxINeWzrubMK1C1lbnZ5U9zzdJndkaCQk4
|
||||
::fBE1pAF6MU+EWHreyHcjLQlHcCWxCViGIroL5uT07u6UnkccR+cxINeWzrubMK1C1nbAWcRj0nZW+A==
|
||||
::fBE1pAF6MU+EWHreyHcjLQlHcCWxCViGIroL5uT07u6UnkccR+cxINeWzrubMK1C1lbzZ5M+13dKlM5BWVVcch7L
|
||||
::YAwzoRdxOk+EWAjk
|
||||
::fBw5plQjdCyDJGyX8VAjFDpneTe+GG6pDaET+NT55v6Ft0oiUuMpcYzU1PqHI+9z
|
||||
::YAwzuBVtJxjWCl3EqQJgSA==
|
||||
::ZR4luwNxJguZRRnk
|
||||
::Yhs/ulQjdF25
|
||||
::cxAkpRVqdFKZSDk=
|
||||
::cBs/ulQjdF25
|
||||
::ZR41oxFsdFKZSDk=
|
||||
::eBoioBt6dFKZSDk=
|
||||
::cRo6pxp7LAbNWATEpSI=
|
||||
::egkzugNsPRvcWATEpCI=
|
||||
::dAsiuh18IRvcCxnZtBJQ
|
||||
::cRYluBh/LU+EWAnk
|
||||
::YxY4rhs+aU+JeA==
|
||||
::cxY6rQJ7JhzQF1fEqQJQ
|
||||
::ZQ05rAF9IBncCkqN+0xwdVs0
|
||||
::ZQ05rAF9IAHYFVzEqQJQ
|
||||
::eg0/rx1wNQPfEVWB+kM9LVsJDGQ=
|
||||
::fBEirQZwNQPfEVWB+kM9LVsJDGQ=
|
||||
::cRolqwZ3JBvQF1fEqQJQ
|
||||
::dhA7uBVwLU+EWDk=
|
||||
::YQ03rBFzNR3SWATElA==
|
||||
::dhAmsQZ3MwfNWATElA==
|
||||
::ZQ0/vhVqMQ3MEVWAtB9wSA==
|
||||
::Zg8zqx1/OA3MEVWAtB9wSA==
|
||||
::dhA7pRFwIByZRRnk
|
||||
::Zh4grVQjdCyDJGyX8VAjFDpneTe+GG6pDaET+NTx7vmCrBVF3SHB/2MRlzJk1WXCBVO1O8R8mH9Cnas=
|
||||
::YB416Ek+ZG8=
|
||||
::
|
||||
::
|
||||
::978f952a14a936cc963da21a135fa983
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
:: 窗口大小
|
||||
mode con: cols=50 lines=15
|
||||
|
||||
:: -----------------------------
|
||||
:: scrcpy 和 adb 路径
|
||||
:: 优先使用批处理目录,其次直接 AppData
|
||||
:: -----------------------------
|
||||
if exist "%~dp0scrcpy.exe" (
|
||||
set SCRCPY_PATH=%~dp0scrcpy.exe
|
||||
set ADB_PATH=%~dp0adb.exe
|
||||
) else (
|
||||
set SCRCPY_PATH=%APPDATA%\scrcpy.exe
|
||||
set ADB_PATH=%APPDATA%\adb.exe
|
||||
)
|
||||
|
||||
:: 已启动设备列表
|
||||
set started=
|
||||
|
||||
:: 扫描间隔(秒)
|
||||
set scan_interval=5
|
||||
|
||||
:loop
|
||||
cls
|
||||
echo =========================================
|
||||
echo jasen88飞猪-投屏工具
|
||||
echo =========================================
|
||||
|
||||
:: 统计当前在线设备数量
|
||||
set device_count=0
|
||||
for /f "skip=1 tokens=1,2" %%a in ('"%ADB_PATH%" devices') do (
|
||||
if "%%b"=="device" set /a device_count+=1
|
||||
)
|
||||
|
||||
:: -----------------------------
|
||||
:: 1. 检查已启动设备是否仍在线,如果不在线就移除并提示
|
||||
:: -----------------------------
|
||||
for %%d in (!started!) do (
|
||||
"%ADB_PATH%" -s %%d get-state >nul 2>&1
|
||||
if errorlevel 1 (
|
||||
echo 设备 %%d 已断开!
|
||||
set started=!started: %%d=!
|
||||
)
|
||||
)
|
||||
|
||||
:: -----------------------------
|
||||
:: 2. 扫描当前在线设备,如果未启动则启动并提示
|
||||
:: -----------------------------
|
||||
for /f "skip=1 tokens=1,2" %%a in ('"%ADB_PATH%" devices') do (
|
||||
if "%%b"=="device" (
|
||||
set id=%%a
|
||||
echo !started! | find "%%a" >nul
|
||||
if errorlevel 1 (
|
||||
echo 新设备 %%a 已连接,启动投屏...
|
||||
start "" /B "%SCRCPY_PATH%" -s %%a
|
||||
set started=!started! %%a
|
||||
timeout /t 5 >nul
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
:: -----------------------------
|
||||
:: 3. 动态倒计时显示
|
||||
:: -----------------------------
|
||||
set /a counter=%scan_interval%
|
||||
:cd_loop
|
||||
cls
|
||||
echo =========================================
|
||||
echo jasen88飞猪-投屏工具
|
||||
echo =========================================
|
||||
echo 当前连接设备 %device_count% 个,在 %counter% 秒后扫描新设备...
|
||||
echo ----------------------------------------
|
||||
|
||||
set /a counter-=1
|
||||
if %counter% gtr 0 (
|
||||
ping -n 2 127.0.0.1 >nul
|
||||
goto cd_loop
|
||||
)
|
||||
|
||||
goto loop
|
||||
2
src/scrcpy-console.bat
Normal file
2
src/scrcpy-console.bat
Normal file
@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
scrcpy.exe --pause-on-exit=if-error %*
|
||||
7
src/scrcpy-noconsole.vbs
Normal file
7
src/scrcpy-noconsole.vbs
Normal file
@ -0,0 +1,7 @@
|
||||
strCommand = "cmd /c scrcpy.exe"
|
||||
|
||||
For Each Arg In WScript.Arguments
|
||||
strCommand = strCommand & " """ & replace(Arg, """", """""""""") & """"
|
||||
Next
|
||||
|
||||
CreateObject("Wscript.Shell").Run strCommand, 0, false
|
||||
BIN
src/scrcpy-server
Normal file
BIN
src/scrcpy-server
Normal file
Binary file not shown.
BIN
src/scrcpy.exe
Normal file
BIN
src/scrcpy.exe
Normal file
Binary file not shown.
BIN
src/swresample-5.dll
Normal file
BIN
src/swresample-5.dll
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user