From e973dc17344aaf3d7cc3f101e8830c8f746bab71 Mon Sep 17 00:00:00 2001 From: Jason Yundt Date: Mon, 6 May 2024 09:19:35 -0400 Subject: [PATCH 1/2] Automatically create netgames/ directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this change, users would have to jump through hoops in order to make sure that they’re using the .d3m files from this repo (as opposed to the .d3m files that came with their version of Descent 3). Specifically, users would have to remove or backup Descent 3’s original netgames/ directory, create a new one, hunt down TCP_IP.d3c and copy it to the new netgames/ directory. This change makes it easier for users to use the latest version of working by creating a netgames/ directory for them. All they have to do is replace the old one with the new one. Fixes #369. --- CMakeLists.txt | 2 +- Descent3/CMakeLists.txt | 2 +- netgames/CMakeLists.txt | 13 +++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba7888bd..344c03eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,10 +198,10 @@ add_subdirectory(Descent3) add_subdirectory(tools) add_subdirectory(netcon) +add_subdirectory(netgames) # For now we don't need to build the scripts under windows, so we'll only include # the directory when building for linux/osx. In the future we may want to to fix bugs, etc. if(UNIX) - add_subdirectory(netgames) add_subdirectory(scripts) endif() diff --git a/Descent3/CMakeLists.txt b/Descent3/CMakeLists.txt index e2003bac..f1e5690e 100644 --- a/Descent3/CMakeLists.txt +++ b/Descent3/CMakeLists.txt @@ -302,7 +302,7 @@ target_link_libraries(Descent3 music networking physics renderer rtperformance sndlib ui unzip vecmat md5 ${PLATFORM_LIBS}) target_include_directories(Descent3 PRIVATE ${PROJECT_BINARY_DIR}/lib) -add_dependencies(Descent3 get_git_hash Direct_TCP_IP_Hog) +add_dependencies(Descent3 get_git_hash Direct_TCP_IP_Hog NetgamesDir) if(UNIX) add_dependencies(Descent3 HogFull) diff --git a/netgames/CMakeLists.txt b/netgames/CMakeLists.txt index 24314c66..b8460e82 100644 --- a/netgames/CMakeLists.txt +++ b/netgames/CMakeLists.txt @@ -9,3 +9,16 @@ add_subdirectory(hyperanarchy) add_subdirectory(monsterball) add_subdirectory(roboanarchy) add_subdirectory(tanarchy) + +add_custom_target(NetgamesDir + COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/Anarchy.d3m" + COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/Co-op.d3m" + COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/CTF.d3m" + COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/Entropy.d3m" + COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/Hoard.d3m" + COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/Hyper-Anarchy.d3m" + COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/Monsterball.d3m" + COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/Robo-Anarchy.d3m" + COMMAND ${CMAKE_COMMAND} -E copy $ "$/netgames/Team Anarchy.d3m" + COMMENT "Create netgames/ directory" +) From e246c01fb3b85c0b5b9106b09cb38aeeb5e49943 Mon Sep 17 00:00:00 2001 From: Jason Yundt Date: Mon, 6 May 2024 12:07:40 -0400 Subject: [PATCH 2/2] Revamp usage instructions This commit revamps the usage instructions in order to accomplish two goals: 1. Make the instructions easier to follow by turning them into a numbered list. 2. Make sure that macOS and Linux users install all of the built libraries for their platforms. --- README.md | 85 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 77 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 992a5747..cdfeec53 100644 --- a/README.md +++ b/README.md @@ -9,17 +9,86 @@ There is no "release" yet. The current milestone is "1.5 Stable", which is meant The milestone needs testing on all platforms. Please report issues when found. ## Usage -Purchase Descent 3 from a reputable source, such as [GOG](https://www.gog.com/game/descent_3_expansion) or [Steam](https://store.steampowered.com/app/273590/Descent_3/), and install it, then replace the main binary with the newly built `Descent3` binary under `${CMAKE_BINARY_DIR}/Descent3/*/Descent3[.exe]`. -See your platform below: +1. Make sure that you have a copy of Descent 3. You can purchase a copy of Descent 3 from [GOG](https://www.gog.com/game/descent_3_expansion) or [Steam](https://store.steampowered.com/app/273590/Descent_3/). +2. Install Descent 3. -#### Windows -If still using the Descent 3 launcher, copy your `Descent3.exe` binary to your install folder and rename it `main.exe` (back up your old one). Otherwise, drop in `Descent3.exe` and play! + - **Note for Steam users:** If you own Descent 3 on Steam, then it’s recommended that you install the Windows version of the game even if you’re running macOS or Linux, otherwise movies will not work due to [current lack of Ogv support](https://github.com/DescentDevelopers/Descent3/issues/240). You can use either [Steam Play](https://help.steampowered.com/en/faqs/view/08F7-5D56-9654-39AF) or [SteamCMD](https://developer.valvesoftware.com/wiki/SteamCMD#Cross-Platform_Installation) to install the Windows version of the game on macOS or Linux. -#### MacOS -Right-click Descent3.app, click Show Package Contents. Back up your `Descent3` binary and drop your built `Descent3` binary into the install (Contents/MacOS) folder. + - **Note for non-Windows users:** If you have the Windows version of the game on CDs but you don’t want to use Windows to install them, then you can follow these instructions: -#### Linux -Back up your `Descent3` binary and drop your built `Descent3` binary into the install folder. +
+ How to install the Windows Dual-Jewel version of Descent 3 in Wine + +
    +
  1. Make sure that you have Wine installed.
  2. +
  3. (Recommended) Run winecfg and make sure that “Emulate a virtual desktop” is enabled.
  4. +
  5. +

    (Optional) Determine if you’re going to be affected by a bug with Descent 3’s installer, and potentially apply a workaround:

    +
      +
    1. Download Environment Size Checker.
    2. +
    3. Run wine environment-size-checker.exe.
    4. +
    5. If that program tells you that your environment is more than 32,724 bytes large, then you’ll need to unset or shorten environment variables before running Descent 3’s installer. If you don’t, then the installer will page fault.
    6. +
    +
  6. +
  7. +

    Install Descent 3:

    +
      +
    1. Insert disc 1.
    2. +
    3. Make sure that disc 1 is mounted.
    4. +
    5. Determine which drive letter Wine is using for your CD drive. (Hint: try running wine explorer).
    6. +
    7. Run wine '<drive-letter>:\Setup.exe'.
    8. +
    9. Follow the installation wizard’s instructions until it asks you to choose a “Setup Type”.
    10. +
    11. Select the “Full” Setup Type, then click “Next”. +
    12. Continue following the installation wizard’s instructions until it asks you to insert disc 2.
    13. +
    14. +

      Switch to disc 2:

      + +
        +
      • Run wine eject <drive-letter>:.
      • +
      • Make sure that the disc was unmounted and ejected.
      • +
      • Insert disc 2.
      • +
      • Mount disc 2.
      • +
      +
    15. +
    16. Continue following the installation wizard’s instructions until it asks you to insert disc 1 again.
    17. +
    18. Switch back to disc 1. Follow a similar procedure to the one that you used to switch to disc 2.
    19. +
    20. Finish the going through the installation wizard.
    21. +
    22. When the installation wizard finishes, it will open an explorer window. Close out of that window.
    23. +
    24. Unmount the disc.
    25. +
    26. Eject the disc.
    27. +
    +
  8. +

    Install Descent 3: Mercenary:

    +
      +
    1. Insert disc 3.
    2. +
    3. Make sure that disc 3 is mounted.
    4. +
    5. Run wine start /d <drive-letter>: setup.exe -autorun.
    6. +
    7. Follow the instructions in the installation wizard.
    8. +
    +
  9. +
+ +
+ +3. If your version of Descent 3 is older than v1.4, then [update it to v1.4](http://descent3.com/downloads.php). +4. Create a new folder named `D3-open-source`. +5. Copy the following files from your installation of Descent 3 to `D3-open-source`: + - All `.hog` files, except for `d3-linux.hog` + - The `missions` folder + - _(Optional)_ All `.pld` files + - _(Optional)_ The `demo` folder + - _(Optional)_ The `movies` folder +6. Create the following folders in `D3-open-source`: + - `cache/` + - `custom/` + - `custom/cache/` +7. Obtain new Descent 3 engine files: + - If you want to use pre-built binaries, then download one of the artifacts from our latest CI run. You can find a list of CI runs [here](https://github.com/DescentDevelopers/Descent3/actions/workflows/build.yml?query=branch%3Amain). + - If you want to build the engine files yourself, the follow [these instructions](#building). Once you build the engine files, they’ll be put in `builds//Descent3//`. For example, if you’re using Linux and you create a “Release” build, then the files will be located at `builds/linux/Descent3/Release`. +8. Copy all of the new engine files into `D3-open-source`. +9. Run the game: + - On Windows, run `D3-open-source\Descent3.exe`. + - On other platforms, run `D3-open-source/Descent3`. ## Building Build steps below assume you have already cloned the repository and entered it locally.