Search Unity

Fail to switch license for different build platforms

Discussion in 'Editor & General Support' started by DieterWarcave, Jan 6, 2020.

  1. DieterWarcave

    DieterWarcave

    Joined:
    Oct 10, 2018
    Posts:
    4
    So we have an automated build system running on TeamCity to make builds for our project.
    Now, this is targeted for multiple platforms, including PS4, as the ps4 version needs a different license, of course the editor needs to launch with this exact license for this build to work.

    I just run unity from the command line passing the -serial depending on which key we need, but this does not seem to work. Here's the full command.

    "%env.UnityInstallLocation%" -quit -batchmode -serial %env.PS4License% -nographics -projectPath "%teamcity.build.checkoutDir%" -buildTarget %env.BuildTarget% -executeMethod AutomatedBuild.%env.MethodName% -SaveLocation=%env.SaveLocation%\HiddenThroughTime%env.BUILD_NUMBER%\


    If I look at the licensing client logs, it shows the license was granted, with the correct key. But in the build log after that this shows up
    LookupAccountName() failed. Error 1332
    LICENSE SYSTEM [202016 15:10:2] Couldn't set permissions of the license file (Win32_AddFileAccessRights).


    After which it continues to build with the normal license, which of course makes the PS4 build fail.

    Anyone know why this is not working or what I'm doing wrong?
     
    futurlab_xbox likes this.
  2. DieterWarcave

    DieterWarcave

    Joined:
    Oct 10, 2018
    Posts:
    4
    To be clear, the same thing happens if I pass username and password to the command line as well
     
  3. DieterWarcave

    DieterWarcave

    Joined:
    Oct 10, 2018
    Posts:
    4
    I fixed it btw, the issue apparently is if you run it with -nographics it will not update your license, so I split my buildstep into 2 to first start the editor with graphics and license it, then close and then start again with the original command posted above and that seems to work
     
    Joe-Censored likes this.