11-17-2012 11:59 AM - edited 11-17-2012 02:35 PM
Hi everyone,
I'm fighting with Visual Studio plugin for about 8 hours now and I'm desperately searching for help.
Problem description:
+ I have installeg VS plugin.
+ In BlackBerry > Signing I have correctly registered both keys.
+ I've enabled Developer settings on BB10 DevAlpha to 169.254.0.1
+ I have generated and installed debug token on my BB10 DevAlpha.
+ I've created BlackBerry - Debug target for my project.
Project Properties
C/C++ > Command line:
-g -w3 -O0 -D "WIN32" -D "_DEBUG" -D "_CONSOLE" -D "QCC" -D "__QCC__" -D "__QNX__" -U"WIN32" -U"_WINDOWS" -fexceptions -fstack-protector-all -fno-rtti -fno-short-enums -o"Device-Debug\%(FileName).o" -lang-c++
-I"G:/Projects/Hexagon/trunk/Hexagon/src" -I"G:/EngineSDK/trunk/Ngine4/engine/latest/include
Linker > Command line:
-o:"Device-Debug\Hexagon.exe" -L"G:/EngineSDK/trunk/Ngine4/engine/latest/lib/" -L"G:/EngineSDK/trunk/Ngine4/common/lib/debug/" "Ngine4bbdbg.a" "zlibbbdbg.a" "c.a" "EGL" "GLESv2" "m" "screen" -g --Wl,-z,relro -Wl,-z,now -lang-c++ -ERRORREPORT:QUEUE
Packager > Command line:
-target bar-debug "G:\Projects\Hexagon\trunk\Hexagon\bar-decriptor.x
Then I'm hitting :
Build > Rebuild Solution
+ It compiles properly :
1>------ Rebuild All started: Project: Hexagon, Configuration: Debug BlackBerry ------
1>Build started 2012-11-17 17:56:52.
1>_PrepareForClean:
1> Deleting file "Device-Debug\Hexagon.lastbuildstate".
1>MakeClean:
1> rm -rf ./game.o ./gameLevel.o ./hexmap.o ./main.o ./game.d ./gameLevel.d ./hexmap.d ./main.d G:/Projects/Hexagon/trunk/Hexagon/DEVICE~1/Hexagon G:/Projects/Hexagon/trunk/Hexagon/DEVICE~1/Hexagon
1>InitializeBuildStatus:
1> Creating "Device-Debug\Hexagon.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuil
1>Link:
1> qcc -o game.o G:/Projects/Hexagon/trunk/Hexagon/src/game.cpp -V"4.4.2,gcc_ntoarmv7le" -c -Wp,-MMD,game.d -Wp,-MT,game.o -g -w3 -lang-c++ -fno-rtti -fexceptions -fstack-protector-all -I"G:/BlackBerryDevelopment/bbndk-2.1.0/target/qnx
1> qcc -o gameLevel.o G:/Projects/Hexagon/trunk/Hexagon/src/GAMELE~1.CPP -V"4.4.2,gcc_ntoarmv7le" -c -Wp,-MMD,gameLevel.d -Wp,-MT,gameLevel.o -g -w3 -lang-c++ -fno-rtti -fexceptions -fstack-protector-all -I"G:/BlackBerryDevelopment/bbndk-2.1.0/target/qnx
1> qcc -o hexmap.o G:/Projects/Hexagon/trunk/Hexagon/src/hexmap.cpp -V"4.4.2,gcc_ntoarmv7le" -c -Wp,-MMD,hexmap.d -Wp,-MT,hexmap.o -g -w3 -lang-c++ -fno-rtti -fexceptions -fstack-protector-all -I"G:/BlackBerryDevelopment/bbndk-2.1.0/target/qnx
1> qcc -o main.o G:/Projects/Hexagon/trunk/Hexagon/src/main.cpp -V"4.4.2,gcc_ntoarmv7le" -c -Wp,-MMD,main.d -Wp,-MT,main.o -g -w3 -lang-c++ -fno-rtti -fexceptions -fstack-protector-all -I"G:/BlackBerryDevelopment/bbndk-2.1.0/target/qnx
1> qcc -o G:/Projects/Hexagon/trunk/Hexagon/DEVICE~1/Hexagon ./game.o ./gameLevel.o ./hexmap.o ./main.o -V"4.4.2,gcc_ntoarmv7le" -lang-c++ -g -Wl,-z,relro,-z,now -Bstatic -lNgine4bbdbg -Bstatic -l zlibbbdbg -Bstatic -l c -l EGL -l GLESv2 -l m -l screen -L"G:/EngineSDK/trunk/Ngine4/engine/latest/lib/" -L"G:/EngineSDK/trunk/Ngine4/common/lib/debug/" -L"G:/BlackBerryDevelopment/bbndk-2.1.0/target/qnx
1>FinalizeBuildStatus:
1> Deleting file "Device-Debug\Hexagon.unsuccessfulbuild".
1> Touching "Device-Debug\Hexagon.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:04.20
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
(-) Then I choose:
Build > Deploy Solution
and I got output log with ERROR like this :
1>------ Deploy started: Project: Hexagon, Configuration: Debug BlackBerry ------
1>Build started 2012-11-17 17:57:53.
1>BuildBar:
1> Deleting file "CompileRan".
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\BlackBe
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.08
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
I know this error is a "Known Issue" ( "A warning relating to the Linker's OutputFile property value appears on Build. This warning does not affect the build or deployment process.") .
Each next Deploy does not show it, but reports correctly:
1>------ Deploy started: Project: Hexagon, Configuration: Debug BlackBerry ------
1>Build started 2012-11-17 20:33:50.
1>BuildBar:
1> G:\Projects\Hexagon\trunk\Hexagon\Device-Debug\*.t
1> Deleting file "G:\Projects\Hexagon\trunk\Hexagon\Device-Debug\He
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:00.03
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
But there is no deploy in fact (??)
So the log shows that the deploy was successful while nothing happens.
How should packager settings look like ?
Can someone can provide me configuration tutorial for this VS plugin ?
Please help ![]()
11-19-2012 06:26 AM
At Port A Game Marathon I was ensured that somebody from dev team will help me with that issue, so I'm patiently waiting.
Meanwhile I would like to ask all BB developers working with Native SDK, does anybody of you use Visual Studio plugin? Can anyone confirm that it is working?
11-19-2012 07:49 AM
Hi,
I can confirm I have used the BB10 NDK Visual Studio integration with Visual Studio 2012. I did it with a blank project (created with Visual Studio wizard), in the blank project I just added a main.cpp with a main entry point and a couple of functions (to test stepping in/out etc.)
After creating the solution I had to go to:
Build -> Configuration Manager
From there in the drop down for 'Platform' for the project, I clicked <New...> selected BlackBerry as the platform and asked it to copy the settings from Win32.
Once the new platform was added, and selected, I had to tick 'Deploy' for the project as it didn't tick by default (apparently sometimes it doesn't tick, sometimes it does).
Once that was done I could build the BlackBerry Debug configuration, and then right click the project and choose Deploy to Deploy it. I think pressing F5 (to debug) automatically deployed for me.
I imagine you have already followed the above, but I can if nothing else tell you that on my machine I was able to then step through a few functions.
Steve
11-19-2012 07:53 AM
11-19-2012 07:56 AM
Different IDEs for different people.
For me personally, it is like saying "Why use a car to travel 300 KM when you can instead go by foot".
I find the Momentics IDE slow, clumsy and crashes constantly (running on a 64 bit machine). On top of that, I have a build environment inside Visual Studio, so I can edit code and build it, so it makes sense to be able to debug it too, rather than switching to another (memory intensive) IDE.
I of course appreciate some people will like the Momentics IDE, so that is there for those people.
Steve
11-19-2012 08:26 AM
@borceg:
As I see, most of use cases for BlackBerry are now "Port your app/game to BB".
So it is obvious that most of people doing that have already their code working on other platform.
If you want to be multiplatform, you use ONE IDE and deploy from it to all different platforms.
Both XCode for Mac and Momentics aren't competition for Visual Studio which is why most of devs use it.
Following that path, such developer wants to have ONE code base with ONE solution from which he can deploy his app/game to PC/iOS/Android/BB.
In conclusion, what is easier:
1) To maintain one codebase in one solution
OR
2) Maintain VS and Momentics solutions and duplicates of src files ?
As I found for now Momentics don't allow you to create Project with selected files and virtual hierarchy (like in VS), but instead Project folder is 1:1 mirror of real folder. Removing file from Momentics project removes it from HDD ?!
So I really need to deploy my code using VS or it doesn't make sense to me.
11-19-2012 01:57 PM
Hi...
Have a couple of questions.
1) Can you please send me the value for the Output File property. Go to the property pages for your application. Expand down to Configuration Properties -> Packager -> General and send the "Output bar File" property to me.
2) If you perform a clean solution and then rebuild do you get the first sceneio you described below?? IE that it can't deploy??
3) What is the version of the OS you are using on your DevAlpha???
Talk soon
Dave
11-19-2012 02:22 PM - edited 11-19-2012 03:35 PM
Hi Dave,
Thank you very much for following me on this subject, here's my answers :
Visual Studio 2010
Windows 7 64bit Ultimate
BlackBerry Dev Alpha
10.0.9.388
Packager > Output bar file :
$(OutDir)$(TargetName).bar
Yes first deploy after rebuild gives such error.
Interesting thing is that if I had disconnected the device and do Deploy I get meaningfull log:
1>Build started 2012-11-19 20:18:19.
1>BBDEPLOY : error : Cannot connect: Connect to /169.254.0.1:443 timed out. Please check IP address settings for the target. You may have to reboot the target.
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:11.18
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
I see that there is an BB10 update available, I will perform it and see if it will help.
Karol
EDIT:
Ok, I have taken simples OpenGL ES 2.0 template sample app from Momentics, creaed new VS Solution and put it there. I'm trying to compile and deploy it and now I'm seeing it is going further but still failing (now on debugToken):
1>Time Elapsed 00:00:00.12
2>------ Deploy started: Project: RussianEggs, Configuration: Debug BlackBerry ------
2>Build started 2012-11-19 21:18:54.
2>BuildBar:
2> Deleting file "CompileRan".
2> App Not Installed
2> Info: Package created: Device-Debug\RussianEggs.bar
2> RussianEggs.vcxproj -> Device-Debug\RussianEggs.bar
2> G:\Projects\RussianEggs\Device-Debug\*.tlog
2> Deleting file "G:\Projects\RussianEggs\Device-Debug\BBNativePack
2> Deleting file "G:\Projects\RussianEggs\Device-Debug\BBNativePack
2> Deleting file "G:\Projects\RussianEggs\Device-Debug\BBNativePack
2> Deleting file "G:\Projects\RussianEggs\Device-Debug\cmd-java.rea
2> Deleting file "G:\Projects\RussianEggs\Device-Debug\cmd-java.rea
2> Deleting file "G:\Projects\RussianEggs\Device-Debug\cmd-java.wri
2> Deleting file "G:\Projects\RussianEggs\Device-Debug\cmd.read.1.t
2> Deleting file "G:\Projects\RussianEggs\Device-Debug\RussianEggs.
2>FirstDeploy:
2> Info: Sending request: Install and Launch
2> Info: Action: Install and Launch
2> Info: Debug native: on
2> Info: File size: 36550
2> Info: Installing com.example.RussianEggs.testDev_RussianEggsf47998b
2> Info: Processing 36550 bytes
2> actual_dname::
2> actual_id::
2> actual_version::
2> result::failure 881 application author does not match debug token author
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\BlackBe
2>
2>Build FAILED.
New question is, how to ensure debugToken will be recreated and installed on device every deploy (so it will match)?
11-20-2012 03:06 PM
Hi Karol...
Okay... As of that version of the plugin the DebugToken is still a manual process...
Fortunately it's something you have to do only once for the device you are wanting to debug with. You don't need to re-upload a debug token to the device each time you deploy. In the case below it appears that the credentials you are supplying with your application do not match the debug-token you have on the device. You need to set the author and authorId in the bar-descriptor.xml to be the same as your debug-token.
<author>Your Company</author>
<authorId>gYAAgDthaMCeIcQicW0p4fUkeSM</authorId>
If you generated your debug token using Momentics you can find these two values using that IDE. If you open the Device Debug Token window, select the appropriate debug token and then click the Details button... A dialog will appear listing this information.
If you generated your debug token manually (command line) you can run the following command line to get the information you need.
blackberry-airpackager -listManifest debugtoken.bar
The output will contain the details you need.
Modify your bar-descriptor with these two values and rebuild/deploy.
I am still looking into why your original application is not working correctly.
Dave
11-21-2012 02:34 PM
I was able to deploy simple "color quad" OpenGL ES sample app.
It still requires regenerating debugToken each day I'm returning to the code, otherwise it says that authorId doesn't mach (even it is always thesame for each generated debugToken).
Also "pause" button doesn't make jump to the code as the stack is unknown for VS sadly.
Now I will try to deploy my game. I will post more update next week as I'm leaving town for few days.