FAKEFACTORY / CM2013

Cinematic Mod 2013 Sourcecode
Other
48 stars 16 forks source link

Getting this to work on Linux #1

Open darealshinji opened 7 years ago

darealshinji commented 7 years ago

With some changes I was able to build this in a 32 bit chroot and run the mod_episodic and mod_hl2 directories as sourcemods on my Ubuntu 16.04 (64 bits) system. However when I start a map I only get a big purple checkerboard texture on my screen (happens for the menu background map too). I can hear that footsteps when I walk, so it is actually working (sort of).

dazzlesoftware commented 7 years ago

I can do a pull request if your still intrested as its not that hard actually to make this work on Linux. I managed to rebuild this on Centos 7 maybe so we can get patches pulled in.

darealshinji commented 7 years ago

Yes, I'm interested to get this to work on Linux.

darealshinji commented 7 years ago

According to this post Transmission: Element 120 has a version of the Source shader editor converted to Linux. IIRC the shader editor stuff was causing issues when trying to compile on Linux.

Here's the source code repository for TE120: https://github.com/shokunin000/te120

ghost commented 6 years ago

Okay, so I need the data from the rar's (textures, models +++++) and the compiled code from this repo. How ( while the 1.2 torrent, 1.2 to 1.4 update downloading and the source from @darealshinji 's linux branch compiling ) do i structure this when everything is done ?

darealshinji commented 6 years ago

I've copied all the required Linux binaries into the CM2013 folder, but running the game with ./hl2.sh -game CMhl2 gives me this error:

Unable to load surface prop file 'scripts/surfaceproperties.txt' (referenced by manifest file 'scripts/surfaceproperties_manifest.txt')

Any ideas?

mirh commented 6 years ago

For as much as I know, you may want to check case sensitivity of almost every file.

ghost commented 6 years ago

Could there be a small instruction set on how to build successfully ? What packages need to be installed, what SDK's need to be installed etc. make -f everything.mak (okay, but it fails with the following) collect2: error: ld returned 1 exit status ../../devtools/makefile_base_posix.mak:485: recipe for target 'obj_client_hl2_linux32/release/client.so' failed make[2]: *** [obj_client_hl2_linux32/release/client.so] Error 1 make[2]: Leaving directory '/home/source/git/CM2013/sp/src/game/client' everything.mak:31: recipe for target 'client_hl2' failed make[1]: *** [client_hl2] Error 2 make[1]: *** Waiting for unfinished jobs.... collect2: error: ld returned 1 exit status ../../devtools/makefile_base_posix.mak:485: recipe for target 'obj_client_episodic_linux32/release/client.so' failed make[2]: *** [obj_client_episodic_linux32/release/client.so] Error 1 make[2]: Leaving directory '/home/source/git/CM2013/sp/src/game/client' everything.mak:35: recipe for target 'client_episodic' failed make[1]: *** [client_episodic] Error 2 ~/git/CM2013/sp/src/game/server ---- COPYING TO ../../../game/mod_hl2/bin/server_srv.so ---- ~/git/CM2013/sp/src/game/server ---- COPYING TO ../../../game/mod_episodic/bin/server_srv.so ----

darealshinji commented 6 years ago

You need to build with a 32 bit gcc, preferrably an older one like gcc 4.8. Here's my new branch, using that should be easier: https://github.com/darealshinji/CM2013/tree/Linux-new

ghost commented 6 years ago

4.8 ? that's VERY old at this point.. Why this specific version ?

darealshinji commented 6 years ago

You can try a newer version but it may not compile completely.

ghost commented 6 years ago

True, but your changes are hardcoded to 4.8, so..

ghost commented 6 years ago

oookay, I am soooo sorry, I didn't realize I could / needed to create a chroot for i386. I'm getting the chroot set up now and I'll try compiling again when I get that far. Have you folks managed to get it running properly ?

ghost commented 6 years ago

Okay, got it to compile correctly, but I'm suspecting that I might have needed to have this placed in a specific place for it to complete correctly. I really wish there was a explanation or guide somewhere on where the different folders should be when compiling and/or when putting everything together.

bicobus commented 6 years ago

Hello there folks. @darealshinji do you have any insight as to how compile this project?

I created a i386 chroot. Then changed the target gcc to the one available on my machine (gcc6). However the client part fails to compile, similarly to what was posted above. failure.txt

It proved quite challenging to get gcc4.8 on here, so I abandoned the idea. Is there a specific protocol to be able to achieve this project?

Update: I rebuilt the protobuf library and that got rid of most of the errors. The issue I am having now is that I didn't create a good chroot. I need the steam runtimes because of the existing proprietary software in the repository.

darealshinji commented 5 years ago

I gave this another try. Turns out you don't need to build it in a chroot, you just need the packages gcc-4.8-multilib and g++-4.8-multilib installed. Here are the steps how to build it and copy the files into the CM2013 directory:

Extract CM2013 from the installer pak files using 7za:

7za x -oCM2013_extracted PATH/TO/CM2013_v1.2_Full/FILES/Bigfile.pak
7za x -y -oCM2013_extracted PATH/TO/CM2013_v1.2_to_1.24/FILES/Bigfile.pak

Download and build CM2013:

sudo apt install git gcc-4.8-multilib g++-4.8-multilib
git clone https://github.com/darealshinji/CM2013 CM2013_source
cd CM2013_source/sp/src
./createallprojects
make -f everything.mak CC=gcc-4.8 CXX=g++-4.8

Copy all .so files from CM2013_source/sp/game/mod_episodic/bin into CM2013_extracted/CMepisodic/bin. Copy all .so files from CM2013_source/sp/game/mod_hl2/bin into CM2013_extracted/CMhl2/bin and into CM2013_extracted/CMep2/bin.

Download Source 2013 runtime files from Steam: Launch Steam, select "Library -> Tools" and install "Source SDK Base 2013 Singleplayer". After the download finished it should be installed in ~/.local/share/Steam/steamapps/common/Source SDK Base 2013 Singleplayer. Go there and copy hl2.sh and hl2_linux into CM2013_extracted. Copy all files inside bin into CM2013_extracted/bin (replacing existing files should be fine).

Add the Steam runtime to your library search paths and launch the CM:

steam_runtime_library_paths=$("$HOME/.local/share/Steam/ubuntu12_32/steam-runtime/run.sh" --print-steam-runtime-library-paths)
export LD_LIBRARY_PATH="$steam_runtime_library_paths"
./hl2.sh -game CMhl2

And then it complains about that manifest file: Unable to load surface prop file 'scripts/surfaceproperties.txt' (referenced by manifest file 'scripts/surfaceproperties_manifest.txt')

Those files are present at CM2013_extracted/hl2/custom/1_CM_looseFiles/scripts so not sure what it's all about. Maybe someone else can figure it out.

dima424658 commented 3 years ago

I gave this another try. Turns out you don't need to build it in a chroot, you just need the packages gcc-4.8-multilib and g++-4.8-multilib installed. Here are the steps how to build it and copy the files into the CM2013 directory:

Extract CM2013 from the installer pak files using 7za:

7za x -oCM2013_extracted PATH/TO/CM2013_v1.2_Full/FILES/Bigfile.pak
7za x -y -oCM2013_extracted PATH/TO/CM2013_v1.2_to_1.24/FILES/Bigfile.pak

Download and build CM2013:

sudo apt install git gcc-4.8-multilib g++-4.8-multilib
git clone https://github.com/darealshinji/CM2013 CM2013_source
cd CM2013_source/sp/src
./createallprojects
make -f everything.mak CC=gcc-4.8 CXX=g++-4.8

Copy all .so files from CM2013_source/sp/game/mod_episodic/bin into CM2013_extracted/CMepisodic/bin. Copy all .so files from CM2013_source/sp/game/mod_hl2/bin into CM2013_extracted/CMhl2/bin and into CM2013_extracted/CMep2/bin.

Download Source 2013 runtime files from Steam: Launch Steam, select "Library -> Tools" and install "Source SDK Base 2013 Singleplayer". After the download finished it should be installed in ~/.local/share/Steam/steamapps/common/Source SDK Base 2013 Singleplayer. Go there and copy hl2.sh and hl2_linux into CM2013_extracted. Copy all files inside bin into CM2013_extracted/bin (replacing existing files should be fine).

Add the Steam runtime to your library search paths and launch the CM:

steam_runtime_library_paths=$("$HOME/.local/share/Steam/ubuntu12_32/steam-runtime/run.sh" --print-steam-runtime-library-paths)
export LD_LIBRARY_PATH="$steam_runtime_library_paths"
./hl2.sh -game CMhl2

And then it complains about that manifest file: Unable to load surface prop file 'scripts/surfaceproperties.txt' (referenced by manifest file 'scripts/surfaceproperties_manifest.txt')

Those files are present at CM2013_extracted/hl2/custom/1_CM_looseFiles/scripts so not sure what it's all about. Maybe someone else can figure it out.

I've just built project following your instuctions inside ubuntu 16.04 LTS chroot with no issues. To fix surface prop file error you'll need to rename CMhl2, hl2/custom/1_CM_looseFiles to underscore cmhl2, hl2/custom/1_cm_loosefiles

изображение

darealshinji commented 3 years ago

I've just built project following your instuctions inside ubuntu 16.04 LTS chroot with no issues. To fix surface prop file error you'll need to rename CMhl2, hl2/custom/1_CM_looseFiles to underscore cmhl2, hl2/custom/1_cm_loosefiles

Wow, thanks. I knew it was some case-sensitivity issue. I'll bookmark it and at some point I might write a script that does all the installation process.

darealshinji commented 1 year ago

Revisiting this after a long time. I'm getting it to run now, however I get this texture error, as if something is missing. I'm also getting error messages in the console about missing shaders.

d1_canals_010001