Skip to content

Commit

Permalink
fbt: Fixed build for users with space in username (#1437)
Browse files Browse the repository at this point in the history
Co-authored-by: あく <[email protected]>
Co-authored-by: hedger <[email protected]>
  • Loading branch information
3 people authored Jul 25, 2022
1 parent d085af3 commit 27b698f
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion assets/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ if assetsenv["IS_BASE_FIRMWARE"]:
"#/assets/resources/Manifest",
assetsenv.GlobRecursive("*", "resources", exclude="Manifest"),
action=Action(
'${PYTHON3} ${ASSETS_COMPILER} manifest "${TARGET.dir.posix}"',
'${PYTHON3} "${ASSETS_COMPILER}" manifest "${TARGET.dir.posix}"',
"${RESMANIFESTCOMSTR}",
),
)
Expand Down
4 changes: 2 additions & 2 deletions fbt.cmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
call %~dp0scripts\toolchain\fbtenv.cmd env
call "%~dp0scripts\toolchain\fbtenv.cmd" env

set SCONS_EP=%~dp0\lib\scons\scripts\scons.py

Expand All @@ -14,4 +14,4 @@ if [%FBT_NO_SYNC%] == [] (
git submodule update --init

set "SCONS_DEFAULT_FLAGS=-Q --warn=target-not-built"
python lib\scons\scripts\scons.py %SCONS_DEFAULT_FLAGS% %*
python lib\scons\scripts\scons.py %SCONS_DEFAULT_FLAGS% %*
10 changes: 5 additions & 5 deletions scripts/toolchain/fbtenv.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ set "FBT_TOOLCHAIN_ROOT=%FBT_ROOT%\toolchain\i686-windows"


if not exist "%FBT_TOOLCHAIN_ROOT%" (
powershell -ExecutionPolicy Bypass -File %FBT_ROOT%\scripts\toolchain\windows-toolchain-download.ps1 "%flipper_toolchain_version%"
powershell -ExecutionPolicy Bypass -File "%FBT_ROOT%\scripts\toolchain\windows-toolchain-download.ps1" "%flipper_toolchain_version%"
)
if not exist "%FBT_TOOLCHAIN_ROOT%\VERSION" (
powershell -ExecutionPolicy Bypass -File %FBT_ROOT%\scripts\toolchain\windows-toolchain-download.ps1 "%flipper_toolchain_version%"
powershell -ExecutionPolicy Bypass -File "%FBT_ROOT%\scripts\toolchain\windows-toolchain-download.ps1" "%flipper_toolchain_version%"
)
set /p REAL_TOOLCHAIN_VERSION=<%FBT_TOOLCHAIN_ROOT%\VERSION
set /p REAL_TOOLCHAIN_VERSION=<"%FBT_TOOLCHAIN_ROOT%\VERSION"
if not "%REAL_TOOLCHAIN_VERSION%" == "%FLIPPER_TOOLCHAIN_VERSION%" (
powershell -ExecutionPolicy Bypass -File %FBT_ROOT%\scripts\toolchain\windows-toolchain-download.ps1 "%flipper_toolchain_version%"
powershell -ExecutionPolicy Bypass -File "%FBT_ROOT%\scripts\toolchain\windows-toolchain-download.ps1" "%flipper_toolchain_version%"
)


Expand All @@ -40,6 +40,6 @@ if not "%1" == "env" (
echo *********************************
echo * fbt build environment *
echo *********************************
cd %FBT_ROOT%
cd "%FBT_ROOT%"
cmd /k
)
8 changes: 4 additions & 4 deletions site_scons/site_tools/fbt_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ def generate(env):
BUILDERS={
"IconBuilder": Builder(
action=Action(
"${PYTHON3} ${ASSETS_COMPILER} icons ${SOURCE.posix} ${TARGET.dir.posix}",
'${PYTHON3} "${ASSETS_COMPILER}" icons ${SOURCE.posix} ${TARGET.dir.posix}',
"${ICONSCOMSTR}",
),
emitter=icons_emitter,
),
"ProtoBuilder": Builder(
action=Action(
"${PYTHON3} ${NANOPB_COMPILER} -q -I${SOURCE.dir.posix} -D${TARGET.dir.posix} ${SOURCES.posix}",
'${PYTHON3} "${NANOPB_COMPILER}" -q -I${SOURCE.dir.posix} -D${TARGET.dir.posix} ${SOURCES.posix}',
"${PROTOCOMSTR}",
),
emitter=proto_emitter,
Expand All @@ -125,14 +125,14 @@ def generate(env):
),
"DolphinSymBuilder": Builder(
action=Action(
'${PYTHON3} ${ASSETS_COMPILER} dolphin -s dolphin_${DOLPHIN_RES_TYPE} "${SOURCE}" "${_DOLPHIN_OUT_DIR}"',
'${PYTHON3} "${ASSETS_COMPILER}" dolphin -s dolphin_${DOLPHIN_RES_TYPE} "${SOURCE}" "${_DOLPHIN_OUT_DIR}"',
"${DOLPHINCOMSTR}",
),
emitter=dolphin_emitter,
),
"DolphinExtBuilder": Builder(
action=Action(
'${PYTHON3} ${ASSETS_COMPILER} dolphin "${SOURCE}" "${_DOLPHIN_OUT_DIR}"',
'${PYTHON3} "${ASSETS_COMPILER}" dolphin "${SOURCE}" "${_DOLPHIN_OUT_DIR}"',
"${DOLPHINCOMSTR}",
),
emitter=dolphin_emitter,
Expand Down
6 changes: 3 additions & 3 deletions site_scons/site_tools/fbt_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def DistCommand(env, name, source, **kw):
command = env.Command(
target,
source,
'@${PYTHON3} ${ROOT_DIR.abspath}/scripts/sconsdist.py copy -p ${DIST_PROJECTS} -s "${DIST_SUFFIX}" ${DIST_EXTRA}',
'@${PYTHON3} "${ROOT_DIR.abspath}/scripts/sconsdist.py" copy -p ${DIST_PROJECTS} -s "${DIST_SUFFIX}" ${DIST_EXTRA}',
**kw,
)
env.Pseudo(target)
Expand All @@ -96,7 +96,7 @@ def generate(env):
"UsbInstall": Builder(
action=[
Action(
"${PYTHON3} ${ROOT_DIR.abspath}/scripts/selfupdate.py dist/${DIST_DIR}/f${TARGET_HW}-update-${DIST_SUFFIX}/update.fuf"
'${PYTHON3} "${ROOT_DIR.abspath}/scripts/selfupdate.py" dist/${DIST_DIR}/f${TARGET_HW}-update-${DIST_SUFFIX}/update.fuf'
),
Touch("${TARGET}"),
]
Expand All @@ -105,7 +105,7 @@ def generate(env):
action=Action(
[
Mkdir("$TARGET"),
"${PYTHON3} ${ROOT_DIR.abspath}/scripts/assets.py "
'${PYTHON3} "${ROOT_DIR.abspath}/scripts/assets.py" '
"copro ${COPRO_CUBE_DIR} "
"${TARGET} ${COPRO_MCU_FAMILY} "
"--cube_ver=${COPRO_CUBE_VERSION} "
Expand Down
2 changes: 1 addition & 1 deletion site_scons/site_tools/fbt_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def generate(env):
BUILDERS={
"VersionBuilder": Builder(
action=Action(
"${PYTHON3} ${ROOT_DIR.abspath}/scripts/version.py generate -t ${TARGET_HW} -o ${TARGET.dir.posix} --dir ${ROOT_DIR}",
'${PYTHON3} "${ROOT_DIR.abspath}/scripts/version.py" generate -t ${TARGET_HW} -o ${TARGET.dir.posix} --dir "${ROOT_DIR}"',
"${VERSIONCOMSTR}",
),
emitter=version_emitter,
Expand Down
2 changes: 1 addition & 1 deletion site_scons/site_tools/fwbin.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def generate(env):
),
"DFUBuilder": Builder(
action=Action(
'${PYTHON3} ${BIN2DFU} -i "${SOURCE}" -o "${TARGET}" -a ${IMAGE_BASE_ADDRESS} -l "Flipper Zero F${TARGET_HW}"',
'${PYTHON3} "${BIN2DFU}" -i "${SOURCE}" -o "${TARGET}" -a ${IMAGE_BASE_ADDRESS} -l "Flipper Zero F${TARGET_HW}"',
"${DFUCOMSTR}",
),
suffix=".dfu",
Expand Down

0 comments on commit 27b698f

Please sign in to comment.