Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Creating an automated build process - where do I start?

Creating an automated build process - where do I start?

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studiotoolshelpquestion
13 Posts 6 Posters 8 Views 1 Watching
  • 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.
  • I Ian Bowler

    Hello, I've been tasked with creating an automated build process in a Visual Studio 6.0 environment. This is not something I'm familiar with and I'm hoping some of you may be able to point be to some tools or articles that would help me in this area. Any and all ideas welcome! Thanks! -Ian

    D Offline
    D Offline
    David Crow
    wrote on last edited by
    #2

    By "automated" do you mean without any human intervention? If so, I've compiled from a command prompt in the past and it has worked fine. It required a few .bat and .mak files.


    "Take only what you need and leave the land as you found it." - Native American Proverb

    I 1 Reply Last reply
    0
    • D David Crow

      By "automated" do you mean without any human intervention? If so, I've compiled from a command prompt in the past and it has worked fine. It required a few .bat and .mak files.


      "Take only what you need and leave the land as you found it." - Native American Proverb

      I Offline
      I Offline
      Ian Bowler
      wrote on last edited by
      #3

      Beyond starting the process, there should be no further human intervention. I'm researching .mak files now. they look like a pain. Do you know of any good resources that I can use to learn about them? I'm just googling now...

      C D PJ ArendsP 3 Replies Last reply
      0
      • I Ian Bowler

        Beyond starting the process, there should be no further human intervention. I'm researching .mak files now. they look like a pain. Do you know of any good resources that I can use to learn about them? I'm just googling now...

        C Offline
        C Offline
        Chris Losinger
        wrote on last edited by
        #4

        it's pretty easy to launch Visual Studio from a command line prompt, with a solution/workspace and build configuration name. ex. here's a bit of what we use for our ImgSource builds, on VC7:

        devenv /clean Release /project _isource /projectconfig "Release|Win32" ISource.sln devenv /build Release /project _isource /projectconfig "Release|Win32" ISource.sln

        you need to launch this from the command line prompt that VS creates for you (it sets up a bunch of ENV variables for you). but, there are no makefiles - just create the configutations in the UI as you normally would, then run them from the command line. Cleek | Image Toolkits | Thumbnail maker

        I 1 Reply Last reply
        0
        • I Ian Bowler

          Beyond starting the process, there should be no further human intervention. I'm researching .mak files now. they look like a pain. Do you know of any good resources that I can use to learn about them? I'm just googling now...

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #5

          Makefiles are actually simple once you peel away all of the unnecessary stuff. For example:

          myproject.exe : myproject.obj file1.obj file2.obj myproject.res
          link.exe /out:myproject.exe myproject.obj file1.obj file2.obj myproject.res

          myproject.obj : myproject.cpp
          cl.exe /W4 myproject.cpp

          file1.obj : file1.cpp
          cl.exe /W4 file1.cpp

          file2.obj : file2.cpp
          cl.exe /W4 file2.cpp

          myproject.res : myproject.rc
          rc.exe /fo myproject.res myproject.rc

          says that myproject.exe depends on myproject.obj, file1.obj, file2.obj, and myproject.res; myproject.exe is created by executing link.exe /out:myproject.exe myproject.obj file1.obj file2.obj myproject.res. Also, myproject.obj depends on myproject.cpp; myproject.obj is created by executing cl.exe /W4 myproject.cpp. The files listed on the right side of ':' are what get compiled or linked together to create the file on the left side of ':'. Any clearer? There's also the IDE that can be launched without any human intervention. Check out its command-line arguments.


          "Take only what you need and leave the land as you found it." - Native American Proverb

          I 1 Reply Last reply
          0
          • D David Crow

            Makefiles are actually simple once you peel away all of the unnecessary stuff. For example:

            myproject.exe : myproject.obj file1.obj file2.obj myproject.res
            link.exe /out:myproject.exe myproject.obj file1.obj file2.obj myproject.res

            myproject.obj : myproject.cpp
            cl.exe /W4 myproject.cpp

            file1.obj : file1.cpp
            cl.exe /W4 file1.cpp

            file2.obj : file2.cpp
            cl.exe /W4 file2.cpp

            myproject.res : myproject.rc
            rc.exe /fo myproject.res myproject.rc

            says that myproject.exe depends on myproject.obj, file1.obj, file2.obj, and myproject.res; myproject.exe is created by executing link.exe /out:myproject.exe myproject.obj file1.obj file2.obj myproject.res. Also, myproject.obj depends on myproject.cpp; myproject.obj is created by executing cl.exe /W4 myproject.cpp. The files listed on the right side of ':' are what get compiled or linked together to create the file on the left side of ':'. Any clearer? There's also the IDE that can be launched without any human intervention. Check out its command-line arguments.


            "Take only what you need and leave the land as you found it." - Native American Proverb

            I Offline
            I Offline
            Ian Bowler
            wrote on last edited by
            #6

            Ahhhh... much clearer. This is very helpful. Thanks a bunch! -- modified at 16:52 Wednesday 30th November, 2005 Again, thanks for taking the time to post such a great response. I really appreciate it. -Ian

            1 Reply Last reply
            0
            • C Chris Losinger

              it's pretty easy to launch Visual Studio from a command line prompt, with a solution/workspace and build configuration name. ex. here's a bit of what we use for our ImgSource builds, on VC7:

              devenv /clean Release /project _isource /projectconfig "Release|Win32" ISource.sln devenv /build Release /project _isource /projectconfig "Release|Win32" ISource.sln

              you need to launch this from the command line prompt that VS creates for you (it sets up a bunch of ENV variables for you). but, there are no makefiles - just create the configutations in the UI as you normally would, then run them from the command line. Cleek | Image Toolkits | Thumbnail maker

              I Offline
              I Offline
              Ian Bowler
              wrote on last edited by
              #7

              Unfortunately I'm stuck with Visual Studio 6 right now. There must be similar support in VS6 though huh? For now, I think I'll delve deeper in the makefile bussiness - that is, unless you can tell me why I shouldn't...? Sorry, I'm still trying to grasp the overall architecture of an automated build process. I probably have a few days research to do.. Thanks for your suggestion!

              C 1 Reply Last reply
              0
              • I Ian Bowler

                Beyond starting the process, there should be no further human intervention. I'm researching .mak files now. they look like a pain. Do you know of any good resources that I can use to learn about them? I'm just googling now...

                PJ ArendsP Offline
                PJ ArendsP Offline
                PJ Arends
                wrote on last edited by
                #8

                VC6 has the ability to export .mak files that you can use with nmake.exe (project -> Export Makefile). If you add file or projects to your workspace you simply generate a new .mak file. From there it is simply a matter of writing a .bat file for setting up all the proper nmake options. Note that I hvae never done this for anything more than simply trying it out. Most of my apps compile very quickly, so I usually just wait for them to compile from the IDE.


                "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ???  You're definitely a superstar!!!" - mYkel - 21 Jun '04 "There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05 Within you lies the power for good - Use it!

                Within you lies the power for good; Use it!

                I G 2 Replies Last reply
                0
                • PJ ArendsP PJ Arends

                  VC6 has the ability to export .mak files that you can use with nmake.exe (project -> Export Makefile). If you add file or projects to your workspace you simply generate a new .mak file. From there it is simply a matter of writing a .bat file for setting up all the proper nmake options. Note that I hvae never done this for anything more than simply trying it out. Most of my apps compile very quickly, so I usually just wait for them to compile from the IDE.


                  "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ???  You're definitely a superstar!!!" - mYkel - 21 Jun '04 "There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05 Within you lies the power for good - Use it!

                  I Offline
                  I Offline
                  Ian Bowler
                  wrote on last edited by
                  #9

                  That sounds great! I'll look into this right now. Thanks! -Ian

                  1 Reply Last reply
                  0
                  • I Ian Bowler

                    Hello, I've been tasked with creating an automated build process in a Visual Studio 6.0 environment. This is not something I'm familiar with and I'm hoping some of you may be able to point be to some tools or articles that would help me in this area. Any and all ideas welcome! Thanks! -Ian

                    G Offline
                    G Offline
                    Graham Bradshaw
                    wrote on last edited by
                    #10

                    You don't need extra .mak files, just use a .dsw file from a batch file. We use: @msdev "components.dsw" /MAKE ALL > BuildComponents.log 2>&1 That's an excerpt from our automated build. Here we have one batch file that

                    • compiles .mc files
                    • builds all the projects (the .dsw file above is simply a workspace with all the projects in it)
                    • parses the build log for errors
                    • compiles the HTML help
                    • builds the base InstallShield installations
                    • builds self-extracting installtions for the web site
                    • builds the CD-ROM images for CDs

                    It is a bit of effort automating the whole build process, but believe me, it's well worth it.

                    1 Reply Last reply
                    0
                    • PJ ArendsP PJ Arends

                      VC6 has the ability to export .mak files that you can use with nmake.exe (project -> Export Makefile). If you add file or projects to your workspace you simply generate a new .mak file. From there it is simply a matter of writing a .bat file for setting up all the proper nmake options. Note that I hvae never done this for anything more than simply trying it out. Most of my apps compile very quickly, so I usually just wait for them to compile from the IDE.


                      "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ???  You're definitely a superstar!!!" - mYkel - 21 Jun '04 "There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05 Within you lies the power for good - Use it!

                      G Offline
                      G Offline
                      Graham Bradshaw
                      wrote on last edited by
                      #11

                      You can just build the .dsw file from the command line. Saves the risk of the .mak getting out of step with the main project.

                      1 Reply Last reply
                      0
                      • I Ian Bowler

                        Unfortunately I'm stuck with Visual Studio 6 right now. There must be similar support in VS6 though huh? For now, I think I'll delve deeper in the makefile bussiness - that is, unless you can tell me why I shouldn't...? Sorry, I'm still trying to grasp the overall architecture of an automated build process. I probably have a few days research to do.. Thanks for your suggestion!

                        C Offline
                        C Offline
                        Chris Losinger
                        wrote on last edited by
                        #12

                        i'm fairly certain VC6 has a similar interface. in VC6 we can use the "Build All" option from the UI to build our 5 different targets, but VS.Net's dependency checker handles .LIBs differently, so we have to simulate a Build All with a .BAT file. Cleek | Image Toolkits | Thumbnail maker

                        1 Reply Last reply
                        0
                        • I Ian Bowler

                          Hello, I've been tasked with creating an automated build process in a Visual Studio 6.0 environment. This is not something I'm familiar with and I'm hoping some of you may be able to point be to some tools or articles that would help me in this area. Any and all ideas welcome! Thanks! -Ian

                          S Offline
                          S Offline
                          SilentSilent
                          wrote on last edited by
                          #13

                          Ian Bowler wrote:

                          I've been tasked with creating an automated build process in a Visual Studio 6.0 environment. This is not something I'm familiar with and I'm hoping some of you may be able to point be to some tools or articles that would help me in this area.

                          Automated Builds in DevStudio, or the Night Build Scenario [^]

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups