-
download file and install
Chromehttps://www.google.com/chrome/browser/desktop/index.html?system=true&standalone=1
Google-cloud-sdk
https://cloud.google.com/sdk/docs/quickstart-windows
https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exeOpenjdk 1.8
https://developers.redhat.com/products/openjdk/download
https://developers.redhat.com/download-manager/file/java-1.8.0-openjdk-1.8.0.242-3.b08.redhat.windows.x86_64.msiGit
https://git-scm.com/download/win
https://github.com/git-for-windows/git/releases/download/v2.26.0.windows.1/Git-2.26.0-64-bit.exeAnt
https://ant.apache.org/bindownload.cgi
https://downloads.apache.org//ant/binaries/apache-ant-1.10.7-bin.zip
add Ant bin path to PATH environment variable
2.check
ant -version
git --version
java -version
gcloud components list
gcloud components install app-engine-java
gcloud components update
3.admin cmd
cd c:\
mkdir ai2
cd ai2
chcp 65001
set JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8"
git clone https://github.com/mit-cml/appinventor-sources.git
cd appinventor-sources
copy sample-.gitignore .gitignore
git submodule update --init
cd appinventor
call ant MakeAuthKey
call ant
4.test
java_dev_appserver.cmd --port=8888 --address=0.0.0.0 --disable_update_check appengine/build/war/
Ctrl +C Terminate batch job
5.move file
move /y “appinventor-sources\appinventor\buildserver\build\run\lib” BuildServer
move /y “appinventor-sources\appinventor\appengine\build\war” DevServer
6.Ai2Rundev.bat
@echo off
%1(start /min cmd.exe /c %0 :&exit)
chcp 65001
echo “Starting App Inventor 2 DevAppServer…”
title DevAppServer
cd %~dp0SET JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8"
for /f “tokens=1-5” %%i in (‘netstat -ano^|findstr “8888”’) do (
echo kill the process %%m use the port 8888
taskkill /F /T /pid %%m
)java_dev_appserver.cmd --port=8888 --disable_update_check --address=0.0.0.0 DevServer
7.Ai2Runbud.bat
@echo off
%1(start /min cmd.exe /c %0 :&exit)
chcp 65001
echo “Starting App Inventor 2 BuildServer…”
title BuildServer
cd %~dp0SET _JAVA_OPTIONS= -Xms64m -Xmx1024m
SET JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8"
for /f “tokens=1-5” %%i in (‘netstat -ano^|findstr “:9990”’) do (
echo kill the process %%m use the port 9990
taskkill /F /T /pid %%m
)cd BuildServer
java -cp “*” com.google.appinventor.buildserver.BuildServer
8.update.bat
@echo off
chcp 65001
SET JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8"
cd %~dp0cd appinventor-sources
title git code
git reset --hard
git pull
git submodule update --initcd appinventor
title ant
call ant clean
call ant
cd …/…rem pause
for /f “tokens=1-5” %%i in (‘netstat -ano^|findstr “:9990”’) do (
echo kill the process %%m use the port 9990
taskkill /F /T /pid %%m
)for /f “tokens=1-5” %%i in (‘netstat -ano^|findstr “8888”’) do (
echo kill the process %%m use the port 8888
taskkill /F /T /pid %%m
)xcopy /e /s /y “DevServer\WEB-INF\appengine-generated” .\appengine-generated\
move /y “appinventor-sources\appinventor\buildserver\build\run\lib” BuildServer
move /y “appinventor-sources\appinventor\appengine\build\war” DevServerxcopy /e /s /y .\appengine-generated “DevServer\WEB-INF\appengine-generated”
start Ai2Runbud.bat
start Ai2Rundev.bat