override fun makeProgramCommandLine()

in plugin-unity-agent/src/main/kotlin/jetbrains/buildServer/unity/license/commands/ActivatePersonalLicenseCommand.kt [32:58]


    override fun makeProgramCommandLine(): ProgramCommandLine {
        tempLicenseFile = fileSystemService.createTempFile(
            directory = build.buildTempDirectory.toPath(),
            prefix = "unity-personal-license-",
            suffix = ".ulf",
        )

        val licenseContent = build.licenseContent()
            ?: throw IllegalStateException("Personal license content is not provided")
        fileSystemService.writeText(tempLicenseFile, licenseContent)
        val arguments = listOf(
            "-quit",
            "-batchmode",
            "-nographics",
            "-manualLicenseFile",
            resolvePath(tempLicenseFile.absolutePathString()),
            "-logFile",
            resolvePath(logFile.absolutePathString()),
        )

        return SimpleProgramCommandLine(
            context.environmentVariables,
            resolvePath(context.workingDirectory),
            resolvePath(unityEnvironment.unityPath),
            arguments,
        )
    }