Jump to content

  • Log In with Google      Sign In   
  • Create Account

msvc "install" command?

  • You cannot reply to this topic
5 replies to this topic

#1 TheComet   Crossbones+   -  Reputation: 2442

Like
0Likes
Like

Posted 19 May 2014 - 03:46 PM

Hey,

 

What is the "make install DESTDIR=whatever" equivalent with MSVC? I don't have an NMake makefile, all I have is the solution file. I'd like to be able to build it and install it to a custom location from the command line. Is this possible?


"Windows 10 doesn't only include spyware, it is designed as spyware" -- Gaius Publius, The Big Picture RT Interview

"[...] we will access, disclose and preserve personal data, including your content (such as the content of your emails, other private communications or files in private folders), when we have a good faith belief that doing so is necessary" -- Windows 10 Privacy Statement


Sponsor:

#2 Bacterius   Crossbones+   -  Reputation: 12764

Like
0Likes
Like

Posted 19 May 2014 - 09:11 PM

I'm not comfortable with NMake but CMake creates an INSTALL project in your solution which is the "make install" equivalent. So you can build this project from the command-line and it should dump your build folder into C:\Program Files (x86)\YourProgramName. I don't know if there is an easy way to change the install directory.


“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”


#3 Stinkfist   Members   -  Reputation: 673

Like
0Likes
Like

Posted 20 May 2014 - 02:54 AM

It's probably possible to achieve something similar by specifying some custom post-build steps, but yeah, choosing CMake over manual sln would be probably recommended, and makes this among many other stuff a lot easier.


Edited by Stinkfist, 20 May 2014 - 02:54 AM.


#4 TheComet   Crossbones+   -  Reputation: 2442

Like
0Likes
Like

Posted 20 May 2014 - 07:36 AM

Okay thanks.

 

Another question then:

Is it even worth compiling cross-platform code using MSVC? If I just installed the various Windows ports of gcc, cygwin and make, my life would be infinitely better, but I am unsure of the benefits.

 

The library currently in question is zziplib. It ships with a configure script, which works fine on systems supporting a unix-like environment, and for windows environments they provide solution files for various visual studio versions, and I've never figured out how to automate the build process on Windows using these solution files. Half of them don't even work properly without manual changes, and like I mentioned before, you can't "install" something using them.

 

So how do Windows developers go about distributing a library?


"Windows 10 doesn't only include spyware, it is designed as spyware" -- Gaius Publius, The Big Picture RT Interview

"[...] we will access, disclose and preserve personal data, including your content (such as the content of your emails, other private communications or files in private folders), when we have a good faith belief that doing so is necessary" -- Windows 10 Privacy Statement


#5 ApochPiQ   Moderators   -  Reputation: 19592

Like
0Likes
Like

Posted 20 May 2014 - 02:36 PM

MsBuild is your friend :-)

 

 

Also, moving this to the appropriate forum.


Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

#6 AllEightUp   Moderators   -  Reputation: 5161

Like
1Likes
Like

Posted 22 May 2014 - 01:17 PM

I'm not comfortable with NMake but CMake creates an INSTALL project in your solution which is the "make install" equivalent. So you can build this project from the command-line and it should dump your build folder into C:\Program Files (x86)\YourProgramName. I don't know if there is an easy way to change the install directory.

 

As long as all the install commands work on relative items, the variable CMAKE_INSTALL_PREFIX allows you to tell CMake where to perform the actual install.  It defaults to "C:/Program Files/<solution name>" and you can change it in cmake at anytime after the project command (i.e. after cache is loaded) or simply modify it in the cmake-gui.







PARTNERS