CnCNet Yuri's Revenge Build Instructions - CnCNet/cncnet-yr-client-package GitHub Wiki

Build & Package Workflow

This guide outlines the steps for updating, building, and packaging the xna-cncnet-client release for Red Alert 2: Yuri’s Revenge and publishing a new version of the client for players.

Updating the Base XNA Client for the package

  1. Clone the repository (if not already cloned):

    git clone [email protected]:CnCNet/xna-cncnet-client.git
    cd xna-cncnet-client
    
  2. Pull the latest develop branch or checkout a specific release commit:

    git checkout develop
    git pull origin develop
    # OR: git checkout <commit-hash>
    
  3. Switch to yr/develop branch:

    • If it doesn't exist locally:
      git checkout -b yr/develop origin/yr/develop
      
    • If it already exists locally:
      git checkout yr/develop
      git pull origin yr/develop
      
  4. Merge changes from develop:

    git merge develop
    
  5. Update the release version and Git hash:

    • Edit: DXMainClient/DXGUI/Multiplayer/CnCNet/CnCNetLobby.cs or MainMenu/MainMenuForm.cs
    • Example commit: ee5eda
  6. Run the client in Visual Studio to ensure it compiles and launches correctly.

    • Commit the change and latest merged files to the yr/develop branch once complete.
  7. Build the client using the build script:

    • Go to the scripts folder
    • Double-click Build.bat
  8. Copy the compiled output:

    • Find the compiled files in:
      Compiled/YR/Resources/
    • Copy all files from there.
  9. Paste files into the package repository:

    • Go to your local cncnet-yr-client-package repo.
    • Paste into:
      package/Resources/
    • You must get a prompt to replace files. If not, you're in the wrong directory.
  10. Run the packaged client to test:

    • Launch: CnCNetYRLauncher.exe
    • Verify the version hash and client version in the online lobby.
    • Does it work?
  11. Push changes:

    • Create a new branch and push for review

Updating the Yuris Revenge Package:

  1. Make new draft release on github:

  2. Increment or choose a new tag:

    • Choose tag: yr-8.73 just increment the version, if a hot fix increment 0.0.1, normal release increment 0.1
  3. Ensure branch is develop:

    • Target branch should be develop. Populate title and description.
  4. Publish Release:

    • Click 'Publish Release', this triggers Github actions to automatically create a release build on the server, 5-10mins.
  5. WinSCP:

    • Once it's done, open Winscp or putty to connect to the "new-secure" server and go to: /home/cncnet/downloads.cncnet.org/public/updates/games/yr/updates you will see a directory created with the version you specified.
  6. WinSCP Server Steps:

    • At /home/cncnet/downloads.cncnet.org/public/updates/games/yr you can update the link for DEV, LIVE, the client will then use those builds
    • To test in DEV: edit symbolic link for dev to the new version e.g. updates/8.73.0. Always best to test the update in DEV first
    • To update live: edit symbolic link for live to the new version e.g. updates/8.73.0
    • Copy the CnCNet5_YR_Installer_$version.exe from the release page to /home/cncnet/downloads.cncnet.org/public/CnCNet5_YR_Installer.exe (ensuring the file is owned by cncnet:cncnet)
  7. Client Test:

    • Open client and download the update and make sure it downloads successfully