- Need python3.3 or later to get the Windows py.exe launcher that is used to get python3 rather than python2 if both are installed on Windows
- 32 bit python works
- [Git](http://git-scm.com/download/win).
- - Note: If you use Cygwin, you can normally use Cygwin's "git.exe". However, in order to use the "update\_external\_sources.bat" script, you must have this version.
+ - Note: If you use Cygwin, you can normally use Cygwin's "git.exe", and "update\_external\_sources.sh --no-build" does support Cygwin's git. However, in order to use the "update\_external\_sources.bat" script, you must have this version.
- Tell the installer to allow it to be used for "Developer Prompt" as well as "Git Bash".
- Tell the installer to treat line endings "as is" (i.e. both DOS and Unix-style line endings).
- Install each a 32-bit and a 64-bit version, as the 64-bit installer does not install the 32-bit libraries and tools.
This specification describes both how ICDs and layers should be properly
packaged, and how developers can point to ICDs and layers within their builds.
+### Cygwin
+
+If you are using Cygwin git instead of win32-native git, you can use Cygwin's git to sync external sources:
+```
+./update_external_sources.sh --no-build
+```
+
+Unfortunately, "update\_external\_sources.bat" does not have a --no-sync option. To build the external sources you have to modify "update\_external\_sources.bat" to skip the sync portions of the script.
+
## Android Build
Install the required tools for Linux and Windows covered above, then add the following.
### Android Studio
set -e
-if [[ $(uname) == "Linux" ]]; then
+if [[ $(uname) == "Linux" || $(uname) =~ "CYGWIN" ]]; then
CURRENT_DIR="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
CORE_COUNT=$(nproc || echo 4)
elif [[ $(uname) == "Darwin" ]]; then
CURRENT_DIR="$(dirname "$(python -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' ${BASH_SOURCE[0]})")"
CORE_COUNT=$(sysctl -n hw.ncpu || echo 4)
fi
+echo CURRENT_DIR=$CURRENT_DIR
echo CORE_COUNT=$CORE_COUNT
REVISION_DIR="$CURRENT_DIR/external_revisions"
make -j $CORE_COUNT
}
-# If any options are provided, just compile those tools
-# If no options are provided, build everything
+# If any options are provided, just sync and compile those tools
+# If no options are provided, sync and build everything
INCLUDE_GLSLANG=false
INCLUDE_SPIRV_TOOLS=false
-
-if [ "$#" == 0 ]; then
+NO_SYNC=false
+NO_BUILD=false
+USE_IMPLICIT_COMPONENT_LIST=true
+
+# Parse options
+while [[ $# > 0 ]]
+do
+ option="$1"
+
+ case $option in
+ # options to specify build of glslang components
+ -g|--glslang)
+ INCLUDE_GLSLANG=true
+ USE_IMPLICIT_COMPONENT_LIST=false
+ echo "Building glslang ($option)"
+ ;;
+ # options to specify build of spirv-tools components
+ -s|--spirv-tools)
+ INCLUDE_SPIRV_TOOLS=true
+ USE_IMPLICIT_COMPONENT_LIST=false
+ echo "Building spirv-tools ($option)"
+ ;;
+ # option to specify skipping sync from git
+ --no-sync)
+ NO_SYNC=true
+ echo "Skipping sync ($option)"
+ ;;
+ # option to specify skipping build
+ --no-build)
+ NO_BUILD=true
+ echo "Skipping build ($option)"
+ ;;
+ *)
+ echo "Unrecognized option: $option"
+ echo "Try the following:"
+ echo " -g | --glslang # enable glslang"
+ echo " -s | --spirv-tools # enable spirv-tools"
+ echo " --no-sync # skip sync from git"
+ echo " --no-build # skip build"
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+if [ ${USE_IMPLICIT_COMPONENT_LIST} == "true" ]; then
echo "Building glslang, spirv-tools"
INCLUDE_GLSLANG=true
INCLUDE_SPIRV_TOOLS=true
-else
- # Parse options
- while [[ $# > 0 ]]
- do
- option="$1"
-
- case $option in
- # options to specify build of glslang components
- -g|--glslang)
- INCLUDE_GLSLANG=true
- echo "Building glslang ($option)"
- ;;
- # options to specify build of spirv-tools components
- -s|--spirv-tools)
- INCLUDE_SPIRV_TOOLS=true
- echo "Building spirv-tools ($option)"
- ;;
- *)
- echo "Unrecognized option: $option"
- echo "Try the following:"
- echo " -g | --glslang # enable glslang"
- echo " -s | --spirv-tools # enable spirv-tools"
- exit 1
- ;;
- esac
- shift
- done
fi
if [ ${INCLUDE_GLSLANG} == "true" ]; then
- if [ ! -d "${BASEDIR}/glslang" -o ! -d "${BASEDIR}/glslang/.git" -o -d "${BASEDIR}/glslang/.svn" ]; then
- create_glslang
+ if [ ${NO_SYNC} == "false" ]; then
+ if [ ! -d "${BASEDIR}/glslang" -o ! -d "${BASEDIR}/glslang/.git" -o -d "${BASEDIR}/glslang/.svn" ]; then
+ create_glslang
+ fi
+ update_glslang
+ fi
+ if [ ${NO_BUILD} == "false" ]; then
+ build_glslang
fi
- update_glslang
- build_glslang
fi
if [ ${INCLUDE_SPIRV_TOOLS} == "true" ]; then
+ if [ ${NO_SYNC} == "false" ]; then
if [ ! -d "${BASEDIR}/spirv-tools" -o ! -d "${BASEDIR}/spirv-tools/.git" ]; then
create_spirv-tools
fi
update_spirv-tools
+ fi
+ if [ ${NO_BUILD} == "false" ]; then
build_spirv-tools
+ fi
fi