@echo off
|
|
set "a=%~dp0"
|
rem echo %a%
|
set a=%a:\=\\%
|
rem echo %a%
|
set b="%a%Mixly.exe"
|
rem echo %b%
|
wmic process where 'executablepath=%b%' call Terminate > nul
|
|
"%~dp0\Git\cmd\git" config --global --add safe.directory "%~dp0"
|
"%~dp0\Git\cmd\git" config --system core.longpaths true
|
|
rem ɾ³ý.git_win_stm32Îļþ¼Ð
|
if exist "%~dp0\.git_win_stm32" (
|
attrib -h "%~dp0\.git_win_stm32"
|
del /f /s /q "%~dp0\.git_win_stm32" > nul
|
rd /q /s "%~dp0\.git_win_stm32" > nul
|
)
|
|
rem Åжϵ±Ç°Ä¿Â¼ÏÂÊÇ·ñÓÐ.gitĿ¼£¬Èç¹ûÓÐÔòÊ×ÏȽ«.gitĿ¼ֻ¶ÁÊôÐÔÈ¥³ý£¬²¢½«ÆäÖØÃüÃû
|
if exist "%~dp0"\.git (
|
attrib -h "%~dp0\.git"
|
attrib -h "%~dp0\.git_mixly"
|
attrib -h "%~dp0\.git_win_avr"
|
attrib -h "%~dp0\.git_win_esp8266"
|
attrib -h "%~dp0\.git_win_esp32"
|
attrib -h "%~dp0\.git_arduino_libs"
|
if not exist "%~dp0\.git_mixly" (
|
ren "%~dp0\.git\" .git_mixly
|
attrib +h "%~dp0\.git_mixly"
|
) ELSE IF not exist "%~dp0\.git_win_avr" (
|
ren "%~dp0\.git\" .git_win_avr
|
attrib +h "%~dp0\.git_win_avr"
|
) ELSE IF not exist "%~dp0\.git_win_esp8266" (
|
ren "%~dp0\.git\" .git_win_esp8266
|
attrib +h "%~dp0\.git_win_esp8266"
|
) ELSE IF not exist "%~dp0\.git_win_esp32" (
|
ren "%~dp0\.git\" .git_win_esp32
|
attrib +h "%~dp0\.git_win_esp32"
|
) ELSE IF not exist "%~dp0\.git_arduino_libs" (
|
ren "%~dp0\.git\" .git_arduino_libs
|
attrib +h "%~dp0\.git_arduino_libs"
|
) ELSE (
|
del /f /s /q "%~dp0"\.git > nul
|
rd /q /s "%~dp0"\.git > nul
|
)
|
)
|
|
rem ɾ³ý.gitĿ¼ÏÂindex.lock
|
IF EXIST "%~dp0\.git_mixly\index.lock" (
|
del /f /s /q "%~dp0\.git_mixly\index.lock" > nul
|
rd /q /s "%~dp0\.git_mixly\index.lock" > nul
|
)
|
|
IF EXIST "%~dp0\.git_win_avr\index.lock" (
|
del /f /s /q "%~dp0\.git_win_avr\index.lock" > nul
|
rd /q /s "%~dp0\.git_win_avr\index.lock" > nul
|
)
|
|
IF EXIST "%~dp0\.git_win_esp8266\index.lock" (
|
del /f /s /q "%~dp0\.git_win_esp8266\index.lock" > nul
|
rd /q /s "%~dp0\.git_win_esp8266\index.lock" > nul
|
)
|
|
IF EXIST "%~dp0\.git_win_esp32\index.lock" (
|
del /f /s /q "%~dp0\.git_win_esp32\index.lock" > nul
|
rd /q /s "%~dp0\.git_win_esp32\index.lock" > nul
|
)
|
|
echo µ±Ç°Â·¾¶Îª"%~dp0"
|
|
@echo off
|
title Mixly2.0 °²×°^&Éý¼¶ÖúÊÖ
|
@echo off
|
echo.
|
echo ***************************Mixly2.0 °²×°^&Éý¼¶ÖúÊÖ****************************
|
echo ¸ÐлÄúÑ¡ÔñʹÓÃMixly2.0Èí¼þ£¬Èç¹ûÄúÊǵÚÒ»´ÎʹÓñ¾Èí¼þ£¬Çë×ÐϸÔĶÁ±¾ËµÃ÷¡£
|
echo.
|
echo.
|
echo ĿǰMixly2.0Èí¼þÖ§³Ö¶Ô¶àÖÖÓ²¼þµÄ±à³Ì£¬ÒòΪ֧³ÖËùÓÐÓ²¼þ±à³ÌÐèÒªÕ¼ÓÃÄúÓ²Å̽ϴóµÄ¿Õ¼ä£¬Äú¿ÉÒÔÑ¡ÔñÖ»°²×°ÄúÐèÒªÓõ½µÄ²¿·Ö¹¦Äܼ´¿É¡£
|
echo.
|
echo Mixly2.0Èí¼þÖ§³ÖµÄÓ²¼þ£¬¾ßÌå˵Ã÷ÈçÏ£º
|
echo ¡¤MicroPython/CircuitPython ESP32ϵÁпª·¢°å(MicroPython[ESP32_MixGo]¡¢CircuitPython[ESP32S2_MixGoCE]µÈ)ΪĬÈÏÖ§³Ö£¬ÎÞÐèÑ¡Ôñ¡£
|
echo ¡¤Python(´¿Python,ÎÞÐèÓ²¼þ£¬Ö§³ÖͼÐλ¯ºÍ´úÂ뻥Ïàת»»)ΪĬÈÏÖ§³Ö£¬ÎÞÐèÑ¡Ôñ¡£
|
echo ¡¤Arduino AVRϵÁпª·¢°å£¨°üÀ¨Arduino UNO,Nano,Mega 2560,Pro Mini µÈ£©
|
echo ¡¤Arduino ESP8266ϵÁпª·¢°å£¨°üÀ¨WeMos D1,NodeMCU µÈ£©
|
echo ¡¤Arduino ESP32ϵÁпª·¢°å£¨°üÀ¨MixGo,ÆÕͨESP32¿ª·¢°åµÈ£©
|
echo.
|
echo.
|
echo °²×°^&Éý¼¶¼´½«¿ªÊ¼£¬Äú¿ÉÒÔÑ¡Ôñ°²×°²¿·Ö¹¦ÄÜ£¬ÊäÈëy±íʾ°²×°¸Ã¹¦ÄÜ£¬ÊäÈën±íʾ²»°²×°¸Ã¹¦ÄÜ¡£
|
@echo off
|
|
rem ѯÎÊÓû§ÊÇ·ñ°²×°Arduino ESP8266
|
echo.
|
set esp8266_select=
|
set /p esp8266_select=°²×° Arduino ESP8266(y/n):
|
IF "%esp8266_select%"=="n" (
|
echo No
|
) ELSE (
|
echo Yes
|
)
|
|
rem ѯÎÊÓû§ÊÇ·ñ°²×°Arduino ESP32
|
echo.
|
set esp32_select=
|
set /p esp32_select=°²×° Arduino ESP32(y/n):
|
IF "%esp32_select%"=="n" (
|
echo No
|
) ELSE (
|
echo Yes
|
)
|
|
rem ѯÎÊÓû§¸üкóÊÇ·ñÆô¶¯Mixly
|
echo.
|
set start_mixly=
|
set /p start_mixly=¸üнáÊøºóÆô¶¯ Mixly2.0(y/n):
|
IF "%start_mixly%"=="y" (
|
echo Yes
|
) ELSE (
|
echo No
|
)
|
|
rem ¸üÐÂMixly2.0
|
attrib -h "%~dp0\.git_mixly"
|
ren "%~dp0\.git_mixly\" .git
|
|
@echo on
|
echo Mixly2.0 ÕýÔÚÉý¼¶ÖУ¬ÇëµÈ´ý...
|
@echo off
|
cd "%~dp0\Git\cmd\"
|
git fetch --all
|
git reset --hard origin/master
|
git pull origin master
|
git submodule init
|
git submodule update
|
git submodule foreach "git fetch --all && git reset --hard origin/master && git pull origin master"
|
@echo off
|
rd/s/q "%~dp0\.git\logs\"
|
git gc
|
git prune
|
git clean -f .git/index.lock
|
@echo on
|
echo Mixly2.0¸üÐÂÍê³É
|
@echo off
|
|
ren "%~dp0\.git\" .git_mixly
|
attrib +h "%~dp0\.git_mixly"
|
|
echo.
|
echo.
|
|
rem ¸üÐÂArduino AVR °ü
|
attrib -h "%~dp0\.git_win_avr"
|
ren "%~dp0\.git_win_avr\" .git
|
|
@echo on
|
echo Arduino AVR °üÕýÔÚÉý¼¶ÖУ¬ÇëµÈ´ý...
|
@echo off
|
cd "%~dp0\Git\cmd\"
|
git fetch --all
|
git reset --hard origin/master
|
git pull origin master
|
|
@echo off
|
rd/s/q "%~dp0\.git\logs\"
|
git gc
|
git prune
|
git clean -f .git/index.lock
|
@echo on
|
echo Arduino AVR °ü¸üÐÂÍê³É
|
@echo off
|
|
ren "%~dp0\.git\" .git_win_avr
|
attrib +h "%~dp0\.git_win_avr"
|
|
echo.
|
echo.
|
|
IF not exist "%~dp0\.git_arduino_libs" (
|
@echo on
|
echo ¿Ë¡ Arduino Libs °üÖУ¬ÇëµÈ´ý...
|
@echo off
|
IF EXIST "%~dp0\arduino-cli\libraries" (
|
del /f /s /q "%~dp0\arduino-cli\libraries" > nul
|
rd /q /s "%~dp0\arduino-cli\libraries" > nul
|
)
|
IF EXIST "%~dp0\gitDir" (
|
del /f /s /q "%~dp0\gitDir" > nul
|
rd /q /s "%~dp0\gitDir" > nul
|
)
|
mkdir "%~dp0\gitDir"
|
git clone https://gitee.com/mixly2/arduino-libs.git "%~dp0\gitDir"
|
attrib -h "%~dp0\gitDir\.git"
|
ren "%~dp0\gitDir\.git" .git_arduino_libs
|
echo A|xcopy "%~dp0\gitDir\.git_arduino_libs" "%~dp0\.git_arduino_libs\" /s /c /h > nul
|
|
attrib +h "%~dp0\.git_arduino_libs"
|
|
IF EXIST "%~dp0\gitDir" (
|
del /f /s /q "%~dp0\gitDir" > nul
|
rd /q /s "%~dp0\gitDir" > nul
|
)
|
@echo on
|
echo Arduino Libs ¿Ë¡Íê³É
|
@echo off
|
echo.
|
echo.
|
)
|
|
IF EXIST "%~dp0\.git_arduino_libs" (
|
rem ¸üÐÂArduino-libs
|
attrib -h "%~dp0\.git_arduino_libs"
|
ren "%~dp0\.git_arduino_libs\" .git
|
|
@echo on
|
echo Arduino Libs °üÕýÔÚÉý¼¶ÖУ¬ÇëµÈ´ý...
|
@echo off
|
cd "%~dp0\Git\cmd\"
|
git fetch --all
|
git reset --hard origin/master
|
git pull origin master
|
|
@echo off
|
rd/s/q "%~dp0\.git\logs\"
|
git gc
|
git prune
|
git clean -f .git/index.lock
|
@echo on
|
echo Arduino Libs °ü¸üÐÂÍê³É
|
@echo off
|
|
ren "%~dp0\.git\" .git_arduino_libs
|
attrib +h "%~dp0\.git_arduino_libs"
|
|
echo.
|
echo.
|
)
|
|
IF "%esp8266_select%"=="n" (
|
rem ɾ³ýArduino ESP8266°ü
|
IF EXIST "%~dp0\arduino-cli\Arduino15\packages\esp8266" (
|
del /f /s /q "%~dp0\arduino-cli\Arduino15\packages\esp8266" > nul
|
rd /q /s "%~dp0\arduino-cli\Arduino15\packages\esp8266" > nul
|
)
|
rem ɾ³ýArduino ESP8266°å¿¨Ò³Ãæ
|
IF EXIST "%~dp0\resources\app\board\arduino_esp8266" (
|
del /f /s /q "%~dp0\resources\app\board\arduino_esp8266" > nul
|
rd /q /s "%~dp0\resources\app\board\arduino_esp8266" > nul
|
)
|
attrib -h "%~dp0\.git_win_esp8266"
|
rem ɾ³ýArduino ESP8266 .git\objects
|
IF EXIST "%~dp0\.git_win_esp8266\objects" (
|
del /f /s /q "%~dp0\.git_win_esp8266\objects" > nul
|
rd /q /s "%~dp0\.git_win_esp8266\objects" > nul
|
)
|
rem ɾ³ýArduino ESP8266 .git\refs
|
IF EXIST "%~dp0\.git_win_esp8266\refs" (
|
del /f /s /q "%~dp0\.git_win_esp8266\refs" > nul
|
rd /q /s "%~dp0\.git_win_esp8266\refs" > nul
|
)
|
md "%~dp0\.git_win_esp8266\objects" > nul
|
md "%~dp0\.git_win_esp8266\objects\info" > nul
|
md "%~dp0\.git_win_esp8266\objects\pack" > nul
|
md "%~dp0\.git_win_esp8266\refs" > nul
|
md "%~dp0\.git_win_esp8266\refs\heads" > nul
|
md "%~dp0\.git_win_esp8266\refs\tags" > nul
|
IF EXIST "%~dp0\.git_win_esp8266\index" (
|
del "%~dp0\.git_win_esp8266\index" > nul
|
)
|
IF EXIST "%~dp0\.git_win_esp8266\ORIG_HEAD" (
|
del "%~dp0\.git_win_esp8266\ORIG_HEAD" > nul
|
)
|
IF EXIST "%~dp0\.git_win_esp8266\packed-refs" (
|
del "%~dp0\.git_win_esp8266\packed-refs" > nul
|
)
|
attrib +h "%~dp0\.git_win_esp8266"
|
) ELSE (
|
rem ¸üÐÂArduino ESP8266 °ü
|
attrib -h "%~dp0\.git_win_esp8266"
|
ren "%~dp0\.git_win_esp8266\" .git
|
|
@echo on
|
echo Arduino ESP8266 °üÕýÔÚÉý¼¶ÖУ¬ÇëµÈ´ý...
|
@echo off
|
cd "%~dp0\Git\cmd\"
|
git fetch --all
|
git reset --hard origin/master
|
git pull origin master
|
|
@echo off
|
rd/s/q "%~dp0\.git\logs\"
|
git gc
|
git prune
|
git clean -f .git/index.lock
|
@echo on
|
echo Arduino ESP8266 °ü¸üÐÂÍê³É
|
@echo off
|
|
ren "%~dp0\.git\" .git_win_esp8266
|
attrib +h "%~dp0\.git_win_esp8266"
|
|
echo.
|
echo.
|
)
|
|
IF "%esp32_select%"=="n" (
|
rem ɾ³ýArduino ESP32°ü
|
IF EXIST "%~dp0\arduino-cli\Arduino15\packages\esp32" (
|
del /f /s /q "%~dp0\arduino-cli\Arduino15\packages\esp32" > nul
|
rd /q /s "%~dp0\arduino-cli\Arduino15\packages\esp32" > nul
|
)
|
rem ɾ³ýArduino ESP32°å¿¨Ò³Ãæ
|
IF EXIST "%~dp0\resources\app\board\arduino_esp32" (
|
del /f /s /q "%~dp0\resources\app\board\arduino_esp32" > nul
|
rd /q /s "%~dp0\resources\app\board\arduino_esp32" > nul
|
)
|
rem ɾ³ýArduino ESP32C3°å¿¨Ò³Ãæ
|
IF EXIST "%~dp0\resources\app\board\arduino_esp32c3" (
|
del /f /s /q "%~dp0\resources\app\board\arduino_esp32c3" > nul
|
rd /q /s "%~dp0\resources\app\board\arduino_esp32c3" > nul
|
)
|
rem ɾ³ýArduino ESP32S2°å¿¨Ò³Ãæ
|
IF EXIST "%~dp0\resources\app\board\arduino_esp32s2" (
|
del /f /s /q "%~dp0\resources\app\board\arduino_esp32s2" > nul
|
rd /q /s "%~dp0\resources\app\board\arduino_esp32s2" > nul
|
)
|
rem ɾ³ýArduino ESP32S3°å¿¨Ò³Ãæ
|
IF EXIST "%~dp0\resources\app\board\arduino_esp32s3" (
|
del /f /s /q "%~dp0\resources\app\board\arduino_esp32s3" > nul
|
rd /q /s "%~dp0\resources\app\board\arduino_esp32s3" > nul
|
)
|
attrib -h "%~dp0\.git_win_esp32"
|
rem ɾ³ýArduino ESP32 .git\objects
|
IF EXIST "%~dp0\.git_win_esp32\objects" (
|
del /f /s /q "%~dp0\.git_win_esp32\objects" > nul
|
rd /q /s "%~dp0\.git_win_esp32\objects" > nul
|
)
|
rem ɾ³ýArduino ESP32 .git\refs
|
IF EXIST "%~dp0\.git_win_esp32\refs" (
|
del /f /s /q "%~dp0\.git_win_esp32\refs" > nul
|
rd /q /s "%~dp0\.git_win_esp32\refs" > nul
|
)
|
md "%~dp0\.git_win_esp32\objects" > nul
|
md "%~dp0\.git_win_esp32\objects\info" > nul
|
md "%~dp0\.git_win_esp32\objects\pack" > nul
|
md "%~dp0\.git_win_esp32\refs" > nul
|
md "%~dp0\.git_win_esp32\refs\heads" > nul
|
md "%~dp0\.git_win_esp32\refs\tags" > nul
|
IF EXIST "%~dp0\.git_win_esp32\index" (
|
del "%~dp0\.git_win_esp32\index" > nul
|
)
|
IF EXIST "%~dp0\.git_win_esp32\ORIG_HEAD" (
|
del "%~dp0\.git_win_esp32\ORIG_HEAD" > nul
|
)
|
IF EXIST "%~dp0\.git_win_esp32\packed-refs" (
|
del "%~dp0\.git_win_esp32\packed-refs" > nul
|
)
|
attrib +h "%~dp0\.git_win_esp32"
|
) ELSE (
|
rem ¸üÐÂArduino ESP32 °ü
|
attrib -h "%~dp0\.git_win_esp32"
|
ren "%~dp0\.git_win_esp32\" .git
|
|
@echo on
|
echo Arduino ESP32 °üÕýÔÚÉý¼¶ÖУ¬ÇëµÈ´ý...
|
@echo off
|
cd "%~dp0\Git\cmd\"
|
git fetch --all
|
git reset --hard origin/master
|
git pull origin master
|
|
@echo off
|
rd/s/q "%~dp0\.git\logs\"
|
git gc
|
git prune
|
git clean -f .git/index.lock
|
@echo on
|
echo Arduino ESP32 °ü¸üÐÂÍê³É
|
@echo off
|
|
ren "%~dp0\.git\" .git_win_esp32
|
attrib +h "%~dp0\.git_win_esp32"
|
|
echo.
|
echo.
|
)
|
|
@echo on
|
echo Mixly2.0 ºÍ Arduino °ü¸üÐÂÍê³É£¬Enjoy it!
|
@echo off
|
pause
|
|
IF "%start_mixly%"=="y" (
|
cd "%~dp0\"
|
start "dummyclient" "%~dp0\Mixly.exe"
|
)
|