Apps/Convert-BCDevAppsToRuntimePackages.ps1

<#
 .Synopsis
  Preview function for Converting BC Apps to Runtime Packages
 .Description
  Preview function for Converting BC Apps to Runtime Packages
 .Parameter showMyCode
  Include this switch if you want to include the app's source code in the runtime package.
 .Parameter includeSourceInPackageFile
  Include this switch if you want to include source code in the runtime package.
 .Parameter skipFailingApps
  If set, a failing app (compiler error or anything else) does not stop the whole process but continues with the next app.
 .Parameter afterEachRuntimeCreation
  A script block to be executed after an app has been converted to a runtime package.
  The parameters are 'appFile', containing the source path and 'runtimeFile' containing the path
  to the newly extracted runtime file or $null if the process has failed and skipFailingApps has been set.
#>

function Convert-BCDevAppsToRuntimePackages {
    Param(
        [string] $containerName = $bcContainerHelperConfig.defaultContainerName,
        [Parameter(Mandatory=$false)]
        [string] $imageName = "my",
        [Parameter(Mandatory=$true)]
        $artifactUrl,
        [Parameter(Mandatory=$false)]
        [string] $licenseFile = "",
        [Parameter(Mandatory=$false)]
        [string] $addinsFolder,
        [Parameter(Mandatory=$false)]
        $publishApps = "",
        [Parameter(Mandatory=$true)]
        $apps,
        [Parameter(Mandatory=$false)]
        $destinationFolder = "",
        [bool] $includeSourceInPackageFile,
        [bool] $showMyCode,
        [switch] $skipVerification,
        [switch] $skipFailingApps,
        [scriptblock] $afterEachRuntimeCreation = {}
    )

try {

    $appsFolder = Join-Path ([System.IO.Path]::GetTempPath()) ([Guid]::NewGuid().ToString())
    try {

        $apps = @(Sort-AppFilesByDependencies -appFiles (Copy-AppFilesToFolder -appFiles $apps -folder $appsFolder) -WarningAction SilentlyContinue)
        if ($apps.Count -eq 0) {
            throw "No apps specified"
        }
        if ($publishApps) {
            $publishApps = Copy-AppFilesToFolder -appFiles $publishApps -folder $appsFolder
        }

        if (!($destinationFolder)) {
            $destinationFolder = Join-Path ([System.IO.Path]::GetTempPath()) ([Guid]::NewGuid().ToString())
            New-Item -Path $destinationFolder -ItemType Directory | Out-Null
        }
        elseif (Test-Path $destinationFolder) {
            if (Get-ChildItem -Path $destinationFolder) {
                throw "Destination folder is not empty"
            }
        }
        else {
            New-Item -Path $destinationFolder -ItemType Directory | Out-Null
        }

        $password = GetRandomPassword
        $credential= (New-Object pscredential 'admin', (ConvertTo-SecureString -String $password -AsPlainText -Force))

        $additionalParameters = @(
                "--volume ""$($appsFolder):c:\apps"""
                "--volume ""$($destinationFolder):c:\dest"""
                "--env WebClient=N"
                "--env httpSite=N"
             )

        if ($addinsFolder) {
            $additionalParameters += @(
               "--volume ""$($addInsFolder):c:\run\add-ins"""
            )
        }

        New-BcContainer `
            -containerName $containerName `
            -imageName $imageName `
            -accept_eula `
            -accept_insiderEula `
            -shortcuts None `
            -artifactUrl $artifactUrl `
            -auth UserPassword `
            -multitenant:$false `
            -Credential $credential `
            -licenseFile $licenseFile `
            -additionalParameters $additionalParameters

        $bcVersion = (Get-BcContainerNavVersion -containerOrImageName $containerName).ToLowerInvariant()

        if ($publishApps) {
            $publishApps = Sort-AppFilesByDependencies -containerName $containerName -appFiles $publishApps -WarningAction SilentlyContinue
            $publishApps | ForEach-Object {
                Invoke-ScriptInBcContainer -containerName $containerName -scriptblock { Param($appFile, $skipVerification)
                    Write-Host "Publishing $([System.IO.Path]::GetFileName($appFile))"
                    Publish-NavApp -ServerInstance $serverInstance -path $appFile -skipVerification:$skipVerification -packageType Extension
                } -argumentList (Get-BcContainerPath -containerName $containerName -path $_), $skipVerification
            }
        }

        $apps | ForEach-Object {
            $appFile = $_

            try {
                $afterEachRuntimeCreationParameters = @{ 'appFile' = $appFile }

                $runtimeFileName = Invoke-ScriptInBcContainer -containerName $containerName -scriptblock { Param($appFile, $destinationFolder, $bcVersion, $skipVerification, $showMyCode, $isShowMyCodePresent, $includeSourceInPackageFile, $isIncludeSourceInPackageFilePresent)
                    Write-Host "Publishing $([System.IO.Path]::GetFileName($appFile))"

                    Publish-NavApp -ServerInstance $serverInstance -path $appFile -skipVerification:$skipVerification -packageType Extension
                    $navAppInfo = Get-NAVAppInfo -Path $appFile

                    $appPublisher = $navAppInfo.Publisher
                    $appName = $navAppInfo.Name
                    $appVersion = $navAppInfo.Version
                    $appFileName = "$($appPublisher)_$($appName)_$($appVersion).runtime-$($bcVersion).app".Split([System.IO.Path]::GetInvalidFileNameChars()) -join ''
                    $params = @{
                        "ServerInstance" = $serverInstance
                        "appName" = $appName
                        "appPublisher" = $appPublisher
                        "appVersion" = $appVersion
                        "path" = (Join-Path $destinationFolder $appFileName)
                    }
                    if ($isShowMyCodePresent) {
                        $params += @{ "showMyCode" = $showMyCode }
                    }
                    if ($isIncludeSourceInPackageFilePresent) {
                        $params += @{ "includeSourceInPackageFile" = $includeSourceInPackageFile }
                    }
                    Write-Host "Creating Runtime Package $([System.IO.Path]::GetFileName($appFileName))"
                    Get-NavAppRuntimePackage @params

                    return $appFileName
                } -argumentList (Get-BcContainerPath -containerName $containerName -path $appFile), (Get-BcContainerPath -containerName $containerName -path $destinationFolder), $bcVersion, $skipVerification, $showMyCode, $PSBoundParameters.ContainsKey('ShowMyCode'), $includeSourceInPackageFile, $PSBoundParameters.ContainsKey('includeSourceInPackageFile')

                $afterEachRuntimeCreationParameters += @{ 'runtimeFile' = (Join-Path -Path $destinationFolder -ChildPath $runtimeFileName) }
            }
            catch {
                if (!$skipFailingApps.IsPresent) {
                    throw
                }

                Write-Warning -Message "Failed creating Runtime Package for $($appFile)."
                $afterEachRuntimeCreationParameters += @{ 'runtimeFile' = $null }
            }

            $afterEachRuntimeCreation.Invoke($afterEachRuntimeCreationParameters)
        }

        $destinationFolder
    }
    finally {
        Remove-BcContainer -containerName $containerName
        if (Test-Path $appsFolder) {
            Remove-Item $appsFolder -Recurse -Force -ErrorAction SilentlyContinue
        }
    }
}
catch {
    throw
}
finally {
}
}
Export-ModuleMember -Function Convert-BCDevAppsToRuntimePackages

# SIG # Begin signature block
# MIInpAYJKoZIhvcNAQcCoIInlTCCJ5ECAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYC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