-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:toppers/hakoniwa-px4sim
- Loading branch information
Showing
4 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
tools/win/template/hakoniwa-px4-win/hakoniwa/bin/create_mmap.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
@echo off | ||
setlocal | ||
|
||
|
||
REM HAKO_CONFIG_PATH環境変数からパスを取得 | ||
set "HAKO_CONFIG_PATH=%HAKO_CONFIG_PATH%" | ||
|
||
for /f "tokens=*" %%i in ('powershell -Command "Get-Content %HAKO_CONFIG_PATH% | ConvertFrom-Json | Select-Object -ExpandProperty core_mmap_path"') do ( | ||
set CORE_MMAP_PATH=%%i | ||
) | ||
|
||
rem 抽出した値を表示 | ||
echo %CORE_MMAP_PATH% | ||
|
||
for /f "tokens=1* delims=\\" %%i in ("%CORE_MMAP_PATH%") do ( | ||
set DRIVE_LETTER=%%i | ||
set MMAP_PATH=%%j | ||
) | ||
|
||
echo CoreMmapPath: %CORE_MMAP_PATH% | ||
echo DriveLetter: %DRIVE_LETTER% | ||
echo MmapDir: %MMAP_PATH% | ||
|
||
REM ドライブに移動 | ||
cd /d %DRIVE_LETTER% || ( | ||
echo Failed to change to drive %DRIVE_LETTER%. Drive may not be available. | ||
exit /b 1 | ||
) | ||
|
||
REM ディレクトリが存在するか確認 | ||
if exist "%MMAP_PATH%" ( | ||
echo Directory already exists: %MMAP_PATH% | ||
) else ( | ||
mkdir "%MMAP_PATH%" | ||
echo Created directory: %CORE_MMAP_PATH% | ||
) | ||
|
||
endlocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters