I get an error xcrun: error: unable to find utility "xctest", not a developer tool or in PATH during swift build --configuration release.
The Xcode is too large for me, so I tried to compile wallpapper with swiftc.
Finally, I made it with Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55).
Here is the detail of my build script.
echo "create work dir build"
mkdir build
cd build
mkdir Wallpapper.Objects
mkdir WallpapperExif.Objects
mkdir WallpapperLib.Objects
SRC_PATH=../../Sources
# compile WallpapperLib
cd WallpapperLib.Objects
echo "compile WallpapperLib"
swiftc -c \
${SRC_PATH}/WallpapperLib/*.swift \
${SRC_PATH}/WallpapperLib/*/*.swift \
${SRC_PATH}/WallpapperLib/*/*/*.swift \
-parse-as-library \
-module-name WallpapperLib
swiftc \
${SRC_PATH}/WallpapperLib/*.swift \
${SRC_PATH}/WallpapperLib/*/*.swift \
${SRC_PATH}/WallpapperLib/*/*/*.swift \
-emit-module \
-module-name WallpapperLib
cd ..
# compile Wallpapper
cd Wallpapper.Objects
echo "compile Wallpapper"
swiftc -c \
${SRC_PATH}/Wallpapper/*.swift \
-I../WallpapperLib.Objects \
-module-name wallpapper
cd ..
swiftc -emit-executable \
WallpapperLib.Objects/*.o \
Wallpapper.Objects/*.o \
-o wallpapper
# compile WallpapperExif
cd WallpapperExif.Objects
echo "compile WallpapperExif"
swiftc -c \
${SRC_PATH}/WallpapperExif/*.swift \
-I../WallpapperLib.Objects \
-module-name wallpapper_exif
cd ..
swiftc -emit-executable \
WallpapperLib.Objects/*.o \
WallpapperExif.Objects/*.o \
-o wallpapper-exif
# all done, now we have wallpapper and wallpapper-exif in build/
cd ..
echo "all done"
ls -lG build/wallpapper build/wallpapper-exif
I get an error
xcrun: error: unable to find utility "xctest", not a developer tool or in PATH
duringswift build --configuration release
. The Xcode is too large for me, so I tried to compile wallpapper withswiftc
. Finally, I made it withApple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
. Here is the detail of my build script.hope this script will help others as well