Compiling TSRE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • denglihong
    New Member
    • Jan 2024
    • 18
    • Mianyang, Sichuan, China
    • Chinese, C#

    #136
    After scratching my scalp, I finally successfully built a 64 bit version. You need to configure it this way: first, you need to choose a 64 bit compiler, like this (picture). Secondly, you need to modify your qmake definition. Like this:

    屏幕截图 2024-02-02 181926.png

    CONFIG += console
    QT += websockets
    LIBS += -lopengl32
    LIBS += -lglu32
    LIBS += -L"C:\Users\jjxjj\Downloads\glut32bit64bit" -lglut64
    LIBS += -L"C:\openal-soft-1.18.2-bin\libs\Win64" -lopenal32

    ​It is important that you choose glut64 (Attached file) and openal32. The other configurations remain unchanged. After building, enjoy 64 bit TSRE.
    Attached Files
    Last edited by eric; 02-13-2024, 19:41.

    Comment

    • eric
      9500 Post Veteran and Administrator



      • Dec 2002
      • 9583
      • NS MP245.4 CNO&TP South District
      • English, SQL
      • General

      #137
      Well, I tried that approach, and am back to a successful build but a failed run....

      Code:
      RUN FAILED (exit value -1,073,741,701, total time: 59ms)
      I'm guessing that the MinGW installation (which isn't really detailed by anyone who's offered an installation guide) is behind it.

      ​This is getting frustrating, especially after I had working builds under the original process, but can't seem to get a clean build/run using that anymore, either.

      There are also values being held in NetBeans that seem to propagate between uninstall and re-install....
      ​
      On edit: I can run a build made with 5.7.0 and MinGw530, which is good. 32 bit --> [ATTACH]n2296092[/ATTACH]

      That same exact error came up for me when I got a successful build, but went away when I put the 32 bit OpenAL32.dll into the run directory instead of the 64 bit OpenAL32.dll.... So perhaps it's still looking for the 32 bit DLL even in a 64 bit build?....

      Trying again, but will probably not know tonight.
      ​
      Last edited by eric; 02-19-2024, 16:13.
      If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

      Comment

      • eric
        9500 Post Veteran and Administrator



        • Dec 2002
        • 9583
        • NS MP245.4 CNO&TP South District
        • English, SQL
        • General

        #138
        With a little more time to focus on this, I was able to take denglihong 's config using 5.15.2 MinGW810 and the 64bit glut he provided, and get a 64 bit build to run.

        It required a couple changes:
        1. Copying over 64 bit versions of the lib* and QT5* dll's from the \Qt\5.15.2\mingw81_64\bin folder
        2. adding the platforms folder with qtwindows.dll
        3. adding the 64 bit version of OpenAL32.dll

        I'll attach it as a zip here to see if anyone's able to launch it on their PC:

        ---> 64 bit version: tsre-v8.001.zip

        You'll know if it runs based on the window title and lack of the black DOS window when running.

        This version has a few of the tweaks I'd been working on:
        • greater precision for dynamic track curves
        • orange highlighting (not blue) for selected objects and terrain tiles
        • menu shortcuts that don't duplicate letters for hotkeys
        • logs with timestamps (no longer over-writing between sessions)
        If you're using multiple monitors... it's forcing itself to the default monitor regardless of where you launch it -- that's to address a problem I haven't been able to figure out on screen positions greater or less than the reported monitor resolution. The Navi box was already doing this, so hopefully this is a decent compromise. Eventually, I'll parameterize the launch location into Settings.
        Last edited by eric; 02-14-2024, 21:42.
        If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

        Comment

        • eric
          9500 Post Veteran and Administrator



          • Dec 2002
          • 9583
          • NS MP245.4 CNO&TP South District
          • English, SQL
          • General

          #139
          Sample size of one....

          The 64bit version worked on a PC without any of the development tools (QT, NetBeans, MinGW)....

          Happy to hear others experiences.
          If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

          Comment

          • yellowdog
            1500 Post Veteran



            • Nov 1999
            • 1586
            • .
            • MSOR

            #140
            It worked for me! Of course, I still have the developer tools from the original directions installed, so that may make a difference. As a side note, it opens and transitions MUCH more quickly than the last "official" version. I'm assuming due to it being 64bit?

            Comment

            • TrainSimJack
              Senior Member
              • Jul 2022
              • 527

              #141
              Tested on a new windows 11 VM with absolutely nothing installed.

              Got the windows smartscreen warning since the .exe is unsigned

              After that I see this:
              image.png

              Looks like it's working!​
              Last edited by TrainSimJack; 02-14-2024, 22:01.

              Comment

              • eric
                9500 Post Veteran and Administrator



                • Dec 2002
                • 9583
                • NS MP245.4 CNO&TP South District
                • English, SQL
                • General

                #142
                Thanks.... fingers crossed...

                The steps in the original install were mostly the same:
                1. Create a {dev folder} to install everything to....
                2. Install JDK
                3. Install NetBeans with expanded C++ plugin as shown by Peter
                4. Install MinGW with these packages:
                  mingw-developer-toolkit
                  mingw32-base
                  mingw32-gcc-g++
                  msys-base
                5. Install Cygwin64
                6. Install QT 5.15.2 with MinGW 810 as shown by Deng
                7. Compile the openal32.a file as shown by Peter
                8. Download the glut files provided by Deng
                9. Clone the repository
                10. Configure the properties for the NetBeans project under the Release config (or whatever you want to use that's set to active) as shown by Deng:
                  1. Tool Base:
                    {dev folder}\Qt\Tools\mingw810_64\bin
                  2. Make:
                    {dev folder}/MinGW/msys/1.0/bin/make.exe
                  3. QMake:
                    {dev folder}\Qt\5.15.2\mingw81_64\bin\qmake.exe
                  4. C++ Compiler:
                    {dev folder}/openal-soft-1.18.2-bin/include
                  5. Linker - add library file:
                    {dev folder}\openal-soft-1.18.2-bin\libs\Win64\libopenal32.a​
                  6. QT Properties/Custom Definitions:
                    QT += websockets
                    LIBS += -lopengl32
                    LIBS += -lglu32
                    LIBS += -L"{dev folder}\glut\glut32bit64bit" -lglut64
                    LIBS += -L"{dev folder}\openal-soft-1.18.2-bin\libs\Win64" -lopenal32
                11. Build and Run....
                Last edited by eric; 02-14-2024, 22:01.
                If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                Comment

                • TrainSimJack
                  Senior Member
                  • Jul 2022
                  • 527

                  #143
                  Eric - it worked for me (I updated the post above with a screenshot)
                  What's different about this build vs the one we all got running a few weeks back when we first started messing with this?
                  (Is it the lack of the dos prompt window?)

                  Comment

                  • eric
                    9500 Post Veteran and Administrator



                    • Dec 2002
                    • 9583
                    • NS MP245.4 CNO&TP South District
                    • English, SQL
                    • General

                    #144
                    Originally posted by TrainSimJack
                    Looks like it's working!​
                    Indeed it is....

                    Thanks to Peter, Deng, Bill and Goku for helping with input from their own experiences, Jack and Yellowdog for validating the instruction sets, and Pete for documenting the steps in his TSRE manual (which I used as my runbook when I started over last night).

                    Now the fun begins.
                    Last edited by eric; 02-14-2024, 22:13.
                    If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                    Comment

                    • eric
                      9500 Post Veteran and Administrator



                      • Dec 2002
                      • 9583
                      • NS MP245.4 CNO&TP South District
                      • English, SQL
                      • General

                      #145
                      Originally posted by TrainSimJack
                      What's different about this build vs the one we all got running a few weeks back when we first started messing with this?
                      Well..... it's portable and others can now use it?...

                      Change-wise, I'm not going crazy on new features just yet. There are a few low hanging fruit tweaks that a few of us had been looking for.

                      If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                      Comment

                      • R. Steele
                        3500 Post Veteran

                        • Feb 2013
                        • 3928
                        • known universe
                        • ORTS

                        #146
                        Originally posted by eric
                        Well..... it's portable and others can now use it?
                        Does this mean that anyone who wants to run the Consist Editor or use the activity editor portion of TSRE can now use this version?
                        Cheers, Gerry
                        "A mind is like a parachute. It doesn't work if it is not open." Frank Zappa
                        It's my railroad and I'll do what I want! Historically accurate attitude of US Railroad Barons.
                        Forever, ridin' drag in railroad knowledge.
                        Audi, Vide, Tace, Si Vis Vivere In Pace​

                        https://www.trainsim.com/forums/filedata/fetch?filedataid=79656&type=medium​ https://www.trainsim.com/forums/filedata/fetch?filedataid=79654&type=small

                        Comment

                        • TrainSimJack
                          Senior Member
                          • Jul 2022
                          • 527

                          #147
                          Ah that's right - the original ones only worked on the PC's that compiled them!

                          Comment

                          • eric
                            9500 Post Veteran and Administrator



                            • Dec 2002
                            • 9583
                            • NS MP245.4 CNO&TP South District
                            • English, SQL
                            • General

                            #148
                            Originally posted by R. Steele
                            Does this mean that anyone who wants to run the Consist Editor or use the activity editor portion of TSRE can now use this version?
                            You should be able to try.... I haven't touched any of those functions but it's all the same core code.
                            If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                            Comment

                            • R. Steele
                              3500 Post Veteran

                              • Feb 2013
                              • 3928
                              • known universe
                              • ORTS

                              #149
                              I appear to have misunderstood what was actually happening here...I thought we'd end up with a new version "branch" of TSRE compiled here, and it would be downloadable in a zip version --- with new releases when new features, or bug repairs where made.

                              I could not even begin to do what you guys did ---- ZERO coding experience.
                              Cheers, Gerry
                              "A mind is like a parachute. It doesn't work if it is not open." Frank Zappa
                              It's my railroad and I'll do what I want! Historically accurate attitude of US Railroad Barons.
                              Forever, ridin' drag in railroad knowledge.
                              Audi, Vide, Tace, Si Vis Vivere In Pace​

                              https://www.trainsim.com/forums/filedata/fetch?filedataid=79656&type=medium​ https://www.trainsim.com/forums/filedata/fetch?filedataid=79654&type=small

                              Comment

                              • eric
                                9500 Post Veteran and Administrator



                                • Dec 2002
                                • 9583
                                • NS MP245.4 CNO&TP South District
                                • English, SQL
                                • General

                                #150
                                It will be all of those, Gerry. It's just taken a while for the old programmers to catch up with the new tools...

                                The steps I outlined in post 143 are only for those looking to change the codebase and build a new executable. Everyone else who uses it just needs the zip with the exe and dlls from post 139.

                                Sent from my SM-S911U using Tapatalk



                                If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                                Comment

                                Working...