Update xtclib
This commit is contained in:
		
				
					committed by
					
						 CodingWorkshop Signing Team
						CodingWorkshop Signing Team
					
				
			
			
				
	
				
						parent
						
							9c476578a7
						
					
				
				
					commit
					83321f9f59
				
			| @@ -4,8 +4,20 @@ | |||||||
| # FILE:        scripts/xtclib | # FILE:        scripts/xtclib | ||||||
| # DESCRIPTION: XTchain library | # DESCRIPTION: XTchain library | ||||||
| # DEVELOPERS:  Rafal Kupiec <belliash@codingworkshop.eu.org> | # DEVELOPERS:  Rafal Kupiec <belliash@codingworkshop.eu.org> | ||||||
|  | #              Aiken Harris <harraiken91@gmail.com> | ||||||
|  |  | ||||||
|  |  | ||||||
|  | # Prints XTChain banner | ||||||
|  | banner() | ||||||
|  | { | ||||||
|  |     local XTC_BANNER="XT Toolchain v${XTCVER} for Linux" | ||||||
|  |  | ||||||
|  |     printf "###############################################################################\n\n" | ||||||
|  |     printf "%*s\n\n" $(( (${#XTC_BANNER} + 80) / 2)) "${XTC_BANNER}" | ||||||
|  |     printf "###############################################################################\n\n\n" | ||||||
|  | } | ||||||
|  | export -f banner | ||||||
|  |  | ||||||
| # Sets the target architecture | # Sets the target architecture | ||||||
| charch() | charch() | ||||||
| { | { | ||||||
| @@ -54,8 +66,9 @@ export -f chbuild | |||||||
| # Prints help | # Prints help | ||||||
| help() | help() | ||||||
| { | { | ||||||
| 	version |     banner | ||||||
|     echo "XTChain defines an internal list of commands:" |     echo "XTChain defines an internal list of commands:" | ||||||
|  |     echo " * banner          - prints XTChain banner" | ||||||
|     echo " * charch [arch]   - sets the target CPU architecture [aarch64/armv7/i686/amd64]" |     echo " * charch [arch]   - sets the target CPU architecture [aarch64/armv7/i686/amd64]" | ||||||
|     echo " * chbuild [type]  - sets build type [debug/release]" |     echo " * chbuild [type]  - sets build type [debug/release]" | ||||||
|     echo " * help            - prints this message" |     echo " * help            - prints this message" | ||||||
| @@ -67,22 +80,37 @@ export -f help | |||||||
| # Displays version banner | # Displays version banner | ||||||
| version() | version() | ||||||
| { | { | ||||||
|     echo "###############################################################################" |     local XTCHAIN_EXTTOOLS=false | ||||||
|     echo "#                        XT Toolchain v${XTCVER} for Linux                        #" |  | ||||||
|     echo "#               by Rafal Kupiec <belliash@codingworkshop.eu.org>              #" |     if [ ! -f ${XTCDIR}/bin/clang ] || [ "$(which clang)" != "${XTCDIR}/bin/clang" ] || [ $(echo ${XTCVER} | grep "min") ]; then | ||||||
|     echo "###############################################################################" |         XTCHAIN_EXTTOOLS=true | ||||||
|     echo |         for TOOL in {clang,clang++,cmake,lld-link,ninja}; do | ||||||
|     echo |             which ${TOOL} &> /dev/null | ||||||
|     echo "LLVM Compiler Version: $(${XTCDIR}/bin/clang --version | grep 'clang version' | cut -d' ' -f3)" |             if [ $? -ne 0 ]; then | ||||||
|     echo "LLVM Windres Utility Version: $(${XTCDIR}/bin/i686-w64-mingw32-windres -V | cut -d' ' -f6)" |                 echo "ERROR: You are using minimal version of XTChain and '${TOOL}' has been not found in your system!" | ||||||
|     echo "Mingw IDL Compiler Version: $(${XTCDIR}/bin/i686-w64-mingw32-widl -V | grep 'version' | cut -d' ' -f5)" |                 echo "ERROR: Please install all required tools." | ||||||
|     echo "Wine Message Compiler Version: $(${XTCDIR}/bin/wmc -V | grep 'version' | cut -d' ' -f5)" |                 exit 1 | ||||||
|     echo "Wine Resource Compiler Version: $(${XTCDIR}/bin/wrc --version | grep 'version' | cut -d' ' -f5)" |             fi | ||||||
|     echo |         done | ||||||
|  |     fi | ||||||
|  |  | ||||||
|  |     banner | ||||||
|  |     echo -en "\nLLVM/Clang Compiler: $(clang --version | grep 'clang version' | cut -d' ' -f3) ($(which clang))" | ||||||
|  |     echo -en "\nLLVM/LLD Linker: $(lld-link --version | cut -d' ' -f2) ($(which lld-link))" | ||||||
|  |     echo -en "\nWine IDL Compiler: $(widl -V | grep 'version' | cut -d' ' -f5) ($(which widl))" | ||||||
|  |     echo -en "\nWine Message Compiler: $(wmc -V | grep 'version' | cut -d' ' -f5) ($(which wmc))" | ||||||
|  |     echo -en "\nWine Resource Compiler: $(wrc --version | grep 'version' | cut -d' ' -f5) ($(which wrc))" | ||||||
|  |     echo -en "\nXT Resource Compiler: $(windres -V | cut -d' ' -f6) ($(which windres))" | ||||||
|  |     echo -en "\nXT SPEC Compiler: $(xtcspecc --help | grep Version | cut -d' ' -f5) ($(which xtcspecc))" | ||||||
|  |     echo -en "\nCMake Build System: $(cmake --version | grep 'cmake version' | cut -d' ' -f3) ($(which cmake))" | ||||||
|  |     echo -en "\nNinja Build System: $(ninja --version) ($(which ninja))" | ||||||
|  |     echo -en "\n\n" | ||||||
|  |  | ||||||
|     charch ${TARGET:-amd64} |     charch ${TARGET:-amd64} | ||||||
|     chbuild ${BUILD_TYPE:-DEBUG} |     chbuild ${BUILD_TYPE:-DEBUG} | ||||||
|     echo |  | ||||||
|     echo |     echo -en "\n\nFor a list of all supported commands, type 'help'" | ||||||
|  |     echo -en "\n-------------------------------------------------\n\n" | ||||||
| } | } | ||||||
| export -f version | export -f version | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user