I am in the process of implementing a Continuous Integration Server for our embedded application built with the GNU-ARM toolchain with the GNU-ARM-ECLIPSE plugin. Therefore, I need to compile our CDT project from the command line on the server (I want to compile the Debug, Release and UnitTests builds, and then run the tests).
I was planning to use the Eclipse Headless builds (see here).
The problem I am getting is that after building, I don't get the prompt back (on windows CMD or Powershell), and so I cannot run the tests. And also, the CI server complains that the build was not successful, but everything builds fine. If I kill the command after it is completed, I can run the tests, but there is no acceptable way I could do that with a script or batch file when on the server.
It turns out that this is a Windows only problem, because on the mac or on linux, I don't have that problem. Our server is a TFS server, therefore it has to work on Windows.
Also, it might be related to how the eclipse project is setup because I tried it with a basic Hello-World project, and it works fine. Any hints or help would be greatly appreciated.
I had the same issue as yours and resolved it by changing options order (don't ask me why).
The cmd that have your problem :
eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data {myWorkspace} -import {myProject} -build "project/target"
the cmd that did work for me :
eclipse --launcher.suppressErrors -nosplash -data {myWorkspace} -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import {myProject} -build "project/target"
Related
We have a project (C) (not a Cygwin exe project, but some embedded cross-compiled one), which has a Makefile designed to be used from within a Cygwin environment. That is the intended use is to open a Cygwin terminal, go t the project directory and run make from there.
I can import this project in Eclipse as a Makefile project, but apparently the regular build command from within Eclipse won't work as it is trying to invoke make in the native (Windows) environment. Is there a way to make Eclipse to run the Cygwin, invoke a make command in it and have the regular CDT error parsers to work? Perhaps by creating a custom builder?
I have managed to work around this problem by using a build script invoking some cygwin commands:
build.bat:
#echo off
c:\cygwin64\bin\bash --login -c "cd %cd:\=/%; make %*"
Breakdown:
c:\cygwin64\bin\bash --login -c "<command>" - used to invoke a command from within cygwin environment
cd %cd:\=/%; - is a "dos" %cd% variable (current path) with backslashes replaced by slashes - to avoid these to be stripped down as unescaped.
make %* - invoke the cygwin make command with all of the arguments passed to this batch file - this is to let Eclipse pass the build target and/or build flags.
Now in "project build" tab in eclipse I replace the make command with build.bat and it is working like a charm. The only drawback i to have this file in addition to the other project files, but since it is pretty generic it can be reused in any project with these restrictions.
I have been tasked with creating a build server for a Xilinx project. The developer for the project provided me with the steps he manually takes to do a build, and those work fine. I am now trying to do the build via the command line, so I can set up a script to do the build. From my understanding, the command:
ECLIPSECPATH\eclipsec.exe -nosplash -vm “JAVAVMPATH\jvm.dll” -application org.eclipse.cdt.managedbuilder.core.headlessbuild -build all -data WORKSPACE -vmargs -Dorg.eclipse.cdt.core.console=org.eclipse.cdt.core.systemConsole
Should be the correct command to perform the build (the all caps names being file paths to the various files needed). I use the same command for importing (except -import instead of -build), which does work correctly. But when I run the command, it returns a bunch of errors that are either "Cannot run program "make": Launching failed" or "Error: Program "make" not found in PATH".
The build works just fine when building from the GUI, and I didn't have to use the Tool Change Editor to change anything (it worked by default). Am I missing something from my command, or is there something else I need to set? Are the projects just missing something needed? I'm not a developer, but I would think if it builds from the GUI, the projects have everything they need to build.
I have a project where I run a Xilinx eclipse project in headless mode. It is on a Linux system, but I think what I am about to say applies to windows too.
When one of the Xilinx GUI apps run the first thing they do is source some environment settings. If you are not sourcing this before you run the command line above then you may be missing some paths in the environment, in particular the path to "make" which is not part of windows.
There is a batch file under C:\Xilinx\SDK\2014.4\ (or whichever version you have installed) called settings64.bat.
Running this before the eclipse command line should setup the tool environment you require.
C:\Xilinx\SDK\2014.4\settings64.bat
As part of the setup I also run this to help setup the workspace.
xsdk -wait -script sdk.xml -workspace WORKSPACE
I'm trying to install Scalatra on windows seven and need to change a file to executable...the Scalatra documentation says to do this, which is unix. What is the windows equivalant?
chmod u+x srt
You can simply open the relevant folder with a unix command prompt (I use git bash) and execute the unix commands from there
To get scalatra-sbt going on Windows, either port you own sbt.bat from scalatra-sbt, or install chmod via cygwin.
Assuming you've successfully installed the rest of Conscript and giter8, you can start a project that downloads scalatra-sbt. From there, one can look through the ./sbt source, and port the bash script functionality to your own windows specific script, or install a unix compatibility layer into Windows. If you go down the "windows specific script" route, perhaps the scalatra-sbt would appreciate the project contribution.
The "unix compatibility layer" route will eventually allow you to run ./sbt. chmod is a unix command line function, and is provided in a default package of the tool set cygwin, which provides a complete lunix-like environment. Once inside a cygwin terminal, you can chmod your file, as mentioned in the scalatra-sbt first project.
Diving into the contents of ./sbt from scalatra-sbt, this is actually unix script wrapper around the scala build tool (also referred to, confusingly, as sbt). If while trying to run ./sbt you get strange '\r' errors, install the cygwin package dos2unix, and then run it on the sbt file. If you run into any "which: no curl in..." or "which: no wget in..." errors, go back to the cygwin installer, find those packages such as wget, and then install those programs.
By the way, the last thing the scalatra-sbt script runs is the Scala build tool. The Scala build tool sbt itself has many reported issues with cygwin's default configuration, so you will likely need to do more research. Depending on what issues you're running into on your specific setup, you may need to make changes to the end of the ./sbt script to adjust the parameters used to launch the Scala build tool.
I am attempting to build swagger-codegen on Windows 7 x64. I ran into a problem when I had to run ./sbt assembly. I couldn't see how to do it from the Windows command prompt.
Instead, I ran it from Git-Bash. It ran successfully, with warnings, but no errors.
Is this an acceptable solution?
I ask because I am stuck on the next step running the template client for petstore.
./bin/scala-petstore.sh produces the following error:
Error: Could not find or load main class Files
I believe the OP was successful in running sbt on Windows 7. However, I believe the OP issue comes from running the scala-petstore.sh script.
I have found the swagger generation scripts depend on a bash shell. However, on Windows Git Bash shell, the basic scala executable does not works. Run "scala -version" on Windows from a CMD shell and you get the scala version. Run "scala -version" on Windows from a GitBash shell and you get:
$ scala -version
Error: Could not find or load main class Files
Answered in another question/topic: Does anyone know how to run the scala executable in Git Bash shell?
The official SBT distribution at scala-sbt.org includes an sbt.bat-file that works on windows.
I'm evaluating install4j in our company.
We build a win32 installer and we are trying to set up a continuous integration environment to test it.
The CI server is able to upload the installer to the windows target machine (which is a virtualized environment) using FTP, and run batch script that looks like
cd c:\tmp\upload\
my_installer.exe -q -varfile response.varfile -console
Currently we're using the trial version of install4j 5.
When the installer is ran from the command line (cmd.exe over remote desktop) I get a popup window that warns about the trial version.
Installation is frozen until I click ok.
When the installer is ran from telnet the command just hangs and never returns. I believe the reason is that popup window.
To fully evaluate install4j we need to be able see how it fits our CI process.
Is there any workaround for this?
This is a restriction of the evaluation version, with a permanent license key the evaluation dialog will not be shown and the problem will go away.