RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Return to Castle Wolfenstein - IORTCW source port

    Scheduled Pinned Locked Moved General Discussion and Gaming
    rtcwreturn to castlwolfensteiniortcwports
    125 Posts 19 Posters 36.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tpo1990T
      tpo1990 @Cesarpuig
      last edited by

      I have good news to announce. Thanks to @Cesarpuig and others here at the RetroPie community the port now works again.

      As you all should know by now compilation was broken due to gles support not being installed since it couldn't find the necessary gles library files in the system. It has now been fixed and the scriptmodule has been improved without the need of the make-raspberry.sh script from the source files. Libgles1-mesa-dev has been added to fix gles in compilation with the help from Cesarpuig.

      I tested it on my Raspberry Pi 3B with latest RetroPie and it works as expected, however I haven't tested support for Raspberry Pi 4 RetroPie yet. Can someone test it out and confirm if it works or not?

      If you already have the rtcw.sh scriptmodule in your RetroPie-Setup, remove the file by going into /home/pi/RetroPie-Setup/scriptmodules/ports/ and then use the download link again from this topic.

      Thank you all.

      Greetings from Denmark. :-)

      Developer of install scripts for ports such as Hexen 2, Return to Castle Wolfenstein and Caesar III. See my other projects at my profile.

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        @tpo1990 said in Return to Castle Wolfenstein - IORTCW source port:

        Libgles1-mesa-dev has been added to fix gles in compilation with the help from Cesarpuig.

        That won't work (and just tested it and it doesn't) since libgles1-mesa-dev is not present in Raspbian/Debian Buster anymore. You're probably still running on Raspbian Stretch, even if you run the latest RetroPie.

        Package libgles1-mesa-dev is not available, but is referred to by another package.
        This may mean that the package is missing, has been obsoleted, or
        is only available from another source
        However the following packages replace it:
          libglvnd-dev
        
        E: Package 'libgles1-mesa-dev' has no installation candidate
        Could not install package(s): libgles1-mesa-dev.
        
        C tpo1990T 2 Replies Last reply Reply Quote 0
        • C
          Cesarpuig @mitu
          last edited by Cesarpuig

          @mitu

          I am testing it on sterch and buster.

          Build failure for lack of libgles1-mesa-dev only appears in Raspbian strech.

          Rasbian buster build fine without installing that dependency.

          And it is true it gives an installation error in buster because it cannot install that dependency.

          That dependency should be assigned individually for raspbian sterch, it escapes my knowledge.

          I actually focused on making it work on strech by helping @Zering,
          I already migrated my rpi3 and rpi4 to buster, and the original script worked,
          The fail has been introduced by including that dependency.

          1 Reply Last reply Reply Quote 0
          • C
            Cesarpuig
            last edited by Cesarpuig

            Hi. This is the script that I am using on Raspberry pi 4, Rasbian Buster. it works for me.

            I have tested it on a Raspberry Pi 3 B, with Raspbian stretch and it is necessary to add the dependency libgles1-mesa-dev

            #!/usr/bin/env bash
            
            # This file is part of The RetroPie Project
            #
            # The RetroPie Project is the legal property of its developers, whose names are
            # too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
            #
            # See the LICENSE.md file at the top-level directory of this distribution and
            # at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
            #
            
            rp_module_id="rtcw"
            rp_module_desc="RTCW - IORTCW source port of Return to Castle Wolfenstein."
            rp_module_licence="GPL3 https://raw.githubusercontent.com/iortcw/iortcw/master/SP/COPYING.txt"
            rp_module_help="IORTCW requires the pak files of the full game to play. Add all your singleplayer and multiplayer pak files (mp_bin.pk3, mp_pak0.pk3, mp_pak1.pk3, mp_pak2.pk3, mp_pak3.pk3, mp_pak4.pk3, mp_pak5.pk3, mp_pakmaps0.pk3, mp_pakmaps1.pk3, mp_pakmaps2.pk3, mp_pakmaps3.pk3, mp_pakmaps4.pk3, mp_pakmaps5.pk3, mp_pakmaps6.pk3, pak0.pk3, sp_pak1.pk3, sp_pak2.pk3, sp_pak3.pk3 and sp_pak4.pk3) from your RTCW installation to $romdir/ports/rtcw."
            rp_module_section="exp"
            rp_module_flags=""
            
            function depends_rtcw() {
            #	getDepends cmake libsdl2-dev libsdl2-net-dev libsdl2-mixer-dev libsdl2-image-dev libgles1-mesa-dev timidity freepats #Uncomment for Raspbian stretch
                    getDepends cmake libsdl2-dev libsdl2-net-dev libsdl2-mixer-dev libsdl2-image-dev timidity freepats #Uncomment for Raspbian buster
            }
            
            function sources_rtcw() {
                gitPullOrClone "$md_build" https://github.com/iortcw/iortcw.git
            }
            
            function build_rtcw() {
                cd "$md_build/SP"
                USE_CODEC_VORBIS=0 USE_CODEC_OPUS=0 USE_CURL=0 USE_CURL_DLOPEN=0 USE_OPENAL=1 USE_OPENAL_DLOPEN=1 USE_RENDERER_DLOPEN=0 USE_VOIP=0 \
            	USE_LOCAL_HEADERS=1 USE_INTERNAL_JPEG=1 USE_INTERNAL_OPUS=1 USE_INTERNAL_ZLIB=1 USE_OPENGLES=1 USE_BLOOM=0 USE_MUMBLE=0 BUILD_GAME_SO=1 \
            	BUILD_RENDERER_REND2=0 ARCH=armv7l PLATFORM=linux COMPILE_ARCH=arm COMPILE_PLATFORM=linux \
            	make
                cd "$md_build/MP"
                USE_CODEC_VORBIS=0 USE_CODEC_OPUS=0 USE_CURL=0 USE_CURL_DLOPEN=0 USE_OPENAL=1 USE_OPENAL_DLOPEN=1 USE_RENDERER_DLOPEN=0 USE_VOIP=0 \
            	USE_LOCAL_HEADERS=1 USE_INTERNAL_JPEG=1 USE_INTERNAL_OPUS=1 USE_INTERNAL_ZLIB=1 USE_OPENGLES=1 USE_BLOOM=0 USE_MUMBLE=0 BUILD_GAME_SO=1 \
            	BUILD_RENDERER_REND2=0 ARCH=armv7l PLATFORM=linux COMPILE_ARCH=arm COMPILE_PLATFORM=linux \
            	make
                md_ret_require="$md_build/SP"
                md_ret_require="$md_build/MP"
            }
            
            function install_rtcw() {
                md_ret_files=(
            		'SP/build/release-linux-armv7l/iowolfsp.armv7l'
            		'SP/build/release-linux-armv7l/main/cgame.sp.armv7l.so'
            		'SP/build/release-linux-armv7l/main/qagame.sp.armv7l.so'
            		'SP/build/release-linux-armv7l/main/ui.sp.armv7l.so'
            		'MP/build/release-linux-armv7l/iowolfded.armv7l'
            		'MP/build/release-linux-armv7l/iowolfmp.armv7l'
            		'MP/build/release-linux-armv7l/main/cgame.mp.armv7l.so'
            		'MP/build/release-linux-armv7l/main/qagame.mp.armv7l.so'
            		'MP/build/release-linux-armv7l/main/ui.mp.armv7l.so'
            		'MP/build/release-linux-armv7l/main/vm/'
                )
            }
            
            function game_data_rtcw() {
            	mkdir /opt/retropie/ports/rtcw/main
            	mv -f /opt/retropie/ports/rtcw/*.so /opt/retropie/ports/rtcw/main
            	mv -f /opt/retropie/ports/rtcw/vm /opt/retropie/ports/rtcw/main
                    chown -R $user:$user "$romdir/ports/rtcw"
                    chown -R $user:$user "$md_conf_root/rtcw-sp"
            }
            
            function configure_rtcw() {
                    rm -R /home/pi/RetroPie/roms/ports/rtcw/vm #I added this line because when I updated, the content of this folder it was not overwritten
            
                    addPort "rtcw-sp" "rtcw-sp" "Return to Castle Wolfenstein SP" "$md_inst/iowolfsp.armv7l"
                    addPort "rtcw-mp" "rtcw-mp" "Return to Castle Wolfenstein MP" "$md_inst/iowolfmp.armv7l"
            
                    mkRomDir "ports/rtcw"
            
                    moveConfigDir "$home/.wolf" "$md_conf_root/rtcw-sp"
                    moveConfigDir "$md_inst/main" "$romdir/ports/rtcw"
            
                    [[ "$md_mode" == "install" ]] && game_data_rtcw
            }
            function remove_rtcw() {
                    rm /home/pi/.wolf
            	rm /home/pi/RetroPie/roms/ports/rtcw/*.so
            	rm -R /home/pi/RetroPie/roms/ports/rtcw/vm
            }
            
            1 Reply Last reply Reply Quote 0
            • tpo1990T
              tpo1990 @mitu
              last edited by

              @mitu Thanks for pointing it out. I thought I was home safe. I should probably reinstall my test environment to make sure it is fully updated to Raspbian Buster on my RPI 3B. I will need some more time to be able to continue investigating the issue.

              @Cesarpuig If that is the case on Stretch that it needs the libgles1-mesa-dev dependency, then we must think of another way to get it to work otherwise the game will only compile and install on Raspbian Buster.

              Greetings from Denmark. :-)

              Developer of install scripts for ports such as Hexen 2, Return to Castle Wolfenstein and Caesar III. See my other projects at my profile.

              1 Reply Last reply Reply Quote 0
              • Z
                Zering @Cesarpuig
                last edited by

                @Cesarpuig I have followed your instructions to the letter and still no luck. I am booted back to ES after a few seconds of black screen. The only difference is now I can see the mouse cursor in the upper right corner of the screen for a split second, so it seems the game does launch in some capacity.

                I've also noticed that I do not have the .wolf file. Is this a file that is generated when the game is first started? If not could that be part of the issue?

                At this point, I'm concluding that the game has become self-aware and outright refuses to let me play it. ^^

                C 1 Reply Last reply Reply Quote 0
                • C
                  Cesarpuig @Zering
                  last edited by

                  @Zering post your log

                  Z 1 Reply Last reply Reply Quote 0
                  • Z
                    Zering @Cesarpuig
                    last edited by

                    @Cesarpuig That would be in dev/shm right? There's nothing there. Is it possible that it doesn't produce a log?

                    1 Reply Last reply Reply Quote 0
                    • C
                      Cesarpuig
                      last edited by

                      @tpo1990 Hi.

                      I have updated my script:

                      function depends_rtcw() {
                      	local depends=(cmake libsdl2-dev libsdl2-net-dev libsdl2-mixer-dev libsdl2-image-dev timidity freepats)
                      
                      	if compareVersions "$__os_debian_ver" lt 10; then
                              depends+=(libgles1-mesa-dev)
                          fi
                      	
                      	getDepends "${depends[@]}"
                      }
                      

                      Now do not try to install the libgles1-mesa-dev dependency on Raspbian based on Debian 10 Buster.

                      I tried it on:

                      RPI3 Raspbian 9 stretch Retropie 4.6- Ok

                      RPI4 Raspbian 10 buster Retropie 4.5.20- Ok

                      I updated the link where I share my script in a previous post

                      @Zering Yesterday I lost my internet connection and today I will no longer be on my computer, we take up the subject again tomorrow, :).

                      /home/pi/.wolf is not a directory it is a symbolic link and is created during port installation.

                      tpo1990T 1 Reply Last reply Reply Quote 2
                      • tpo1990T
                        tpo1990 @Cesarpuig
                        last edited by tpo1990

                        @Cesarpuig Hi. Great to see some progress. I will try it out tomorrow and see if I can get it to work so that we can come to a solution that works for Stretch and Buster.

                        The reason why /home/pi/.wolf is a symbolic link, is that it needs to point to the rtcw port configs folder the same way that other ports does when they get installed from RetroPie-Setup. This is also true for the main folder the game loads the .pk3files from which is a symbolic link that points to the roms -> ports folder where a user will copy the .pk3files to.

                        Greetings from Denmark. :-)

                        Developer of install scripts for ports such as Hexen 2, Return to Castle Wolfenstein and Caesar III. See my other projects at my profile.

                        C 1 Reply Last reply Reply Quote 0
                        • C
                          Cesarpuig @tpo1990
                          last edited by

                          @tpo1990 said in Return to Castle Wolfenstein - IORTCW source port:

                          The reason why /home/pi/.wolf is a symbolic link, is that it needs to point to the rtcw port configs folder the same way that other ports does when they get installed from RetroPie-Setup. This is also true for the main folder the game loads the .pk3files from which is a symbolic link that points to the roms -> ports folder where a user will copy the .pk3files to.

                          yes, I know the reason, it's just that @Zering it says that directory does not appear after installing the port, it was a comment to a previous post of yours

                          1 Reply Last reply Reply Quote 0
                          • Z
                            Zering
                            last edited by

                            Well I am thoroughly confused lol

                            So is the missing /home/pi/.wolf the reason my install won't run?

                            C 1 Reply Last reply Reply Quote 0
                            • C
                              Cesarpuig @Zering
                              last edited by

                              @Zering Hi.

                              Well I am thoroughly confused lol
                              So is the missing /home/pi/.wolf the reason my install won't run?

                              Of course it can be, the problem is that the installation script does not create the symbolic link for you, and later when we run iortcw it does not create the home/pi/.wolf folder, which I think should.

                              You might have a permission problem

                              1º Update the installation script to the latest one in the source I shared.

                              2º Assuming that you have not changed the user name and from the console, execute the following lines

                              sudo chown -Rh pi:pi /home/pi
                              sudo chown -Rh pi:pi /opt/retropie/configs
                              

                              If you have changed the username you have to know it

                              4º Reboot system

                              5º Run the installation script from the Retropie setup menu and uninstall the rtcw port

                              6º Reboot system

                              7º Run the installation script from the Retropie setup menu and install the rtcw port

                              8º Retropie will create a log of the installation at this address, /home/pi/RetroPie-Setup/logs, save it.

                              9º Install the necessary data to run the game on /home/pi/RetroPie/roms/ports/rtcw

                              10º Try to run.

                              11º Comment. If the result was not satisfactory, retropie would have created another log in /dev/shm, post
                              both of them logs

                              Z 1 Reply Last reply Reply Quote 0
                              • Z
                                Zering @Cesarpuig
                                last edited by

                                @Cesarpuig Still no luck. I followed the instructions to the letter although I'm not sure what the sudo chown commands did or how they were supposed to work.

                                Here is the installation log :

                                link text

                                Here is the /dev/shm log :

                                link text

                                C 2 Replies Last reply Reply Quote 0
                                • C
                                  Cesarpuig @Zering
                                  last edited by Cesarpuig

                                  @Zering

                                  Your problem occurs during the installation process, I do not think it is very difficult to solve it

                                  mv: failed to preserve ownership for '/opt/retropie/ports/rtcw/main/cgame.mp.armv7l.so': Operation not permitted
                                  mv: failed to preserve ownership for '/opt/retropie/ports/rtcw/main/cgame.sp.armv7l.so': Operation not permitted
                                  mv: failed to preserve ownership for '/opt/retropie/ports/rtcw/main/qagame.mp.armv7l.so': Operation not permitted
                                  mv: failed to preserve ownership for '/opt/retropie/ports/rtcw/main/qagame.sp.armv7l.so': Operation not permitted
                                  mv: failed to preserve ownership for '/opt/retropie/ports/rtcw/main/ui.mp.armv7l.so': Operation not permitted
                                  mv: failed to preserve ownership for '/opt/retropie/ports/rtcw/main/ui.sp.armv7l.so': Operation not permitted
                                  mv: failed to preserve ownership for '/opt/retropie/ports/rtcw/main/vm/cgame.mp.qvm': Operation not permitted
                                  mv: failed to preserve ownership for '/opt/retropie/ports/rtcw/main/vm/qagame.mp.qvm': Operation not permitted
                                  mv: failed to preserve ownership for '/opt/retropie/ports/rtcw/main/vm/ui.mp.qvm': Operation not permitted
                                  mv: failed to preserve ownership for '/opt/retropie/ports/rtcw/main/vm': Operation not permitted
                                  

                                  I do not understand why you have this problem in Retropie and I do not, in two different RPIs that I am testing

                                  Give me 10 minutes to see if I optimize the script to solve your problem and share it

                                  1 Reply Last reply Reply Quote 0
                                  • C
                                    Cesarpuig @Zering
                                    last edited by Cesarpuig

                                    @Zering
                                    I have updated the script, download it, replace it with the previous one, install, and even if it works, share your logs with me, before installing it delete from the console the directory that does not let you move, sudo rm -R opt/retropie/ports/rtcw/main

                                    1 Reply Last reply Reply Quote 0
                                    • ?
                                      A Former User
                                      last edited by

                                      I had to make some modifications for this to work in Ubuntu x86_64

                                      You can find my changes at:
                                      https://raw.githubusercontent.com/gderber/RetroPie-Setup/develop/scriptmodules/ports/rtcw.sh

                                      Note:
                                      While I did my best to preserve the original code required for RPi, I do not have an RPi setup to test on.

                                      1 Reply Last reply Reply Quote 1
                                      • tpo1990T
                                        tpo1990
                                        last edited by tpo1990

                                        Okay so I made some progress to make the script work both for RetroPie Stretch and Buster with the help from Cesarpuig and added an optimized config file for multiplayer so that the game plays in full screen. I have uploaded the changes to my github repository.

                                        While doing this it made me think of why someone would still use RetroPie Stretch instead of just using a fresh install of the latest RetroPie with Buster.

                                        Could someone test it by using the download link and reply back with a status?

                                        Greetings from Denmark. :-)

                                        Developer of install scripts for ports such as Hexen 2, Return to Castle Wolfenstein and Caesar III. See my other projects at my profile.

                                        ExarKunIvE 1 Reply Last reply Reply Quote 1
                                        • ExarKunIvE
                                          ExarKunIv @tpo1990
                                          last edited by ExarKunIv

                                          @tpo1990 i downloaded the new.Sh from your github, and tryed it on my build which is still Stretch.

                                          this time it does go through and install everything (before i was getting a error so i gave up)

                                          but my game will not start

                                          iortcw 1.51d-SP_GIT_6938a2d-2019-05-06 linux-arm Jun 14 2019
                                          ----- FS_Startup -----
                                          Current search path:
                                          /home/pi/.wolf/main
                                          /opt/retropie/ports/rtcw/main/sp_pak4.pk3 (21 files)
                                          /opt/retropie/ports/rtcw/main/sp_pak3.pk3 (14 files)
                                          /opt/retropie/ports/rtcw/main/sp_pak2.pk3 (232 files)
                                          /opt/retropie/ports/rtcw/main/sp_pak1.pk3 (1342 files)
                                          /opt/retropie/ports/rtcw/main
                                          
                                          ----------------------
                                          1609 files in pk3 files
                                          
                                          
                                          "pak0.pk3" is missing. Please copy it
                                          from your legitimate RTCW CDROM.
                                          
                                          Also check that your iortcw executable is in
                                          the correct place and that every file
                                          in the "main" directory is present and readable.
                                          
                                          

                                          the funny thing is i have my pak0.pk3 in with all the rest of them. so im reinstalling the game on my pc and ill let you know what i get

                                          UPDATE
                                          ok so if i just run the install and not copy your .cfg files you have on your github the game launches

                                          RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
                                          RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
                                          Maintainer of RetroPie-Extra .

                                          tpo1990T 1 Reply Last reply Reply Quote 1
                                          • tpo1990T
                                            tpo1990 @ExarKunIv
                                            last edited by

                                            @ExarKunIv Good to hear that you finally got it to install on your build of Stretch. I am using the GOG version of Return to Castle Wolfenstein and that version works perfectly. I cannot say about any other version if it works or not. The most important thing is that the game will need all the relevant .pk3 files to be able to launch.

                                            Thanks for trying it out. I installed it recently on my Pi4 with latest RetroPie Buster and it works fine.

                                            Greetings from Denmark. :-)

                                            Developer of install scripts for ports such as Hexen 2, Return to Castle Wolfenstein and Caesar III. See my other projects at my profile.

                                            1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.