Announcement

Collapse
No announcement yet.

Can I run an external application from UE4 build?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Can I run an external application from UE4 build?

    Hello,

    Because my future project will be a 3D platform for customers with many advanced features, I'd like to give them the possibility to run external applications, for example Notepad or something different that is installed in Operating System. Is it possible to have any connection with other standalone applications from an UE4 build? Or for example run exe or small game from Unity?

    #2
    I have zero experience with this, but FPlatformProcess::CreateProc might be what you're looking for.

    Edit:

    FPlatformProcess::CreateProc(TEXT("C:\\Users\\Cero\\Desktop\\Test.exe"), nullptr, true, false, false, nullptr, 0, nullptr, nullptr);

    Used that in my code and it worked as expected. Would be nice to have an overload that only required the first parameter, but I'm really happy that it worked so intuitively.

    It seems that FPlatformProcess is for Windows only. There's also FGenericPlatformProcess that works for other platforms, but uses untested code.
    Last edited by MaxL; 07-16-2015, 12:15 AM.

    Comment


      #3
      Thank you very much for spending your time to solve my problem. I'm a Unity user so UE4 is still an enigma for me . I have refreshed my C++ knowledge and now I'm going to code in UE4. Running exe from UE4 build is the most important thing in my project, so I'm glad that it is possible.

      Regards!

      Comment


        #4
        hi! Have you find the way to Running an external .exe from UE4?
        I really need to open Kolor Eyes 360 player when my VR experience end.
        Kolor eyes have line command so I'm able to create a .bat
        Hope it's possible.
        Thank you so much

        giovanni bruni

        Comment


          #5
          No, I haven't tested this solution yet. However, I will need running an external .exe from UE4 in the future. Hopefully it's possible.

          Comment


            #6
            Originally posted by giovannibruni View Post
            hi! Have you find the way to Running an external .exe from UE4?
            I really need to open Kolor Eyes 360 player when my VR experience end.
            Kolor eyes have line command so I'm able to create a .bat
            Hope it's possible.
            Thank you so much

            giovanni bruni
            Did you get this working...until Unreal can render 360 Videos....need an alternative !!!

            (On a side issue does Kolor Eyes work with the CV1 Oculus ?)

            Comment


              #7
              Did anyone make any progress with this?

              I will really like to know how can I start a dowload from web browser or open a program though a link press in ue4 webrowser widget

              Comment


                #8
                This is exactly what I am looking to do as well. I want to be able to open a program inside of Unreal of 360 images that I have created.

                Comment


                  #9
                  I believe this is highly related:
                  Pre/Post build step in UBT

                  Comment


                    #10
                    Originally posted by Syed View Post
                    I believe this is highly related:
                    Pre/Post build step in UBT
                    How on Earth is this related? That article is about running an external program as part of the project build process. The question here is how to execute an external program from a project that is already built.

                    Comment


                      #11
                      Originally posted by Avelworldcreator View Post
                      How on Earth is this related? That article is about running an external program as part of the project build process. The question here is how to execute an external program from a project that is already built.
                      The post title is confusing. Build could mean a build ( packaged ) or build process.

                      EDIT: Not an excuse for not reading content though.
                      "As for me and my own, we will rewrite all the codes."

                      Blog: http://enjoy-game-programming.blogspot.com

                      Comment


                        #12
                        Originally posted by Eden91 View Post
                        Did anyone make any progress with this?

                        I will really like to know how can I start a dowload from web browser or open a program though a link press in ue4 webrowser widget
                        Why not just use native C++ functionality?
                        See for example: http://www.cplusplus.com/reference/cstdlib/system/

                        Also, you can use platform specific functions which allow for more control, for example with Windows:

                        Code:
                        #include <iostream>
                        #include <windows.h>
                        
                        int main() {
                            ShellExecute(NULL, "open", "path\\to\\file.exe", NULL, NULL, SW_SHOWDEFAULT);
                        }
                        Particle Editor Extension: Marketplace Page | Documentation
                        Code plugin which extends your particle effect toolbox with new possibilities.


                        SVG Importer Plugin: Marketplace Page | Gumroad Page
                        Import SVG (scalable vector graphics) files as rasterized rendering or as multi-channel signed distance field.

                        Comment


                          #13
                          Originally posted by Cultrarius View Post
                          Why not just use native C++ functionality?
                          See for example: http://www.cplusplus.com/reference/cstdlib/system/

                          Also, you can use platform specific functions which allow for more control, for example with Windows:

                          Code:
                          #include <iostream>
                          #include <windows.h>
                          
                          int main() {
                              ShellExecute(NULL, "open", "path\\to\\file.exe", NULL, NULL, SW_SHOWDEFAULT);
                          }
                          Hi Cultrarius, do you know a similar approach for Android?
                          Last edited by cgiteach; 01-31-2017, 06:40 AM.
                          George Cretu
                          founder & executive CGArtefacts

                          Marketplace content - Photo Studio Pack
                          BP-Geographically-Correct-Sun-System

                          Comment


                            #14
                            Originally posted by cgiteach View Post
                            Hi Cultrarius, do you know a similar approach for Android?
                            Well Android is a bit different in that you do not usually want to directly run some executable. As far as I know, the contract for Android Apps is that they run as a single process. You cannot spawn a new process without breaking that contract. Right now it may run fine on your device, but any update or different OS flavor might cause bugs and crashes.

                            Use threads and otherwise the native Android functions like intents, activities and whatnot. Have a look at the NDK for more info: https://developer.android.com/ndk/index.html
                            Particle Editor Extension: Marketplace Page | Documentation
                            Code plugin which extends your particle effect toolbox with new possibilities.


                            SVG Importer Plugin: Marketplace Page | Gumroad Page
                            Import SVG (scalable vector graphics) files as rasterized rendering or as multi-channel signed distance field.

                            Comment


                              #15
                              Hello everybody.

                              How to run external application from UE4 build "seamless"?
                              I mean, I want from one UE4 build run another UE4 build, without seeing, how first build quits and another build opens.

                              What I use so far.

                              FGenericPlatformProcess::CreateProc. But with that, there is a gap between first and another builds.

                              delay node. But still, there is a gab. And also, that "another build", is a lot different builds, so it loads in different time.

                              put loading screen in "another build" start. That gives smaller "gap". I create empty map, with just loading screen, with opens level.

                              Comment

                              Working...
                              X