Creating an automated build process - where do I start?
-
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
-
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
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
-
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
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...
-
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...
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
-
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...
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.resmyproject.obj : myproject.cpp
cl.exe /W4 myproject.cppfile1.obj : file1.cpp
cl.exe /W4 file1.cppfile2.obj : file2.cpp
cl.exe /W4 file2.cppmyproject.res : myproject.rc
rc.exe /fo myproject.res myproject.rcsays 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
-
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.resmyproject.obj : myproject.cpp
cl.exe /W4 myproject.cppfile1.obj : file1.cpp
cl.exe /W4 file1.cppfile2.obj : file2.cpp
cl.exe /W4 file2.cppmyproject.res : myproject.rc
rc.exe /fo myproject.res myproject.rcsays 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
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
-
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
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!
-
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...
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!
-
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!
That sounds great! I'll look into this right now. Thanks! -Ian
-
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
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.
-
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!
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.
-
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!
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
-
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
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 [^]