| ¶Ô±ÈÐÂÎļþ |
| | |
| | | @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" |
| | | ) |