Find installed MSVC with NSIS Installer? - visual-c++

I would like to find out if any kind of a Microsoft Visual package is installed during my Nsis installation (I need the Compiler from those Microsoft packages (C,C++ Compiler))
One possibility could be to have a look in the registry...but it would always be a different entry.
So far I´ve got no good solution to detect a MSVC maybe anyone else does?

Your best bet is probably to look in the registry. You could take a look at some open source build tools and see how they do it. (SCons etc.)
The other alternative would be to search all drives for cl.exe with FindFirst and friends but that could be slow and you would probably have to check the version information to filter out false positives...

Related

How can I fix Microsoft Visual C++ 2017 X64 Minimum Runtime error during installing Redistributable packages (VC_redist.x64.exe, VC_redist.x86.exe)?

During installation I get "The feature you are trying to use is on a network resource that is unavailable" and prompt to specify some path to vc_runtimeMinimum_x64.msi. After providing some path to required file I get error states that this file doesn't match required version Minimum Runtime 14.14.26405.
I finally found the solution reading this question: Install vcredist_x64 with VS2017 installer project
I realized that specific VC_Redist.x64.exe files could be downloaded by links like https://aka.ms/vs/15/release/26405.00/VC_Redist.x64.exe, where 26405.00 is exactly the version I was required to fix. Note, that you need version from error text after clicking OK, not from window title.
And the last point is that this exe must be executed from cmd with argument /repair to help me with this issue. Regular execution by double click made no effect.
I found the solution elsewhere. It said to
Fix problems that block programs from being installed or removed
https://support.microsoft.com/en-us/help/17588/windows-fix-problems-that-block-programs-being-installed-or-removed
download troubleshooter button on the link.
Run it - choose option - have problem with installing - it lists programs - choose the missing / problematic visual c++ runtimes in the list
it will run and get fixed.
Repeat for each visual c++ you having problems with. I ran the program multiple times.
I have to thank this comment section for helping me with this problem, since I have not been able to work more efficently with my school, since I din't know what and if a single file somewhere deep down in the computer had to be deleted for this program to work.

Setting up ARM Toolchain in Qt Creator (Ardupilot project)

I'm starting a drone project based on Ardupilot and trying to build Ardupilot project using Qt Creator, following this instructions . I'm working with Ubuntu, BTW.
You've probably find this stupid (cause it probably is), but I'm not able to set up the compiler (in spite of having the instructions):
As suggested, I downloaded the compiler from here, and tried to follow the instructions but after choosing a custom compiler in 'Build & Run', the 'Make path' is driving me crazy and I have no idea of which path is that (in other words, the equivalent to the file 'make.exe' in Windows, see the image attached), since there doesn't seem to be anything similar in the compiler folder and it doesn't seem to refer to the Makefile of the project.
Hope anyone can help me, as you've surely noticed, I'm pretty new to big, real projects and also to Linux itself.
Thanks in advance,
Eduardo
PD:
Instructions provided (both Windows & Linux):
Linux: Which one is the 'Make path'?
The build directory should point to ardupilot/ArduCopter if you are building for Copter
In the example it was pointing to ardupilot
Compiler path: /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc
The make file path: /usr/bin/make
First. What version of qt? If it's 5.7 then the 2015 toolkit won't work. If you're new to Linux then you should definitely stay with a prior version of qt 5.7 until someone has compiled a new toolkit that supports a c++11 compiler.
You don't have enough info on what you're doing to give a good answer though.
What do you need the program to do? If it's Qt3d on Arm then you have a big problem only 5.7 will do.
Hope this helps.

chef how to overwrite attribtues in json file

I'm trying to run the same recipe twice with different attributes.
Is there a way to specify it in the run list?
Example:
"myRecipe":{
"run-list": "recipe[test], recipe[test]"
}
and the first one should have flag=false while second one should execute with flag=true.
No, that's not possible. You have to implement such logic in your recipe and e.g iterate over an array.
I answered a similar question previously:
The short version is, you need to modify your thinking. If you need to install software and configure it, you might do better to think about breaking it apart into two pieces.
Longer answer: have you taken a look at any of the cookbooks on the opscode community site? Many patterns recur and work that others have published could certainly be useful... Especially as you appear to be just starting out with chef.
I've also tried using resources:
define :installx, :cmd=>'good', :upgrade=>true do
Chef::Log.info('cmd = #{params[:cmd]}')
if params[:upgrade]
Chef::Log.info('upgrading...')
else
Chef::Log.info('installing...')
end
end
installx resource
installx "name" do
cmd "install 1"
upgrade true
end
and it errors out: "ERROR: Cannot find a resource for define"
This is pretty much right out of the official documentation. If anyone know what's causing this, please let me know.
Some of the Chef cookbook are written very well in my opinion such as the visualstudio cookbook from https://github.com/daptiv/visualstudio.
I do have a case when I need to run this recipe twice. I have to install Visual Studio 2012 and 2013 on a machine to compile different source code. These versions of Visual Studio have the exact same silent install process by point to an XML file so it was easy to make it work for 2012 and 2013.
I was able to create a Chef role file to override the attributes of the visualstudio cookbook to point my private Visual Studio 2012 ISO. That was easy. Then I created another Chef role file for installing 2013 to point to a separate Visual Studio 2013 ISO. Since Chef doesn't run the recipe twice it ends up only installing Visual Studio 2013. :(
It would suck if I have to make two local copies of the "visualstudio" cookbook.

How do I backup my C++ Builder component installation?

I finally have my C++ Builder 2010 installation the way I want it, with all my components upgraded and installed. (touch wood)
I have been working with C++builder since version 1 and I know from countless previous traumatic experiences that this state of affairs could change in an instant. I would like to backup the installation and component set.
Is there a way to do this? A tool perhaps? A menu command that I have maybe missed all these years? I don't want to have to reinstall all the components from the bpl source again.
I make nightly backup images of my entire drive, I would like to do this for c++builder only if possible.
If it's a matter of simply copying files, which files would I need to copy? Are there entries in the registry that would need to be restored?
Thanks in advance for any thoughts and suggestions
The HKCU\Software\CodeGear\BDS\7.0\ registry section contains the "known packages" subtree that contains which components you have installed. reg export/import should save you some trouble.
You'll also want to backup/restore the actual files referenced there as well.
It has been a while since I used C++ Builder, but I will make two suggestions...
1) run regedit and looks for "builder". You will probably find a hive like hk_local_machine/software/codegear or such. Export that and you can import it later
2) have a look at GExperts - is they don't have the exact solution, they still have some pretty useful (and free) tools

compiling actionscript in linux

I'm working on a website that requires a flash mp3 player. I have absolutely no idea the procedures from messing with flash/actionscript/flex etc., however I need to edit the flash very slightly (I need to add two lines of code). There are a multitude of tutorials out there for setting up a flash (or flex or whatever) development environment but, as my needs are so simple, I'd like to go a little more light-weight than that (also, many seem outdated). I guess what I'm saying is I'm looking for a simple way to recompile some existing actionscript (command line is a plus!). Does anyone have a trick up their sleeve to accomplish this?
Download the free/opensource Flex 3 SDK. This includes an ActionScript3 compiler. Run the compiler like this:
mxmlc MyAs3File.as
There's MTASC for ActionScript 2.
You can compile it online here: http://wonderfl.kayac.com/. No mess that way.
I also wanted to say that swftools has exactly what you need. There is a swfc compiler which will compile as2 files. I would really recommend updating the source though. AS3 is much faster than AS2 and there are a lot of tools out there for example mxmlc and fcsh included in the open source Flex sdk. If you are looking for a full blown IDE there is a linux version of Flash Builder that was released as an open source port ... there are a couple other ones out there as well.
General Linux
On linux you can get the source from swftools.org.
Debian / Ubuntu
On debian / ubuntu you can run
apt-get install swftools
Mac OS X
Not exactly 'linux' but on mac OS X if you have homebrew installed you can do:
brew install swftools
Great, but how do I compile the code?
One this is installed you should have a new utility that you can use to do:
as3compile MyAs3File.as
Gotchas
Please note this is not a 1:1 replacement for Adobe's compiler - there are some things that it does not support ( see documentation, FAQ, changelog at swftools.org ) but it worked well for compiling my simple actionscript.

Resources