commit 2a5433c9d665146cd264dc54276f714bfb4e7ace
parent 7197a620dfa5f921e1bd23dcd84ab227227a55bc
Author: Amit Dutta <mail@amit.is-a.dev>
Date: Fri, 10 Jul 2026 15:19:03 +0530
moved to Fedora Linux 44 from Windows 11
Diffstat:
1 file changed, 0 insertions(+), 63 deletions(-)
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
@@ -1,62 +0,0 @@
-{
- "version": "2.0.0",
- "tasks": [
- {
- "label": "Silent Auto-Pull",
- "type": "shell",
- "command": "git pull",
- "runOptions": {
- "runOn": "folderOpen"
- },
- "presentation": {
- "reveal": "never",
- "panel": "shared",
- "showReuseMessage": false,
- "clear": true
- }
- },
- {
- "label": "C/C++: build active file",
- "type": "shell",
- "command": "$c=if('${fileExtname}' -eq '.cpp'){'g++'}else{'gcc'}; $exe='${fileDirname}\\${fileBasenameNoExtension}.exe'; $B='━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'; function fnH($t,$nl=$true){ if($nl){Write-Host ''}; Write-Host $B -F DarkGray; Write-Host (' '+$t) -F Cyan; Write-Host $B -F DarkGray; Write-Host '' }; function fnR($k,$v,$clr='White'){ Write-Host $k.PadRight(15) -NoNewline; Write-Host $v -F $clr }; function fnT($m){ if($m -ge 1000){ return [math]::Floor($m/1000).ToString()+' sec ('+$m.ToString()+' ms)' } return $m.ToString()+' ms' }; fnH 'BUILD' $false; Write-Host ('Compiling ${fileBasename}...'); Write-Host ''; $bsw=[System.Diagnostics.Stopwatch]::StartNew(); $out=(& C:\\MinGW\\bin\\$c.exe -fdiagnostics-color=always -g '${file}' -o $exe 2>&1 | Out-String); $bexit=$LASTEXITCODE; $bsw.Stop(); $bms=$bsw.ElapsedMilliseconds; if($out){ Write-Host $out }; $w=([regex]::Matches($out,'(?i)warning:')).Count; $e=([regex]::Matches($out,'(?i)error:')).Count; $bs=if($bexit -eq 0){'✓ Success'}else{'✗ Failed'}; $bc=if($bexit -eq 0){'Green'}else{'Red'}; Write-Host ($bs+' in '+(fnT $bms)) -F $bc; fnH 'BUILD REPORT'; fnR 'File' '${fileBasename}'; fnR 'Compiler' $c; fnR 'Target' 'x64'; fnR 'Build' $bs $bc; $wc=if($w -gt 0){'Yellow'}else{'White'}; fnR 'Warnings' $w $wc; $ec=if($e -gt 0){'Red'}else{'White'}; fnR 'Errors' $e $ec; if(Test-Path $exe){ $sz=[math]::Round((Get-Item $exe).length/1KB,2); fnR 'Size' ($sz.ToString()+' KB') }; fnR 'Build Time' (fnT $bms); if($bexit -ne 0){ exit 1 }; exit 0",
- "args": [],
- "options": {
- "cwd": "${fileDirname}",
- "shell": {
- "executable": "powershell.exe",
- "args": ["-NoProfile", "-Command"]
- }
- },
- "problemMatcher": ["$gcc"],
- "group": "build",
- "detail": "Auto-selects gcc for .c and g++ for .cpp"
- },
- {
- "label": "C/C++: build and run active file",
- "type": "shell",
- "command": "$c=if('${fileExtname}' -eq '.cpp'){'g++'}else{'gcc'}; $exe='${fileDirname}\\${fileBasenameNoExtension}.exe'; $logDir='G:\\bsc\\buildLog'; if(!(Test-Path $logDir)){ New-Item -ItemType Directory -Force -Path $logDir | Out-Null }; $ts=Get-Date -Format 'yyyy-MM-dd_HH-mm-ss'; $logFile=$logDir+'\\buildLog_'+$ts+'.txt'; function fnH($t,$c=$true,$l=$true,$nl=$true){ $B='━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'; if($c){ if($nl){Write-Host ''}; Write-Host $B -F DarkGray; Write-Host (' '+$t) -F Cyan; Write-Host $B -F DarkGray; Write-Host '' }; if($l){ if($nl){Add-Content $logFile '' -Encoding UTF8}; Add-Content $logFile $B -Encoding UTF8; Add-Content $logFile (' '+$t) -Encoding UTF8; Add-Content $logFile $B -Encoding UTF8; Add-Content $logFile '' -Encoding UTF8 } }; function fnR($k,$v,$clr='White'){ $pad=$k.PadRight(16); Write-Host $pad -NoNewline; Write-Host $v -F $clr; Add-Content $logFile ($pad+$v) -Encoding UTF8 }; function fnL($txt,$clr='White'){ Write-Host $txt -F $clr; Add-Content $logFile $txt -Encoding UTF8 }; function fnT($m){ if($m -ge 1000){ return [math]::Floor($m/1000).ToString()+' sec ('+$m.ToString()+' ms)' } return $m.ToString()+' ms' }; $ver=(& C:\\MinGW\\bin\\$c.exe --version | Select-Object -First 1); fnH 'BUILD' $true $true $false; fnL ('Compiling ${fileBasename}...') 'White'; fnL $ver 'DarkGray'; fnL '' 'White'; $bsw=[System.Diagnostics.Stopwatch]::StartNew(); $out=(& C:\\MinGW\\bin\\$c.exe -fdiagnostics-color=always -g '${file}' -o $exe 2>&1 | Out-String); $bexit=$LASTEXITCODE; $bsw.Stop(); $bms=$bsw.ElapsedMilliseconds; if($out){ Write-Host $out; $cleanOut=$out -replace ([char]27+'\\[[0-9;]*[a-zA-Z]'),''; Add-Content $logFile $cleanOut -Encoding UTF8 }; $w=([regex]::Matches($out,'(?i)warning:')).Count; $e=([regex]::Matches($out,'(?i)error:')).Count; $bs=if($bexit -eq 0){'✓ Success'}else{'✗ Failed'}; $bc=if($bexit -eq 0){'Green'}else{'Red'}; fnL ($bs+' in '+(fnT $bms)) $bc; fnH 'BUILD REPORT'; fnR 'Source' '${file}'; $loc=(Get-Content '${file}').Length; fnR 'Lines of Code' $loc; fnR 'Timestamp' (Get-Date -Format 'yyyy-MM-dd HH:mm:ss'); fnR 'Compiler' $c; fnR 'Target' 'x64'; fnR 'Build' $bs $bc; $wc=if($w -gt 0){'Yellow'}else{'White'}; fnR 'Warnings' $w $wc; $ec=if($e -gt 0){'Red'}else{'White'}; fnR 'Errors' $e $ec; if(Test-Path $exe){ $sz=[math]::Round((Get-Item $exe).length/1KB,2); fnR 'Size' ($sz.ToString()+' KB') }; fnR 'Build Time' (fnT $bms); fnR 'Log File' $logFile 'DarkGray'; if($bexit -ne 0){ exit 1 }; fnH 'RUN' $true $false; $rsw=[System.Diagnostics.Stopwatch]::StartNew(); & $exe; $rexit=$LASTEXITCODE; $rsw.Stop(); $rms=$rsw.ElapsedMilliseconds; fnH 'EXECUTION REPORT'; $rc=if($rexit -eq 0){'Green'}else{'Red'}; fnR 'Exit Code' $rexit $rc; fnR 'Runtime' (fnT $rms); Remove-Item $exe -Force -ErrorAction SilentlyContinue; fnR 'Executable' 'Removed'; fnH 'SOURCE CODE' $false $true; Get-Content '${file}' | Add-Content $logFile -Encoding UTF8; exit 0",
- "args": [],
- "options": {
- "cwd": "${fileDirname}",
- "shell": {
- "executable": "powershell.exe",
- "args": ["-NoProfile", "-Command"]
- }
- },
- "problemMatcher": ["$gcc"],
- "group": {
- "kind": "build",
- "isDefault": true
- },
- "presentation": {
- "echo": false,
- "reveal": "always",
- "focus": true,
- "panel": "shared",
- "showReuseMessage": true,
- "clear": true
- },
- "detail": "Builds, runs, dynamic time, full logging, one-click close, flush top"
- }
- ]
-}-
\ No newline at end of file