Announcement

Collapse
No announcement yet.

Compiling TSRE

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Originally posted by eric
    And..... I'm in.



    Stumbling block for me after getting a successful build -- I couldn't run. Got an exit error code 2, and no idea what that was.

    Tried running it from the executable in the /dist folder, and it pointed at OpenAL32.dll missing, which was indeed present ***HOWEVER*** it didn't appear to be registered. So I reinstalled OpenAL and BOOM.... it runs.

    So....

    Clarifications needed to Peter's list from my install experience:
    1. Specifiy the C/C++ compiler option
    2. Install Cygwin
    3. Install OpenAL

    This is huge.

    I might not be able to figure out all of Piotr's code, and the Polish status/error messages will be maddening to find and possibly translate, but at the very least we have a replicable process to get the compiler up so that anyone could take a stab at future support.


    Peter, you've just been gifted a First Class Membership for your initiative and willingness to help us out.
    Eric, when you re-installed openal - what did you do?
    The download linked in the wayback machine was a zip with a bunch of files and no installer.
    Is that what you're using? If so did you then just re-unzip it to the same folder structure?
    Any other steps (such as the path, etc)?

    Comment


      #32
      Originally posted by eric
      And..... I'm in.


      So....

      Clarifications needed to Peter's list from my install experience:
      1. Specifiy the C/C++ compiler option
      2. Install Cygwin
      3. Install OpenAL
      Nice! I think a couple of other things need some clarity, especially around Step 7 (i.e. your post above, number 40). I also think this may need to be added, from my post above:

      There is no DLLTool in MinGW, and I get the following result:
      'C:\MinGW\bin\dlltool' is not recognized as an internal or external command, operable program or batch file.

      The path is the same, but dlltool does not exist anywhere in the MinGW folder structure. Poking around in MinGW, I clicked on All Packages....and then I installed the packages related to G++. That did the trick: dlltool was installed and running the command successfully created libopenal32.a in the correct openal subfolder.
      It may also be useful to close NetBeans and re-open it. I still can't explain why my Properties menu changed so significantly. Other than I probably closed the program at some point and then came back to it.

      Also, my Plug-ins menu still remains drastically different today from what TrainSimJack posted above, and we don't know why. That may or may not matter.​

      Comment


        #33
        We always needed to have an OPENAL dll in the same folder as TSRE even with the released version of TSRE from GOKU, if I recall correctly.

        I'm not clear on what you said about CYGWIN... as I did not do anything CYGWIN related on my PC and I apparently got a successful compilation. (Note: I do have a number Linux compatibility tools on my PC, just not Cygwin)

        I'm going through the process for the first time myself... and updating the Document as I go.

        *NOTE* While I got a good compile session... I've yet to test it.

        Code:
        BUILD SUCCESSFUL (total time: 7m 39s)
        NOTE: It is clear that there are some LINKER options missing, since a lot of the extra files were not linked INTO the final executable.

        To help out... here is the quick BAT file I used to copy the files needed in the same folder until we figure out how to link them into the exe file.
        Code:
        cp C:\Qt\Qt5.7.0\5.7\mingw53_32\bin\libstdc++-6.dll .
        cp C:\Qt\Qt5.7.0\5.7\mingw53_32\bin\libgcc_s_dw2-1.dll .
        cp C:\Qt\Qt5.7.0\5.7\mingw53_32\bin\libwinpthread-1.dll .
        cp C:\Qt\Qt5.7.0\5.7\mingw53_32\bin\Qt5Core.dll .
        cp C:\Qt\Qt5.7.0\5.7\mingw53_32\bin\Qt5Gui.dll  .
        cp C:\Qt\Qt5.7.0\5.7\mingw53_32\bin\Qt5Network.dll .
        cp C:\Qt\Qt5.7.0\5.7\mingw53_32\bin\Qt5WebSockets.dll .
        cp C:\Qt\Qt5.7.0\5.7\mingw53_32\bin\Qt5Widgets.dll .​
        Assuming cp is in your path, of course.

        And... Freshly built TSRE5 runs... another success.

        I'm sure GOKU is somewhere laughing at us thinking "It only took them 6+ years to figure it out"
        http://www.railsimstuff.com
        Just Blender now, 3DCrafter only when I have to.
        formerly The Keystone Works (All Permissions Granted)
        https://github.com/pwillard/MSTS-replacement
        sigpic

        Comment


          #34
          Originally posted by pwillard

          I'm not clear on what you said about CYGWIN... as I did not do anything CYGWIN related on my PC and I apparently got a successful compilation.
          CYGWIN is related to this error message, at the very end of Step 7 when you first ask NetBeans to Build. Do you perhaps have Msys installed? Or something similar to either of those?


          Attached Files

          Comment


            #35
            Ah, when you installed Mingw, it is probably best to have installed the BASE developer INSTALL Suite.

            RE: It looks to be as simple as adding these additional files into the LINKER section as we did with the openal library. I did try a build with the additional files specified in the LINKER, but the build ultimately failed... :-( Oh well.

            It might be as simple a the libraries are not in the right state, similar to the OPENAL one that we originally put in the linker settings. IE; these are DLL files, not .a files... (Rookie error, I suppose)

            My build did work first try... so the instructions are good in the online PDF.

            AsciiDoctor Source code for TSRE documentation, license CC-BY-SA-4.0 - pwillard/TSRE5-Document

            http://www.railsimstuff.com
            Just Blender now, 3DCrafter only when I have to.
            formerly The Keystone Works (All Permissions Granted)
            https://github.com/pwillard/MSTS-replacement
            sigpic

            Comment


              #36
              Thanks for updating the TSRE book, Pete. Just fyi, you have this in there (and also above):

              "The Java download listed above is just a zip file with folders, so you will need to extract it
              somewhere.​ Once that’s done you’ll need to set two Environment Variables: JAVA_HOME and PATH
              The JAVA_HOME environment variable will be the path to the folder where it’s installed and the PATH
              entry will qdded to your existing path statements with the same value you used for JAVA_HOME
              above."

              I did not do the second part. Because it's the JDK, I just unzipped it into a working folder and pointed NetBeans to the necessary file but didn't point Windows to it at all. ​

              Comment


                #37
                Well, I was covering my bases... I just wanted to be sure that the NETBEANS installer could SEE that some sort of JDK was installed and that accomplishes it.


                So now we just need to figure out how all this code works...
                http://www.railsimstuff.com
                Just Blender now, 3DCrafter only when I have to.
                formerly The Keystone Works (All Permissions Granted)
                https://github.com/pwillard/MSTS-replacement
                sigpic

                Comment


                  #38
                  I also didn't do the environment variables for PATH or JAVA_HOME....

                  Pete, the reason I needed Cygwin is because I didn't have a shell installed. I'm guessing if you do other Linux stuff, you already had a shell.

                  Now onto the fun............. I've been playing and have created a custom version:





                  Two tweaks made this morning...
                  1. Goku changed an int value to a short in error in file TrackShape.h
                  2. StaticDetailLevel wasn't enabled as a property
                  The TrackShape.h change was something Goku investigated and posted to his forum, but he only pointed others to were the error was... he never recompiled or updated the Git source.

                  Adding the SDL was a little more interesting... I've never coded in C++ or C, so I'm working on the "if it works for this, it should work for that" approach. Since TrackObject had the SDL exposed, and Signal didn't, I did a line by line compare to see what was different between the respective .cpp and .h files. The .h files are in

                  Updating PropertiesSignal.h and PropertiesSignal.cpp did the trick, using another .h and .cpp file as the template for the needed voids to display and process the edit.





                  Looking in the World file, it's updated correctly on my Demo route.

                  Between this and Blender, my plate's about to be full again....
                  Attached Files
                  If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, items saved in our library or the ongoing development of our TSRE Fork, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                  Comment


                    #39
                    excellent. NOW... based on your comments... I'm assuming that you have NOT installed GIT. https://git-scm.com/download/win since that might have given you some stuff you don't have. Its not a bad idea to install it since you can push command line updates BACK to the TSRE repository on GITHUB without firing up NetBeans, for example.

                    If you are doing FIXES... PUSHING your changes back up to the cloud helps everyone.

                    At this point though... I remain rather clueless about much of the process.
                    http://www.railsimstuff.com
                    Just Blender now, 3DCrafter only when I have to.
                    formerly The Keystone Works (All Permissions Granted)
                    https://github.com/pwillard/MSTS-replacement
                    sigpic

                    Comment


                      #40
                      I've created a pull request for the TDB fix. Whether or not that ever gets acted on is up to Piotr. The other tweaks are really now a fork.
                      If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, items saved in our library or the ongoing development of our TSRE Fork, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                      Comment


                        #41
                        Well, if we really get no response... it might be that we need to take steps to fork the repository.
                        http://www.railsimstuff.com
                        Just Blender now, 3DCrafter only when I have to.
                        formerly The Keystone Works (All Permissions Granted)
                        https://github.com/pwillard/MSTS-replacement
                        sigpic

                        Comment


                          #42
                          Guys, I could use a second set of eyes here.

                          I think I found a step I messed up the first time around

                          Code:
                          cd C:\openal-soft-1.18.2-bin\libs\Win64
                          C:\MinGW\bin\dlltool -d OpenAL32.def -D OpenAL32.dll -k -a -l libopenal32.a -v​
                          I'm pretty sure I tab completed this one the first time.

                          So I've re-run through everything.
                          I copy/pasted the text above to rebuild the libopenal32.a file.

                          It compiles.

                          When I run it, I get this error:


                          This is a step forward, since yesterday's error said I was missing OpenAL32.a

                          The problem is, I don't have an OpenAL32.dll file - anywhere on my file system:​


                          Is your code running without this file?
                          If you needed this file, where did you get it from?

                          Thanks!
                          - Jack
                          Attached Files

                          Comment


                            #43


                            Randy

                            Comment


                              #44
                              Originally posted by rdayt
                              Thanks, I tried this one, put it in the same folder as TSRE5.exe and it gets a different error:

                              I'd like to know if others who've built the code following the steps above have needed this DLL - feels like it should be compiled/linked in during the build process, but it's not happening. ;-(
                              Attached Files

                              Comment


                                #45
                                Originally posted by TrainSimJack
                                This is a step forward, since yesterday's error said I was missing OpenAL32.a

                                The problem is, I don't have an OpenAL32.dll file - anywhere on my file system:​

                                - Jack
                                That's your problem. Take the one in the response above and drop it in your original TSRE folder. Then run the process from the start.

                                Comment

                                Working...
                                X