Skip to content

Commit 86e84a2

Browse files
committed
Provides a jump link for multiple machine formation sample programs.
1 parent 5b0b819 commit 86e84a2

File tree

3 files changed

+100
-1
lines changed

3 files changed

+100
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,8 @@ Specific to the content and description of each package, you can refer to the re
3333

3434
## Contact Information
3535

36-
If you have any questions about this sample code and the installation, please feel free to contact me. You can communicate with me by sending e-mail to sdk@ryzerobotics.com.
36+
If you have any questions about this sample code and the installation, please feel free to contact me. You can communicate with me by sending e-mail to sdk@ryzerobotics.com.
37+
38+
## About Multi-Tello-Formation
39+
40+
Please refer to github repository https://github.com/TelloSDK/Multi-Tello-Formation.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"python 2.7.15 (64-bit)" Start...2018/12/07 ���� 20:19:25.96
2+
ERRORLEVEL:0
3+
python 2.7.15 (64-bit) End 2018/12/07 ���� 20:24:09.21
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
@echo off
2+
::runas administrator
3+
%1 start "" mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
4+
setlocal enabledelayedexpansion
5+
call :setdir
6+
call :configx86orx64
7+
set "pythondir=c:\python27"
8+
set "libboostdir=c:\local\boost_1_68_0"
9+
set "logfile=%~dp0\UnInstallLog.txt"
10+
set extract=extract
11+
echo ------------------------------------------------------
12+
echo Uninstalling python27
13+
echo ------------------------------------------------------
14+
call :uninstallmsiPackage "%python27Name%" "%python27Name%"
15+
if exist %pythondir% rmdir /s /q %pythondir%
16+
if exist %pythondir% rd /s /q %pythondir%
17+
set delPythonPath=%PATH:;c:\python27=%
18+
set delPythonExt=%PATHEXT:;.PY;.PYM=%
19+
wmic ENVIRONMENT where "name='PATH' and username='<system>'" set VariableValue="%delPythonPath%"
20+
wmic ENVIRONMENT where "name='PATHEXT' and username='<system>'" set VariableValue="%delPythonExt%"
21+
echo ------------------------------------------------------
22+
echo Uninstalling libboost
23+
echo ------------------------------------------------------
24+
if exist %libboostdir% rd /s /q %libboostdir%
25+
echo ------------------------------------------------------
26+
echo Uninstalling ffmpeg
27+
echo ------------------------------------------------------
28+
if exist %extract% rd /s /q %extract%
29+
echo ------------------------------------------------------
30+
echo Cleaning downloaded files
31+
echo ------------------------------------------------------
32+
del /f /q %pythonPackage%
33+
del /f /q %pipPackage%
34+
del /f /q %ffmpegPackage%
35+
del /f /q %libboostPackage%
36+
echo ------------------------------------------------------
37+
echo Uninstallation done.
38+
echo ------------------------------------------------------
39+
pause
40+
goto :eof
41+
42+
::-----------------下面是目录切换定义区域-----------------
43+
::在管理员模式执行时,默认路径变更,此处将目录切换回来
44+
:setdir
45+
set char=%~dp0%
46+
%char:~0,2%
47+
cd %~dp0%
48+
goto :eof
49+
50+
::-----------------下面是版本函数定义区域-----------------
51+
:configx86orx64
52+
IF %PROCESSOR_ARCHITECTURE% == AMD64 (
53+
set versionFlag=win64
54+
) else (
55+
set versionFlag=win32
56+
)
57+
58+
echo Windows Version: %versionFlag%
59+
if %versionFlag%==win64 (
60+
set "python27Name=python 2.7.15 (64-bit)"
61+
set "python27ProductCode=20C31435-2A0A-4580-BE8B-AC06FC243CA5"
62+
set pythonPackage=python-2.7.15.amd64.msi
63+
set pipPackage=get-pip.py
64+
set ffmpegPackage=ffmpeg-20180825-844ff49-win64-shared.zip
65+
set libboostPackage="boost_1_68_0-msvc-12.0-64.exe"
66+
) else (
67+
set "python27Name=Python 2.7.15"
68+
set "python27ProductCode=20C31435-2A0A-4580-BE8B-AC06FC243CA4"
69+
set pythonPackage=python-2.7.15.msi
70+
set pipPackage=get-pip.py
71+
set ffmpegPackage=ffmpeg-20180825-844ff49-win32-shared.zip
72+
set libboostPackage="boost_1_68_0-msvc-12.0-32.exe"
73+
)
74+
endlocal
75+
goto :eof
76+
77+
::-----------------下面是卸载函数定义区域-----------------
78+
:uninstallmsiPackage
79+
echo Strat uninstalling "%~2"...
80+
echo "%~2" Start...%date% %time%>>%logfile%
81+
FOR /f "tokens=1" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" /e /s /d /f "%~2"^|FINDSTR /i "CurrentVersion"') do (
82+
FOR /f "tokens=1-2,*" %%j in ('reg query "%%i" /f "UninstallString"^|FINDSTR /i "UninstallString"') do (
83+
set correct=%%l && set correct=!correct:/I{=/passive /norestart /x{! && CMD /q /c "!correct!"
84+
)
85+
)
86+
87+
IF %ERRORLEVEL% EQU 0 echo Uninstall %~2 Successfull
88+
IF %ERRORLEVEL% NEQ 0 IF %ERRORLEVEL% NEQ 1605 echo Uninstall %~2 Failed, ERRORLEVEL:%ERRORLEVEL%.
89+
echo ERRORLEVEL:%ERRORLEVEL%>>%logfile%
90+
echo %~2 End %date% %time%>>%logfile%
91+
echo -----------------------------------------------------
92+
goto :eof

0 commit comments

Comments
 (0)