Skip to content

Commit b18a080

Browse files
committed
Fix YAML syntax errors in build workflow
- Replace PowerShell here-strings with array-based string building - Remove conflicting YAML syntax from @'' and @"" constructs - Fix duplicate sections and improper nesting - Ensure all PowerShell multi-line strings use proper YAML escaping
1 parent b46feab commit b18a080

File tree

1 file changed

+111
-107
lines changed

1 file changed

+111
-107
lines changed

.github/workflows/build-windows-executable.yml

Lines changed: 111 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -224,36 +224,38 @@ jobs:
224224
Copy-Item "docs" "dist\RoutePlanner_Portable\" -Recurse
225225
}
226226
227-
# Create user-friendly README
228-
$readmeContent = @"
229-
Route Planner - Portable Version
230-
================================
231-
232-
IMPORTANT: Visual C++ Redistributable Required
233-
This version requires Microsoft Visual C++ Redistributable.
234-
If you get "ucrtbase.dll.crealf" errors, download it from:
235-
https://aka.ms/vs/17/release/vc_redist.x64.exe
236-
237-
QUICK START:
238-
1. Install Visual C++ Redistributable (if needed)
239-
2. Double-click RoutePlanner.exe to start the application.
240-
241-
WHAT IS THIS?
242-
Route Planner helps you find the most efficient routes between multiple locations.
243-
Perfect for delivery drivers, sales teams, or anyone who needs to visit multiple places.
244-
245-
FEATURES:
246-
- Interactive map interface
247-
- Smart route optimization
248-
- Multiple algorithm options
249-
- Works offline after initial setup
250-
- No installation required
251-
252-
SUPPORT: https://github.com/yammanhammad/Route_Planner
253-
254-
For a version that includes Visual C++ Redistributable automatically,
255-
download the "Bundled" package instead.
256-
"@
227+
# Create user-friendly README using PowerShell string building
228+
$readmeLines = @(
229+
"Route Planner - Portable Version",
230+
"================================",
231+
"",
232+
"IMPORTANT - Visual C++ Redistributable Required",
233+
"This version requires Microsoft Visual C++ Redistributable.",
234+
"If you get ucrtbase.dll.crealf errors, download it from",
235+
"https://aka.ms/vs/17/release/vc_redist.x64.exe",
236+
"",
237+
"QUICK START",
238+
"1. Install Visual C++ Redistributable (if needed)",
239+
"2. Double-click RoutePlanner.exe to start the application.",
240+
"",
241+
"WHAT IS THIS",
242+
"Route Planner helps you find the most efficient routes between multiple locations.",
243+
"Perfect for delivery drivers, sales teams, or anyone who needs to visit multiple places.",
244+
"",
245+
"FEATURES",
246+
"- Interactive map interface",
247+
"- Smart route optimization",
248+
"- Multiple algorithm options",
249+
"- Works offline after initial setup",
250+
"- No installation required",
251+
"",
252+
"SUPPORT",
253+
"https://github.com/yammanhammad/Route_Planner",
254+
"",
255+
"For a version that includes Visual C++ Redistributable automatically,",
256+
"download the Bundled package instead."
257+
)
258+
$readmeContent = $readmeLines -join "`r`n"
257259
258260
$readmeContent | Out-File -FilePath "dist\RoutePlanner_Portable\README.txt" -Encoding UTF8
259261
@@ -283,86 +285,88 @@ download the "Bundled" package instead.
283285
}
284286
}
285287
286-
# Create setup script
287-
$setupScript = @'
288-
@echo off
289-
echo Route Planner Setup
290-
echo ==================
291-
echo.
292-
293-
echo Checking for Visual C++ Redistributable...
294-
reg query "HKLM\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64" >nul 2>&1
295-
if %ERRORLEVEL% EQU 0 (
296-
echo Visual C++ Redistributable is already installed.
297-
goto :run_app
298-
)
299-
300-
echo Visual C++ Redistributable not found. Installing...
301-
echo.
302-
echo This may take a few minutes...
303-
vc_redist.x64.exe /quiet /norestart
304-
if %ERRORLEVEL% EQU 0 (
305-
echo Visual C++ Redistributable installed successfully.
306-
) else (
307-
echo Warning: Visual C++ Redistributable installation may have failed.
308-
echo If the app doesn't work, run vc_redist.x64.exe manually.
309-
)
310-
311-
:run_app
312-
echo.
313-
echo Starting Route Planner...
314-
start RoutePlanner.exe
315-
echo.
316-
echo Setup complete! Route Planner should now be running.
317-
pause
318-
'@
288+
# Create setup script using PowerShell string building
289+
$setupScriptLines = @(
290+
"@echo off",
291+
"echo Route Planner Setup",
292+
"echo ==================",
293+
"echo.",
294+
"",
295+
"echo Checking for Visual C++ Redistributable...",
296+
"reg query ""HKLM\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64"" >nul 2>&1",
297+
"if %ERRORLEVEL% EQU 0 (",
298+
" echo Visual C++ Redistributable is already installed.",
299+
" goto :run_app",
300+
")",
301+
"",
302+
"echo Visual C++ Redistributable not found. Installing...",
303+
"echo.",
304+
"echo This may take a few minutes...",
305+
"vc_redist.x64.exe /quiet /norestart",
306+
"if %ERRORLEVEL% EQU 0 (",
307+
" echo Visual C++ Redistributable installed successfully.",
308+
") else (",
309+
" echo Warning: Visual C++ Redistributable installation may have failed.",
310+
" echo If the app doesn't work, run vc_redist.x64.exe manually.",
311+
")",
312+
"",
313+
":run_app",
314+
"echo.",
315+
"echo Starting Route Planner...",
316+
"start RoutePlanner.exe",
317+
"echo.",
318+
"echo Setup complete! Route Planner should now be running.",
319+
"pause"
320+
)
321+
$setupScript = $setupScriptLines -join "`r`n"
319322
320323
$setupScript | Out-File -FilePath "dist\RoutePlanner_Bundled\setup.bat" -Encoding ASCII
321324
322-
# Create bundled README
323-
$bundledReadme = @"
324-
Route Planner - Bundled Edition
325-
===============================
326-
327-
QUICK SETUP:
328-
1. Double-click "setup.bat" for automatic setup and launch
329-
2. Or double-click "RoutePlanner.exe" directly
330-
331-
WHAT'S INCLUDED:
332-
✅ Route Planner application (RoutePlanner.exe)
333-
✅ Visual C++ Redistributable (vc_redist.x64.exe)
334-
✅ Automatic setup script (setup.bat)
335-
336-
ABOUT THIS VERSION:
337-
This bundled version includes the Microsoft Visual C++ Redistributable
338-
to ensure the application works on all Windows systems, even those
339-
missing required runtime components.
340-
341-
MANUAL INSTALLATION:
342-
If setup.bat doesn't work:
343-
1. Run vc_redist.x64.exe first
344-
2. Then run RoutePlanner.exe
345-
346-
NO MORE ucrtbase.dll.crealf ERRORS!
347-
This package resolves all Visual C++ runtime dependency issues.
348-
349-
FEATURES:
350-
✅ Interactive map interface
351-
✅ Smart route optimization
352-
✅ Multiple algorithm options
353-
✅ Works offline after initial setup
354-
355-
SYSTEM REQUIREMENTS:
356-
- Windows 7 or newer
357-
- 4GB RAM recommended
358-
- Internet connection for maps
359-
360-
SUPPORT:
361-
Visit: https://github.com/yammanhammad/Route_Planner
362-
363-
LICENSE:
364-
MIT License - See LICENSE file for details.
365-
"@
325+
# Create bundled README using PowerShell string building
326+
$bundledReadmeLines = @(
327+
"Route Planner - Bundled Edition",
328+
"===============================",
329+
"",
330+
"QUICK SETUP",
331+
"1. Double-click ""setup.bat"" for automatic setup and launch",
332+
"2. Or double-click ""RoutePlanner.exe"" directly",
333+
"",
334+
"WHAT'S INCLUDED",
335+
"* Route Planner application (RoutePlanner.exe)",
336+
"* Visual C++ Redistributable (vc_redist.x64.exe)",
337+
"* Automatic setup script (setup.bat)",
338+
"",
339+
"ABOUT THIS VERSION",
340+
"This bundled version includes the Microsoft Visual C++ Redistributable",
341+
"to ensure the application works on all Windows systems, even those",
342+
"missing required runtime components.",
343+
"",
344+
"MANUAL INSTALLATION",
345+
"If setup.bat doesn't work",
346+
"1. Run vc_redist.x64.exe first",
347+
"2. Then run RoutePlanner.exe",
348+
"",
349+
"NO MORE ucrtbase.dll.crealf ERRORS",
350+
"This package resolves all Visual C++ runtime dependency issues.",
351+
"",
352+
"FEATURES",
353+
"* Interactive map interface",
354+
"* Smart route optimization",
355+
"* Multiple algorithm options",
356+
"* Works offline after initial setup",
357+
"",
358+
"SYSTEM REQUIREMENTS",
359+
"- Windows 7 or newer",
360+
"- 4GB RAM recommended",
361+
"- Internet connection for maps",
362+
"",
363+
"SUPPORT",
364+
"Visit: https://github.com/yammanhammad/Route_Planner",
365+
"",
366+
"LICENSE",
367+
"MIT License - See LICENSE file for details."
368+
)
369+
$bundledReadme = $bundledReadmeLines -join "`r`n"
366370
367371
$bundledReadme | Out-File -FilePath "dist\RoutePlanner_Bundled\README.txt" -Encoding UTF8
368372

0 commit comments

Comments
 (0)