TheAssemblyArmada / Vanilla-Conquer

Vanilla Conquer provides clean, cross-platform builds of the C&C Remastered Collection and the standalone legacy games.
Other
355 stars 54 forks source link

[Not Bug] Script to launch remaster through terminal #663

Open giulianobelinassi opened 3 years ago

giulianobelinassi commented 3 years ago

This script launches the Remastered Collection launcher executable through a Linux Terminal under Debian. It includes a commented line to launch it with GDB, but I was not able to get past the SIGTRAP signal that the program received under GDB. I wonder if the game have some sort of debugger trapper so debugging is made difficult.

The game seems to run on 32-bit mode.

#!/bin/bash

GDB_SERVER_LISTEN=localhost:12345

## VERY IMPORTANT: MAKE SURE TO USE THE 32-BIT VERSION!
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.i686.json
##

export LD_LIBRARY_PATH=/overrides/lib/x86_64-linux-gnu:/overrides/lib/x86_64-linux-gnu/aliases:/overrides/lib/i386-linux-gnu:/overrides/lib/i386-linux-gnu/aliases:${HOME}/.steam/debian-installation/steamapps/common/CnCRemastered
export LIBGL_DRIVERS_PATH=/overrides/lib/x86_64-linux-gnu/dri:/overrides/lib/i386-linux-gnu/dri
export LIBVA_DRIVERS_PATH=/overrides/lib/x86_64-linux-gnu/dri:/overrides/lib/i386-linux-gnu/dri
export STEAM_COMPAT_CLIENT_INSTALL_PATH=${HOME}/.steam/debian-installation
export STEAM_COMPAT_DATA_PATH=${HOME}/.steam/debian-installation/steamapps/compatdata/1213210
export STEAM_COMPAT_FLAGS=search-cwd
export STEAM_COMPAT_INSTALL_PATH=${HOME}/.steam/debian-installation/steamapps/common/CnCRemastered
export STEAM_COMPAT_LIBRARY_PATHS=${HOME}/.steam/debian-installation/steamapps
export STEAM_COMPAT_MEDIA_PATH=${HOME}/.steam/debian-installation/steamapps/shadercache/1213210/fozmediav1
export STEAM_COMPAT_MOUNTS=
export STEAM_COMPAT_SHADER_PATH=${HOME}/.steam/debian-installation/steamapps/shadercache/1213210
export STEAM_COMPAT_TOOL_PATHS=${HOME}/.steam/debian-installation/steamapps/common/Proton\ -\ Experimental:${HOME}/.steam/debian-installation/steamapps/common/SteamLinuxRuntime_soldier
export STEAM_COMPAT_TRANSCODED_MEDIA_PATH=${HOME}/.steam/debian-installation/steamapps/shadercache/1213210/swarm
export STEAM_FOSSILIZE_DUMP_PATH=${HOME}/.steam/debian-installation/steamapps/shadercache/1213210/fozpipelinesv5/steamapprun_pipeline_cache
export STEAM_RUNTIME_LIBRARY_PATH=${HOME}/.steam/debian-installation/ubuntu12_32/steam-runtime/pinned_libs_32:${HOME}/.steam/debian-installation/ubuntu12_32/steam-runtime/pinned_libs_64:/usr/lib/x86_64-linux-gnu/libfakeroot:/lib/i386-linux-gnu:/usr/local/lib:/lib/x86_64-linux-gnu:/lib32:/libx32:/lib:/lib/i386-linux-gnu/i686:/lib/i386-linux-gnu/sse2:/lib/i386-linux-gnu/i686/sse2:${HOME}/.steam/debian-installation/ubuntu12_32/steam-runtime/lib/i386-linux-gnu:${HOME}/.steam/debian-installation/ubuntu12_32/steam-runtime/usr/lib/i386-linux-gnu:${HOME}/.steam/debian-installation/ubuntu12_32/steam-runtime/lib/x86_64-linux-gnu:${HOME}/.steam/debian-installation/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu:${HOME}/.steam/debian-installation/ubuntu12_32/steam-runtime/lib:${HOME}/.steam/debian-installation/ubuntu12_32/steam-runtime/usr/lib

# With GDB server. Launch another instance of GDB and use `target remote localhost:12345` to connect to the running Windows GDB server.
${HOME}/.steam/debian-installation/steamapps/common/Proton\ -\ Experimental/proton run /usr/share/win32/gdbserver.exe ${GDB_SERVER_LISTEN} ${HOME}/.steam/debian-installation/steamapps/common/CnCRemastered/ClientLauncherG.exe

# Without GDB
#${HOME}/.steam/debian-installation/steamapps/common/Proton\ -\ Experimental/proton run ${HOME}/.steam/debian-installation/steamapps/common/CnCRemastered/ClientLauncherG.exe
OmniBlade commented 3 years ago

https://ppmforums.com/topic-49827/info-command-line-arguments/ shows there are a few command line options that might be needed to attach a debugger successfully.