Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2009
    Location
    Atlantis
    Posts
    167

    Client folder not zipped up with the correct path

    When my launcher unzips the client, the unity exe and dlls are unzipped to Launcher\Client\Build\Work\Client\BuzzMMO.exe
    instead of
    Launcher\Client\BuzzMMO.exe

    looking at my project when I do a build the client.zip in BuzzMMO.Launcher\bin\Debug\Client\Client.zip contains the Build\Work\Client\
    instead of just the unity.exe
    So I guess the problem is when that folder is getting built

    So the launcher cant find the unity exe when it trys to run it.

    looking at the deploy client code in the .proj file I cant see any errors any of guys see where I might be getting things wrong

    Code:
    <Exec Command='"$(UnityPath)\Editor\Unity.exe" -nographics -quit -batchmode -projectpath "$(MSBuildThisFileDirectory)../Unity\Client" -buildWindowsPlayer "$(MSBuildThisFileDirectory)..\Build\Work\Client\BuzzMMO.exe"' />
    
    
        <CreateItem Include="$(MSBuildThisFileDirectory)..\Build\Work\Client\**\*.*">
          <Output TaskParameter="Include"  ItemName="ClientZipFiles" />
        </CreateItem>
    
    
        <Zip ZipFileName="$(MSBuildThisFileDirectory)..\Build\Client\Client.zip" Files="@(ClientZipFiles)" WorkingDirectory="$(MSBuildThisFileDirectory)..\Build\Work\Client"  />
    Last edited by GreyWalker; 05-05-2016 at 06:29 PM.

  2. #2
    Join Date
    Feb 2014
    Posts
    277
    I can follow the logic of your description.
    Just to compare apples with apples, here's the relevant section of my BuzzMMOBuild.proj for you to compare. Hopefully it will show where you are getting the extra path depth in your target folder.

    Code:
      <Target Name="DeployClient" DependsOnTargets="BuildSolution">
        <RenderUnityClientConfiguration
          Env="$(Env)"
          ClientConfigFolder="$(MSBuildThisFileDirectory)/BuzzMMO.Client.Unity/Config"
          UnityConfigFolder="$(MSBuildThisFileDirectory)../Unity/Client/Assets/Resources" />
    
        <Exec Command='"$(UnityPath)\Editor\Unity.exe" -nographics -quit -batchmode -projectpath "$(MSBuildThisFileDirectory)..\unity\Client" -buildWindowsPlayer "$(MSBuildThisFileDirectory)..\Build\Work\Client\BuzzMMO.exe"' />
    
        <CreateItem Include="$(MSBuildThisFileDirectory)..\Build\Work\Client\**\*.*">
          <Output TaskParameter="Include" ItemName="ClientZipFiles" />
        </CreateItem>
    
        <Zip ZipFileName="$(MSBuildThisFileDirectory)..\Build\Client\Client.zip" Files="@(ClientZipFiles)" WorkingDirectory="$(MSBuildThisFileDirectory)..\Build\Work\Client" />
    
        <UploadFile
          Type="Client"
          Env="$(Env)"
          Domain="$(Domain)"
          DeployToken="$(DeployToken)"
          File="..\Build\Client\Client.zip"
          Timestamp="$(Timestamp)"
          VersionNumber="$(VersionNumber)" />

  3. #3
    Join Date
    Dec 2009
    Location
    Atlantis
    Posts
    167
    Thanks OldnGrey
    Its still building the Build\Work\Client path within the zip file. Even if I remove that path from the end of the ZipFileName.

    I wonder if the problem is in the mainWindowXaml.cs file. it specifically fails on the line, await LaunchClient(httpClient);
    cannot find the file specified but I'm sure that is due to the way the zip fie has added the extra path.

  4. #4
    Join Date
    Feb 2014
    Posts
    277
    Hmm, so that bit didn't fix it? Odd. I assume you paid strict attention to the \ instead of / as well as the number of ..\ littering the code.
    Also stare at each time you see MSBuildThisFileDirectory to see if you didn't mis-spell it like I seem to always do.

    I did look through the launcher project code but it grabs the zip and takes the files from it. If the zip already has the extended path, then it's nothing the launcher can do. It's responsible only for making sure the "Client" folder exists inside the launcher's folder and dumping the contents of the zip into it. Do you get the temp folder being created and vanishing? That always amused me when I was doing this video.

  5. #5
    Join Date
    Dec 2009
    Location
    Atlantis
    Posts
    167
    Yeah the temp file gets created then gets deleted in the launcher/bin/debug folder. In my C:\BuzzMMo\build\work\client folder the client files are all there as should be, its just when the zip gets created the path is added to it for some reason. arrrrrgh

  6. #6
    Join Date
    Dec 2009
    Location
    Atlantis
    Posts
    167
    Not really a solution but if I use a fully qualified path to the working directory it works.
    WorkingDirectory="C:\BuzzMMO\Build\Work\Client" I've tried all manner of forward slashes and backward slashes but it looks like its not picking up the working directory properly when I use
    WorkingDirectory="$(MSBuildThisFileDirectory)..\Bu ild\Work\Client"
    (its not a typo in the word build the forum is inserting a space there when i post a message)


    I wonder if there may be bug in the latest MSBuild Community Tasks.
    Last edited by GreyWalker; 05-15-2016 at 11:09 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •