After building, FlashDevelop will run this in Project > Properties > Build > Post-Build Command Line:
"$(ProjectDir)\debug-android.bat"
The bat file will install my game on my phone. It's supposed to run only on Android target. But it also runs on Flash target. So how to disable it on Flash target?
You could pass the TargetBuild variable to your .bat file:
$(ProjectDir)\debug-android.bat $(TargetBuild)
Then simply exit early if the argument value is not android:
if not %1 == android goto :eof
echo Running on android
Check Project -> Properties -> Build -> Builder... for all available variables and their current value.
Related
Hi I was tend to build a solution which contains multiple projects using MSBuild in command prompt
But I got error C2220
: warning treated as error - no 'object' file generated Driver
I have searched and the whole site and they says
In visual stuido
project -> Properties -> configuration properties -> C/C++ -> disable some options and it works
I open it with VS2017 but there was no such option exists
I just wanna compile it using MSBuild in command prompt by removing /WX compiler option.
Of course, I have read MSBuild option but didn`t find it so I am asking this
is there any command option in MSBuidling removing /WX compiler option?
if not, how to resolve the problem
In the project properties go to:
Configuration properties > C/C++ > General
Select the dropdown next to Treat Warnings As Errors and make a choice.
I've set up go (golang) on my Linux Mint (Ubuntu) box using gvm (Go Version Manager).
I've started a project, but I can't get it to build from within LiteIDE.
go build -i [/home/username/go/src/projectname]
Error: process failed to start.
If I open a terminal and cd to the project's location and do a go build it works just fine. My go env seems to work just fine outside of liteide.
The GOROOT is not set correctly in LiteIDE.
In a terminal enter which go to know where gvm installed go. Example:
/home/username/.gvm/gos/go1.6/bin/go
In LiteIDE, click on the grey box "edit current environment" right of the environment drop down menu.
Uncomment the GOROOT line in the system.env file and enter the correct path that you got from which go. You omit "/bin/go".
GOROOT=/home/username/.gvm/gos/go1.6
Save the file. If saving is greyed out, you might need to change the permission of LiteIDE's liteenv directory. I installed mine to /opt/liteide/share/liteide/liteenv.
When the settings are configured correctly, this is what you should see in LiteIDE's Build Output window:
/home/username/.gvm/gos/go1.6/bin/go build -i [/home/username/go/src/project]
Success: process exited with code 0.
/home/username/go/src/bad/bad [/home/username/go/src/project]
Hello World!
Success: process exited with code 0.
Instead of using the system environment config (the default in the drop down menu) I'm personally using the linux64-local.env file. My LiteIDE config file looks like this:
# native compiler linux amd64
GOROOT=/home/username/.gvm/gos/go1.6
#GOBIN=
GOARCH=amd64
GOOS=linux
CGO_ENABLED=1
PATH=$GOROOT/bin:$PATH
LITEIDE_GDB=gdb
LITEIDE_MAKE=make
LITEIDE_TERM=/usr/bin/gnome-terminal
LITEIDE_TERMARGS=
LITEIDE_EXEC=/usr/bin/xterm
LITEIDE_EXECOPT=-e
LITEIDE_SHELL=gnome-terminal;lxterminal;kconsole;xfce4-terminal;xterm
I have set up a basic guard file to watch for css and js in my .net project.
If i do this in the CMD to the project and type "guard" it works great.
How would I get this to be a external command in visual studio? I would need a .bat or .exe to run in the $(project) and pass the guard argument.
What am I missing
I'm not a Windows guy, but you probably want to start Guard in the background with a command like: START /B CMD /C CALL "foo.bat"
You probably also want to set the starting directory to where the Gemfile is, and run bundle exec guard as the command.
I'm setting up a build server for a Visual Studio 2012 project and I'm trying to add detection for failed builds so the server can properly recover after a build failure and notify users of the failure and the error message.
I'm using devenv.exe with the "/Build" and "/Out" switches, however for building, the "/Out" switch captures all build output and stores in the specified file, and I only want it to capture build errors.
Does anyone have any suggestions on how I can only have build errors written to the file, or better ways of detecting a build failure?
Thank you in advance!
If you just need a pass/fail, you could use ERRORLEVEL in a batch/cmd script. It's primitive, but would probably work for most cases. Something like this:
#devenv Solution.sln /Build
#if ERRORLEVEL 1 echo Build Failed
You could also use MSBuild, which has options for console output (i.e. /clp:ErrorsOnly) as well as file output. Something like this:
msbuild /p:Configuration=Debug /t:Rebuild /clp:ErrorsOnly Solution.sln
How can I use Bumblebee and QtCreator together without starting QtCreator in Bumblebee?
For those who don't know what bumblebee is:
It is an unoffical version of Nvidia Optimus in Linux. It allows you to activate your dGPU only when you need it. But if you are a graphics programmer you probably want to create your OpenGL context with your dGPU.
1.) Create your project.
2.) Go to your project debug folder, in my example /home/maik/untitled-build-Desktop_Qt_5_0_1_GCC_64bit-Debug
3.) create a new file. Call it optimus.sh
4.) Open optimus.sh and write the following -> optirun ./untitled
Note that untitled is just name of your executable in your debug folder, in my case it is "untitled"
5.) Go to QtCreator -> Projects -> Build & Run -> Select your kit that you want to use -> Go to Run -> Under 'Run' click on 'Add' -> Custom executable -> Under 'Command' , select your optirun.sh file -> Turn on Run in Teminal .
Now every time you click run in QtCreator, your executable will be started with optirun. Now your dGPU only gets activated if you run your application, instead of being activated the entire time.
The other answer worked, but I feel like my way is cleaner:
In Qt Creator, go to the Projects tab.
Go to Build & Run -> [your kit] -> Run.
On the right hand side, under Run, click to add a Custom executable.
In Executable fill in /usr/bin/optirun (or whatever output which optirun gives).
In Command line arguments fill in ./foobar if your executable is named foobar and resides in the build directory.
Keep Working directory as %{buildDir}.