|
@@ -1,12 +1,12 @@
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -28,15 +28,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -47,7 +47,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -96,7 +96,7 @@ else
|
|
|
exit
|
|
|
fi
|
|
|
sleep 2
|
|
|
-
|
|
|
+
|
|
|
if ! type wget > /dev/null; then
|
|
|
echo "$(tput setaf 1)Missing 'wget' which is important to run this script"
|
|
|
echo "Please follow these instructions https://gist.github.com/evanwill/0207876c3243bbb6863e65ec5dc3f058 to install wget$(tput sgr0)"
|
|
@@ -139,7 +139,7 @@ fi
|
|
|
cd ../build-env || exit 3
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
if [ ! -d "../PF-build-env-$BUILD_ENV" ]; then
|
|
|
echo "$(tput setaf 6)PF-build-env-$BUILD_ENV is missing ... creating it now for you$(tput sgr 0)"
|
|
|
mkdir ../PF-build-env-$BUILD_ENV
|
|
@@ -148,14 +148,14 @@ fi
|
|
|
|
|
|
if [ $OSTYPE == "msys" ]; then
|
|
|
if [ ! -f "PF-build-env-Win-$BUILD_ENV.zip" ]; then
|
|
|
- echo "$(tput setaf 6)Downloding Windows build enviroment...$(tput setaf 2)"
|
|
|
+ echo "$(tput setaf 6)Downlaoding Windows build environment...$(tput setaf 2)"
|
|
|
sleep 2
|
|
|
wget https://github.com/3d-gussner/PF-build-env/releases/download/Win-$BUILD_ENV/PF-build-env-Win-$BUILD_ENV.zip || exit 4
|
|
|
|
|
|
echo "$(tput sgr 0)"
|
|
|
fi
|
|
|
if [ ! -d "../PF-build-env-$BUILD_ENV/$OSTYPE" ]; then
|
|
|
- echo "$(tput setaf 6)Unzipping Windows build enviroment...$(tput setaf 2)"
|
|
|
+ echo "$(tput setaf 6)Unzipping Windows build environment...$(tput setaf 2)"
|
|
|
sleep 2
|
|
|
unzip PF-build-env-Win-$BUILD_ENV.zip -d ../PF-build-env-$BUILD_ENV/$OSTYPE || exit 4
|
|
|
echo "$(tput sgr0)"
|
|
@@ -165,7 +165,7 @@ fi
|
|
|
|
|
|
if [ $OSTYPE == "linux-gnu" ]; then
|
|
|
if [ ! -f "PF-build-env-Linux64-$BUILD_ENV.zip" ]; then
|
|
|
- echo "$(tput setaf 6)Downloading Linux 64 build enviroment...$(tput setaf 2)"
|
|
|
+ echo "$(tput setaf 6)Downloading Linux 64 build environment...$(tput setaf 2)"
|
|
|
sleep 2
|
|
|
wget https://github.com/mkbel/PF-build-env/releases/download/$BUILD_ENV/PF-build-env-Linux64-$BUILD_ENV.zip || exit 3
|
|
|
echo "$(tput sgr0)"
|
|
@@ -180,9 +180,9 @@ if [ $OSTYPE == "linux-gnu" ]; then
|
|
|
fi
|
|
|
cd $SCRIPT_PATH
|
|
|
|
|
|
-
|
|
|
+
|
|
|
if [ -z "$1" ] ; then
|
|
|
-
|
|
|
+
|
|
|
PS3="Select a variant: "
|
|
|
while IFS= read -r -d $'\0' f; do
|
|
|
options[i++]="$f"
|
|
@@ -248,7 +248,7 @@ else
|
|
|
if [[ "$2" == "ALL" || "$2" == "EN_ONLY" ]] ; then
|
|
|
LANGUAGES=$2
|
|
|
else
|
|
|
- echo "$(tput setaf 1)Language agrument is wrong!$(tput sgr0)"
|
|
|
+ echo "$(tput setaf 1)Language argument is wrong!$(tput sgr0)"
|
|
|
echo "Only $(tput setaf 2)'ALL'$(tput sgr0) or $(tput setaf 2)'EN_ONLY'$(tput sgr0) are allowed as 2nd argument!"
|
|
|
exit
|
|
|
fi
|
|
@@ -270,7 +270,7 @@ BUILD_ENV_PATH="$( pwd -P )"
|
|
|
|
|
|
cd ../..
|
|
|
|
|
|
-
|
|
|
+
|
|
|
if [ ! -d "Prusa-Firmware-build" ]; then
|
|
|
mkdir Prusa-Firmware-build || exit 6
|
|
|
fi
|
|
@@ -286,7 +286,7 @@ do
|
|
|
FW=$(grep --max-count=1 "\bFW_VERSION\b" $SCRIPT_PATH/Firmware/Configuration.h | sed -e's/ */ /g'|cut -d '"' -f2|sed 's/\.//g')
|
|
|
|
|
|
BUILD=$(grep --max-count=1 "\bFW_COMMIT_NR\b" $SCRIPT_PATH/Firmware/Configuration.h | sed -e's/ */ /g'|cut -d ' ' -f3)
|
|
|
-
|
|
|
+
|
|
|
MOTHERBOARD=$(grep --max-count=1 "\bMOTHERBOARD\b" $SCRIPT_PATH/Firmware/variants/$VARIANT.h | sed -e's/ */ /g' |cut -d ' ' -f3)
|
|
|
|
|
|
DEV_CHECK=$(grep --max-count=1 "\bFW_VERSION\b" $SCRIPT_PATH/Firmware/Configuration.h | sed -e's/ */ /g'|cut -d '"' -f2|sed 's/\.//g'|cut -d '-' -f2)
|
|
@@ -333,22 +333,22 @@ do
|
|
|
fi
|
|
|
OUTPUT_FOLDER="Hex-files/FW$FW-Build$BUILD/$MOTHERBOARD"
|
|
|
|
|
|
-
|
|
|
+
|
|
|
if [[ -f "$SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT.hex" && "$LANGUAGES" == "ALL" ]]; then
|
|
|
echo ""
|
|
|
ls -1 $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT.hex | xargs -n1 basename
|
|
|
- echo "$(tput setaf 6)This hex file to be comiled already exsits! To cancle this process press CRTL+C and rename existing hex file.$(tput sgr 0)"
|
|
|
+ echo "$(tput setaf 6)This hex file to be compiled already exists! To cancel this process press CRTL+C and rename existing hex file.$(tput sgr 0)"
|
|
|
read -t 10 -p "Press Enter to continue..."
|
|
|
elif [[ -f "$SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT-EN_ONLY.hex" && "$LANGUAGES" == "EN_ONLY" ]]; then
|
|
|
echo ""
|
|
|
ls -1 $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT-EN_ONLY.hex | xargs -n1 basename
|
|
|
- echo "$(tput setaf 6)This hex file to be comiled already exsits! To cancle this process press CRTL+C and rename existing hex file.$(tput sgr 0)"
|
|
|
+ echo "$(tput setaf 6)This hex file to be compiled already exists! To cancel this process press CRTL+C and rename existing hex file.$(tput sgr 0)"
|
|
|
read -t 10 -p "Press Enter to continue..."
|
|
|
fi
|
|
|
if [[ -f "$SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT.zip" && "$LANGUAGES" == "ALL" ]]; then
|
|
|
echo ""
|
|
|
ls -1 $SCRIPT_PATH/../$OUTPUT_FOLDER/FW$FW-Build$BUILD-$VARIANT.zip | xargs -n1 basename
|
|
|
- echo "$(tput setaf 6)This zip file to be comiled already exsits! To cancle this process press CRTL+C and rename existing hex file.$(tput sgr 0)"
|
|
|
+ echo "$(tput setaf 6)This zip file to be compiled already exists! To cancel this process press CRTL+C and rename existing hex file.$(tput sgr 0)"
|
|
|
read -t 10 -p "Press Enter to continue..."
|
|
|
fi
|
|
|
|
|
@@ -382,11 +382,11 @@ do
|
|
|
|
|
|
if [ $LANGUAGES == "ALL" ]; then
|
|
|
echo " "
|
|
|
- echo "Multi-language firmware will be build"
|
|
|
+ echo "Multi-language firmware will be built"
|
|
|
echo " "
|
|
|
else
|
|
|
echo " "
|
|
|
- echo "English only language firmware will be build"
|
|
|
+ echo "English only language firmware will be built"
|
|
|
echo " "
|
|
|
fi
|
|
|
|
|
@@ -439,14 +439,14 @@ do
|
|
|
|
|
|
if [ $LANGUAGES == "ALL" ]; then
|
|
|
echo "$(tput setaf 2)"
|
|
|
- echo "Building mutli language firmware" $MULTI_LANGUAGE_CHECK
|
|
|
+ echo "Building multi language firmware" $MULTI_LANGUAGE_CHECK
|
|
|
echo "$(tput sgr 0)"
|
|
|
sleep 2
|
|
|
cd $SCRIPT_PATH/lang
|
|
|
echo "$(tput setaf 3)"
|
|
|
./config.sh || exit 15
|
|
|
echo "$(tput sgr 0)"
|
|
|
-
|
|
|
+
|
|
|
if [ -f "lang_en.tmp" ]; then
|
|
|
echo ""
|
|
|
echo "$(tput setaf 6)Previous lang build files already exist these will be cleaned up in 10 seconds.$(tput sgr 0)"
|
|
@@ -469,7 +469,7 @@ do
|
|
|
|
|
|
./fw-build.sh || exit 17
|
|
|
echo "$(tput sgr 0)"
|
|
|
-
|
|
|
+
|
|
|
MOTHERBOARD=$(grep --max-count=1 "\bMOTHERBOARD\b" $SCRIPT_PATH/Firmware/variants/$VARIANT.h | sed -e's/ */ /g' |cut -d ' ' -f3)
|
|
|
|
|
|
if [ "$MOTHERBOARD" = "BOARD_EINSY_1_0a" ]; then
|