InstallShield creates MSI even though build has errors - build

When I'm compiling ism project to create MSI, its still creates the MSI even though I have build errors.
The reason I need it NOT to be created is for build verification.
Instead of checking the build log for errors, I will just check the existence of the MSI.
Does anybody know how can I achieve that?
EDIT:
I'm using ISCmdBld tool to build MSIs. This is the command line I'm running to build where the environment variables are being set before running this command:
IsCmdBld -p "%FULL_PROJECT_FILENAME%" -a %BUILDMODE% -r %PRODUCT% -o "%MMSEARCHPATH%" | tee /A "%FULL_PROJECT_LOG_FILENAME%"

If you are compiling using IsCmdBld.exe, you should add the -x option, so that the build is stopped if an error occurs.
You also can use it combined with -w, which makes each warning becomes considered as an error (and thus, each warning encountered also stops the build).
More information about IsCmdBld.exe : http://helpnet.installshield.com/installshield16helplib/ISCmdBldParam.htm
I hope this helps.

Your build automation should check the exit code from ISCmdBld.exe. If the exit code is a failure, don't archive the output.

Related

Cannot run Fortify with multi CPU for a C++ project

I have a C++ project setup with CMake, running on Mac. Recently I am looking into adding Fortify to do auto code analyzation. I am using Fortify version 22.1.
After set up the CMake and shell scripts, I found that if I compile with more than one CPU (using -j), the compiler (c++ or g++) will have issues generating the libs. Sometimes it will pass and successfully generate the Fortify output, but others it will just error out. Multi CPUs compile fine for this project without running Fortify.
I also see this error when I compile with Fortify (no matter it success or not):
[error]: Translator execution failed. Please consult the Troubleshooting section of the User Manual.
Translator returned status 1:
error: unable to handle compilation, expected exactly one compiler job in ''
This error always happens after a "Linking CXX xxxxx xxxx". I can't find any documentation about them.
Does anyone know how to solve this? Thank you.
Update more details about my setup:
I use shell files to wrap the sourceanalyzer like this:
#!/bin/bash
exec sourceanalyzer -b MyApp /Library/Developer/CommandLineTools/usr/bin/c++ "$#"
And my CMake setup like this:
if (${ENABLE_FORTIFY} EQUAL 1)
set(CMAKE_CC_COMPILER ${AVSxAppDALDefaultImplementation_SOURCE_DIR}/scripts/fortify-build-cc.sh)
set(CMAKE_CXX_COMPILER ${AVSxAppDALDefaultImplementation_SOURCE_DIR}/scripts/fortify-build-cxx.sh)
endif()
My shell script to run CMake and then to the scan:
cmake $PACKAGEPATH \
...
-DENABLE_FORTIFY="${ENABLE_FORTIFY}"
echo "---BUILDING---"
make release
if [[ $ENABLE_FORTIFY == 1 ]]; then
echo "---RUNNING FORTIFY SCAN---"
sourceanalyzer -b ${CURRENT_PROJECT_NAME} -scan -f fortify_scan_result_${CURRENT_PROJECT_NAME}.txt
fi

*** internal error: unable to open jobserver semaphore '3,4': (Error 2: The system cannot find the file specified. ). Stop

I am trying to compile an existing qt application's code using mingw compiler.
During compilation I am getting an error "*** internal error: unable to open jobserver semaphore '3,4': (Error 2: The system cannot find the file specified. ). Stop".
My current project is a makefile based project. Here I have one make file (parent.mk) that compiles all primary modules and then
parent.mk
compilation steps
.
.
.
make $QT_CODE_DIR
Here in this QT code directory I have another makefile (child.mk) which has following content:
child.mk
cd "qtcode_compilation_out_dir"
qmake.exe "product.pro" -r -spec win32-g++
CONFIG+=release
mingw32-make -w
If I try to run the make command manually for QT code then it works fine.
#Alexander: Thanks for the suggestion.
Please suggest if anyone has any idea about it.
Thanks.
Finally, I found out the exact reason of the problem and solution as well.
Reason for failure:
The compilation command that I am using is "make" which is been aliased to "make -j2"and along with "mingw32-make -w" it was producing the error because mingw32-make is an obsolete make command and it doesn't support multi threaded compilation.
Solution:
I just replaced the mingw32-make with make.

Error while compiling workspace-d

I tried to install workspace-d on Windows 10 using Administrator privilege but failed.
Here is the error message.I haved installed dmd, dub and git.
PS C:\Users\U\Desktop\workspace-d-installer> .\workspace-d-installer.exe
Welcome to the workspace-d installation guide.
Make sure, you have dmd, dub and git installed.
Which external components do you want to install?
[1] DCD - auto completion
[2] DScanner - code linting
[3] dfmt - code formatting
Enter a comma separated list of numbers
Selected [all]:
Cloning workspace-d into C:\Users\U\AppData\Local\Temp\workspaced-install-635958600835730563
Checking out v2.6.0
Compiling...
Error: Error writing file '..\..\..\..\..\..\U\AppData\Roaming\dub\packages\painlesstraits-0.1.0\.dub\build\library-release-windows-x86-dmd_2071-92537C3AEFB87AC450BFCCEE2ECBED44\painlesstraits.lib'
dmd failed with exit code 1.
Error while compiling workspace-d.
This is a bug with workspace-d-installer. Even though it just runs the shell commands, it has some permission problems on windows. I have opened an issue on the project page if you want to do anything on it: https://github.com/Pure-D/workspace-d-installer/issues/2
The only solution right now is to manually clone each repository (workspace-d, dfmt, dscanner, dcd) and follow their build instructions. I'm trying to fix that issue so you can use workspace-d-installer.

Jenkins Xcode-Plugin Can't Find SDK (Unit Testing)

I'm using the xcode-plugin on Jenkins to run my unit tests and generate a result output in my iOS application. Although my build completes normally, when it gets to the point of executing the test portion it fails with the following error:
Going to invoke xcodebuild:target: FunTests, sdk: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/, project: DEFAULT, configuration: Debug, clean: NO, archive:NO, symRoot: DEFAULT, configurationBuildDir: DEFAULT, codeSignIdentity: DEFAULT
[workspace] $ /usr/bin/xcodebuild -target FunTests -sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/ -configuration Debug build
xcodebuild: error: SDK "/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/" cannot be located.
Build step 'Xcode' marked build as failure
Archiving artifacts
Finished: FAILURE
Here's a screen capture of my settings:
I've entered the correct path to the SDK, but no dice. I'm guessing this is something simple I've overlooked. Can anyone help, or even recommend an alternative way to accomplish this? I'm using Xcode 5, Jenkins v1.565, and xcode-plugin v1.4.2. Thanks in advance!
maybe the SDK name is wrong try xcodebuild -showsdks and use the name that is shown in there

dev c++ compiler error

i am getting this error at compile (actually this is a very simple project and the syntax is absolutely ok)
E:\proj1\Makefile.win [Build Error] [main.o] Error 1
this is my compiler log (dev c++ v 4.9.9.2)
Compiler: Default compiler
Building Makefile: "E:\proj1\Makefile.win"
Executing make...
make.exe -f "E:\proj1\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
'C:\Users\r' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
make.exe: *** [main.o] Error 1
Execution terminated
my user path is 'c:\Users\r&d', i think the '&' is makeing trouble in compile process , does anybody has any idea ?, i can not reinstall windows because i have got many softwares installed on my current windows and it is very time consuming to me, how can i fix this /
r&d is definitely a problem. Try surrounding it with quotes: "c:\users\r&d" and hope for the best. If it doesn't work, change the folder to something without an ampersand (you don't need to reinstall Windows for that, just create another user).
You can try creating another user without the ampersand, and then copying your profile to it to keep all your settings and application preferences, as well as documents.
You might want to try another build enviroment, like code:blocks which has its own internal build system. You probably want make sure you are using the latest gcc mingw compiler and build system from mingw(use their installer, I think it was http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-20120426/ ), and even if you don't go with code::blocks, make sure you are using the new branch of devc++ that was forked and still being developed. One last thing is if you go with code::blocks, use a nightly build in the forum, http://forums.codeblocks.org/index.php/board,20.0.html as they are much more up to date.
The escape character in Windows is ^. So try
C:\Users\r^&d