InstallAware - How to Execute custom program in Before Remove Previous Installation - uninstallation

Is there a way to Execute a custom program before InstallaWare removes the previous version of the my Application?
Thanks a lot.

There is a section in the software with this name : Advanced Options -> Run Programs.
That's what you want.
Here is official manual : http://www.installaware.com/blog/?p=16

Related

Calling a c++ function on Rstudio on a MAC and getting (clang: error: unsupported option '-fopenmp')

I know how to code but I really do not know my way around a computer.
I have a program that I have to run for my master thesis. It is a code with multiple collabs and runs perfectly on Linux. However, it is a very complex simulational code and therefore it takes time to run for multiple parameters. I've been using my Linux at the university to run it but would like to run some of it on my personal computer (MAC OS). It works by using the R language to call upon c++ functions as follows (being filename a code on c++).
On a Rstudio script:
Sys.setenv("PKG_CPPFLAGS" = "-fopenmp -DPARALLEL")
system("rm filename.so")
system("rm filename.o")
system ("R CMD SHLIB filename.cpp")
dyn.load("filename.so")
After system ("R CMD SHLIB filename.cpp") I get error:
clang: error: unsupported option '-fopenmp'
make: *** [filename.o] Error 1
I've researched on the subject and found this
Enable OpenMP support in clang in Mac OS X (sierra & Mojave)
I've Installed LLVM, yet I do not know how to use it in this case.
How do I use it in this case?
Thank you in advance.
"Don't do it that way." Read up on R and Rcpp and use the proper tools (especially for packaging and/or compiling) which should pick up OpenMP where possible. In particular,
scan at least the Rcpp Introduction vignette
also look at the Rcpp Attributes vignette
"Just say no" to building the compilation commands by hand unless you know what you are doing with R and have read Writing R Extensions carefully a few times. It can be done, I used to show how in tutorials and workshops (see old slides from 12-15 years ago on my website) but we first moved to package inline which helps here, and later relied on the much better Rcpp Attributes.
Now, macOS has some extra hurdles in which tools work and which ones don't. The rcpp-devel mailing list may be of help, the default step is otherwise to consult the tutorial by James.
Edit: And of course if you "just want the above to work" try the obvious step of removing the part causing the error, i.e. use
Sys.setenv("PKG_CPPFLAGS" = "")
as your macOS box appears to have a compiler but not OpenMP (which, as I understand it, is the default thanks to some "surprising" default choices at Apple -- see the aforementioned tutorial for installation help.)

The flow list command doesn't give me the IOUFlow.

I tried the HelloWorld program as per the instructions given in the CORDA docs https://docs.corda.net/hello-world-introduction.html, but it did not work it throws the following error. When I used flow list command it does not show the IOUFlow which I defined inside the App.kt file. Please help.
What Cordapp did you install? Looks like you didn't install the IOU one but only the basic Corda one.
p.s.
docs.corda.net/hello-world-running.html did you compile all the steps with gradle?

Running SonarQube analysis scan - SonarSource build-wrapper

I'm new to running SonarQube scans and I get this error message in the log in Jenkins:
16:17:39 16:17:36.926 ERROR - The only way to get an accurate analysis of your C/C++/Objective-C project is by using the SonarSource build-wrapper. If for any reason, the use of the build-wrapper is not possible on your project, you can bypass it with the help of the "sonar.cfamily.build-wrapper-output.bypass=true" property. By using that property, you'll switch to an "at best" mode that could result in false-positives and false-negatives.
Can someone please advise where I can find and run this SonarSource build-wrapper?
Thanks a lot for your help!
To solve this issue, download the Build Wrapper directly from your SonarQube Server, so that its version perfectly matches your version of the plugin:
Build Wrapper for Linux can be downloaded from URL
http://localhost:9000/static/cpp/build-wrapper-linux-x86.zip
Unzip the downloaded Build Wrapper,
Configure it in your PATH because it's just more convenient
export PATH=$PATH:/path/where/you/unzip
Once done, Run below commands.
build-wrapper-linux-x86-64 --out-dir <dir-name> <build-command>
build-wrapper-linux-x86-64 --out-dir build_output make clean all
Once all this done, you have to modify your sonar-project.properties file with following line. Note the dir-name is same directory which we defined in previous command.
sonar.cfamily.build-wrapper-output=<dir-name>
and then you can run the sonar scanner command.
sonar-scanner
this will do the analysis against your code. For more details, you can check this link.
Contacted support, turns out this was caused by missing the argument sonar.cfamily.build-wrapper-output in the scanner begin command.
Build wrapper downloads:
Linux: https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
macOS: https://sonarcloud.io/static/cpp/build-wrapper-macosx-x86.zip
Windows: https://sonarcloud.io/static/cpp/build-wrapper-win-x86.zip
Some links covering how to run the build wrapper:
https://docs.sonarqube.org/latest/analysis/languages/cfamily/
https://blog.sonarsource.com/with-great-power-comes-great-configuration/

How to disable Eclipse CDT code formatter for a code block

The CDT code formatter has a pretty decent selection of options, but it doesn't seem to have to a feature that allows one to tell it to ignore a block of code. This feature exists in the Java code formatter:
// #formatter:off
... // code that should not be formatted
// #formatter:on
Does this feature exist and I just don't know about it, or does anyone know of any decent work-arounds?
In my particular case, I'm trying to define data structures (enum types and arrays of strings) that I want to have specific layouts.
Use Astyle (Artistic Style) formatter, it's far superior to the Eclipse CDT built-in formatter and has the feature you require:
http://astyle.sourceforge.net/astyle.html#_Disable_Formatting
Example:
#include <iostream>
int main(int argc, char** argv)
{
// *INDENT-OFF*
std::cout<<"hello world"<<'\n';
// *INDENT-ON*
}
Formatting this using astyle won't indent the code between // INDENT-OFF and // INDENT-ON but it will also disable any other formatting features astyle does, like the spacing of the instructions in this case.
I use it myself configured as an external tool.
The only problem, external tools don't have hotkeys, but there is one hotkey to "Run Last Launched External Tool", and if you only use one external tool it works the same.
More details about the configuration (linux):
Astyle:
You can get it easily from your distribution repositories or via the official site.
To setup a configuration file with the formatting settings:
http://astyle.sourceforge.net/astyle.html#_Options_File
I use the home folder variant, just create a .astylerc in your $HOME, mine contains:
--suffix=none
--style=allman
--indent=tab=4
--max-code-length=70
--close-templates
--keep-one-line-blocks
--break-elseifs
--break-closing-brackets
--align-reference=type
--align-pointer=type
--indent-classes
--indent-modifiers
--indent-switches
--indent-cases
--indent-labels
--indent-col1-comments
--min-conditional-indent=0
--pad-oper
--pad-header
--unpad-paren
Eclipse:
"Run" menu --> External tools --> External tools Configurations... Add a new "Program" and in the configuration window:
Location: /usr/bin/astyle (use whereis or locate to check this)
Working Directory: ${project_loc}
Arguments: ${selected_resource_loc}
In the same window, refresh tab:
Tick Refresh resources upon completion.
Tick "The selected resource"
Same window, common tab:
Display in favorites menu, Tick "External tools"
Yes, you can do it since CDT supports this feature starting from version 9.7. The behavior is exactly the same of JDT.
If you are using OS X or Linux (I haven't checked Windows, but it may be supported), you can use clang-format and CppStyle instead.
clang-format is a formatter utility which is provided with Clang, and it supports on/off comments // clang-format on and // clang-format off in C/C++/ObjC code. An introduction to build Clang and its utility tools can be found here.
http://clang.llvm.org/get_started.html
You do not need to install whole Clang and LLVM files on your system. Because clang-format is a standalone program which works without Clang. The on/off comments are not supported in old versions, so please use ver 3.7 (available from SVN as of Feb 2015).
CppStyle is an Eclipse plugin which enables us to use clang-format from Eclipse CDT.
https://github.com/wangzw/cppstyle
FYI. Here is the same feature request in the CDT Bugzilla. The functionality might be officially supported in future, but using clang-format or Astyle seems to be a better solution at the moment. https://bugs.eclipse.org/bugs/show_bug.cgi?id=453926
I guess I could stick these in a file with an extension ignored by the formatter and include this file where appropriate. I tried this out and it works - the data structure gets picked up the indexer (i.e. autocomplete works). Still, it would be nice to have an equivalent to the Java "#formatter:..." syntax.
As far as I know the answer is simply no, such a feature does not exist. You might be able to implement such a feature using the SDK though. Beware that in my experience the documentation is very incomplete and it's very hard to find an Eclipse developer who would be willing to help you fill in the holes. But since the feature exists in the Java formatter and it is an open source product, perhaps you could port over the logic to the C++ formatter.
You could also avoid formatting the whole file, and instead format only by selection.

Help with using Xcode

So, I'm using Xcode to program with C++. I want to access the C++ tool but I'm having this problem.
This is what it looks like when opening a new project. Only for me, I don't have the 'Command Line Utility' option at the end.
alt text http://img.skitch.com/20100305-gsab76ef7bkx5ihwwj94cui39t.jpg
How can I get the 'Command Line Utility' option to be available. I need it to access the C++ tool.
Please and thank you!
If you're on a reasonably current version of Xcode (e.g. 3.2.2) then the selection process is slightly different - you need Application -> Command Line Tool and then select C++ stdc++ from the popup menu.
I have Xcode v3.2
I find the command line utility under File > New Project > (Mac OS X) Application > Command Line Tool (in right pane). When you click on Command Line Tool in right pane you will see a drop down box that lets you select the language you want to use. Mine defaults to C but there is an option for "C++ stdc++".