I'm trying to implement a GitHub action that compiles .mq4
files. Currently, I've got a Powershell script that does that, according to the format described here:
$url = "http://www.rosasurfer.com/.mt4/{0}/metaeditor.exe" -f $Version
$exePath = "metaeditor.exe"
if ($verbose) {
Write-Host "Attempting download from $($url)..."
}
try {
Invoke-WebRequest -Uri $url -OutFile $exePath
} catch {
Write-Error "Failed to download MetaEditor from $($url), error: $($_.Exception.Message)"
}
Out-File -FilePath $LogFile
$args = New-Object System.Collections.Generic.List[string]
$args.Add("/portable")
$args.Add('/compile:"{0}"' -f (Resolve-Path $Files))
$args.Add('/inc:"{0}"' -f (Resolve-Path $Includes))
$args.Add('/log:"{0}"' -f (Resolve-Path $LogFile))
if ([System.Convert]::ToBoolean($SyntaxOnly)) {
$args.Add("/s")
}
$exePath = Resolve-Path $exePath
try {
Start-Process $exePath -ArgumentList $args
} catch {
Write-Error "Compilation failed, error: $($_.Excaption.Message)"
}
gc $LogFile
The issue I'm having is that this script doesn't fail, but doesn't produce an .ex4
files either. The log file is also empty. I tried using fully-qualified paths to the instance of metaeditor
, the input files, include directory and log file as was suggested here, but I'm still not getting anything.