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 = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("$containerName"))
            $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
    }
}
Export-ModuleMember -Function Convert-BCDevAppsToRuntimePackages

# SIG # Begin signature block
# MIInngYJKoZIhvcNAQcCoIInjzCCJ4sCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEE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