注:MIT Appinventor 在市场上的 Windows 版本较多,在 Linux 上编译的版本很少。 由于需要部署服务器,因此决定编译 linux 版本。
GitHub原文:https://github.com/KamenLiefu/BG_APPInventor
Github编译版本免费下载:https://github.com/KamenLiefu/BG_APPInventor
安装32位系统:
//Install 32-bit programs
dpkg --add-architecture i386
检查并更新依赖包
//Check and update dependencies
apt-get upgrade -y
sudo apt-get install -y libc6:i386 libstdc++6:i386 glibc-doc:i386 gcc-5-base:i386 gcc-6-base:i386 libgcc1:i386
sudo apt-get install -y zip unzip lib32z1 adb phantomjs
sudo apt-get install ant
//可以通过命令安装,也可以通过官网下载。
//Install openjdk-8-jdk or download the installation package from oracle's official website
sudo apt-get install openjdk-8-jdk
//下载源代码
//Download the Apinvento-Souss source code
git clone https://github.com/mit-cml/appinventor-sources.git
cd appinventor-sources
cp sample-.gitignore .gitignore
//下载需要的依赖,例如clourse-library,blockly等等。
//Download the dependencies and modules needed for Apinvento Souss.
git submodule update --init
//下载appengine-java-sdk
//Download appengine-java-sdk
wget --no-verbose https://storage.googleapis.com/appengine-sdks/featured/appengine-java-sdk-1.9.68.zip
//解压下载的zip压缩包
//Unzip the downloaded zip
unzip appengine-java-sdk-1.9.68.zip
//重命名文件名,不修改也可以
//rename directory
mv appengine-java-sdk-1.9.68 appengine-java-sdk
//复制解压后的sdk到appinventor目录下
//copied to appinventor
mv appengine-java-sdk appengine-sources/appinventor
编译操作,约 5~10 分钟
//进入appinventor目录
cd appinventor
//编译
ant
注:这里文件是在桌面上,用户名是kali,以自己的用户名为准。
AppServer.sh
#!/bin/sh
'/home/kali/Desktop/appinventor-sources/appinventor/appengine-java-sdk/bin/dev_appserver.sh' --port=8888 --address=0.0.0.0 '/home/kali/Desktop/appinventor-sources/appinventor/appengine/build/war'
StartServer.sh
#!/bin/sh
cd '/home/kali/Desktop/appinventor-sources/appinventor/buildserver' && ant RunLocalBuildServer