Deploy several cod files to Blackberry Simulator - deployment

I know we can deploy a cod file to blackberry simulator using:
fledgecontroller /session=9800 /execute=LoadCod("C:\\temp\\test.cod")
fledgecontroller /session=9800 /execute=LoadCod("updates.force")
What about deploying several cod files? Seems fledgecontroller cannot deploy a zip file. So it won't help even I zip all cod files.
Thank you!

Thank you so much!
Copy the zipped cod file or cod files to the simulators home directory is not a good idea. Since restart simulator is really slow...
I was using
fledgecontroller /session=9800 /execute=LoadCod("C:\\temp\\test.cod")
fledgecontroller /session=9800 /execute=LoadCod("C:\\temp\\test-1.cod")
fledgecontroller /session=9800 /execute=LoadCod("C:\\temp\\test-2.cod")
fledgecontroller /session=9800 /execute=LoadCod("C:\\temp\\test-3.cod")
fledgecontroller /session=9800 /execute=LoadCod("C:\\temp\\test-4.cod")
fledgecontroller /session=9800 /execute=LoadCod("updates.force")
But it doesn't work. Maybe I have to deploy cod files one time, instead of calling fledgecontroller for several times. I am not sure, have to give it a shot on Monday.

One way is to copy the zipped cod file to the simulators home directory and it will be deployed when you launch the simulator.
For the fledgecontroller (interactive mode) approach you will need to load each individual cod file.
For example:
D:\Program Files (x86)\BlackBerry\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components\simulator>fledgecontroller.exe
Connecting to Fledge session "8900"... connected.
LoadCod("D:\\temp\\test.cod")
LoadCod("D:\\temp\\test-1.cod")
LoadCod("D:\\temp\\test-2.cod")
LoadCod("D:\\temp\\test-3.cod")
LoadCod("D:\\temp\\test-4.cod")
LoadCod("updates.force")
*Updates.force isn't normally required, as echo pointed out LoadCod already does an update. I've left this in case it's important on the older simulators.
Or from the simulator gui use:
file --> load java program (and repeat this step for each of the cod files above)
Fledgecontroller batch mode:
D:\Program Files (x86)\BlackBerry\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components\simulator>fledgecontroller.exe /session=8900 /execute=LoadCod("D:\\temp\\test-1.cod")
D:\Program Files (x86)\BlackBerry\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components\simulator>fledgecontroller.exe /session=8900 /execute=LoadCod("D:\\temp\\test-2.cod")
D:\Program Files (x86)\BlackBerry\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components\simulator>fledgecontroller.exe /session=8900 /execute=LoadCod("D:\\temp\\test-3.cod")
D:\Program Files (x86)\BlackBerry\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components\simulator>fledgecontroller.exe /session=8900 /execute=LoadCod("D:\\temp\\test-4.cod")
D:\Program Files (x86)\BlackBerry\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components\simulator>fledgecontroller.exe /session=8900 /execute=LoadCod("D:\\temp\\test.cod")

Thank you, Ray! Here is the trick:
fledgecontroller /session=9800 /execute=LoadCod("C:\\temp\\test.cod.pending")
fledgecontroller /session=9800 /execute=LoadCod("C:\\temp\\test-1.cod.pending")
fledgecontroller /session=9800 /execute=LoadCod("C:\\temp\\test-2.cod.pending")
fledgecontroller /session=9800 /execute=LoadCod("C:\\temp\\test-3.cod.pending")
fledgecontroller /session=9800 /execute=LoadCod("C:\\temp\\test-4.cod.pending")
fledgecontroller /session=9800 /execute=LoadCod("updates.force")
Now I don't have any trouble to deploy several cod files.

Related

Qt Postgres 'driver not loaded'

I use Windows 10 and Qt version 4.8.6 (msvc).
I try to connect to my postgres database but I always got the error 'driver not loaded'.
I copied libpq.dll to the path of the executable and in the directory plugins, which I copied under the executable path.
This is my code:
dbPhilo.setHostName("127.0.0.1");
dbPhilo.setPort(5433);
dbPhilo.setDatabaseName("postgres");
dbPhilo.setUserName("postgres");
dbPhilo.setPassword("toor");
if(dbPhilo.open())
...
In the documentation, this line doesn't work:
qmake -- PSQL_INCDIR=C:/psql/include PSQL_LIBDIR=C:/psql/lib/ms
It shows me the documentation of qmake.
Is there a way to download the correct dll from a website ?
Thank you for your help.

pyinstaller Adafruit DHT library raspberry_Pi_Driver.so: cannot open shared object

I'm using Adafruit_DHT library in a file and when I try to use pyinstaller to compile, I get an error that Raspberry_Pi_Driver.so: cannot open shared object file
I'm using normal RPi (not model 2) and raspbian. The file that I'm trying to compile works by itself fine. The Raspberry_Pi_Driver.so is there I did find ./ | grep Raspberry_Pi_Driver.so and it existed. I tried also to use the --hidden-import=Adafruit_DHT when compiling the pyinsatller and that did not work too. When compiling it does not give any error.
I noticed after compilation and in the build folder thee is an Adafruit_DHT folder that has the driver and etc.
Any idea what's going on? Could it be that the library has been recreated under build folder and this is confusing when executing the file?
I found a resolution for this (thanks to: k4ml.me/posts/pyinstaller.html) I just added '-p /path/to/mylib' when creating the exe file and mylib was the directory that Adafruit_DHT folder was (that Adafruit_DHT_Driver.so file was there).

running nunit tests (x86) with gallio

I am trying to run nunit tests with gallio.
These tests run with nunit-console-x86.exe
When I run them with nunit-console.exe, I am getting System.BadImageFormatException
Running with Gallio.Echo.exe (installed the x86 bundle from gallio.org), I am getting the same exception. Is there a way to get gallio to use the nunit-console-x86.exe?
I am running the command "C:\Program Files (x86)\Gallio\bin\Gallio.echo.exe" /r:IsolatedProcess "C:\projectdata.Tests.dll"
and I am getting this exception:
Message
System.BadImageFormatException : Could not load file or assembly 'projectdata, Version=8.2.0.17, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Update: I figured out this is because I have project.dll(x86) and project.test.dll(Any CPU).
Any Ideas on how I can get gallio.echo to work for this? Is it possible to get a Gallio.Echo-x86.exe?
I was able to get it working by renaming the following files.
Gallio.Host.Elevated.exe --> Gallio.Host.Elevated.old.exe
Gallio.Host.Elevated.x86.exe --> Gallio.Host.Elevated.exe
Gallio.Host.exe --> Gallio.Host.old.exe
Gallio.Host.x86.exe --> Gallio.Host.exe
Note: You may want to create another copy of the gallio folder under program files to do this.
I have 2 copies. one in Program Files and one in Program Files (x86) with these changes.

JavaCV - Running Examples

I'm a bit of an amateur developer and I'm currently messing around with JavaCV and Eclipse on my Mac.
I'm trying to get the FaceRecorgnition to work but I don't really know how to install this into Eclipse properly.
I've created a new Java Project, and I've imported the 'JavaCPP', 'JavaCV-Mac', and 'JavaCV' libraries.
I then created a package and called it 'mvn', then created a class and C/P the 'FaceRecorgnition' java into that class and then try and run it. I then get this error:
Oct 24, 2012 10:17:22 PM mvn.FaceRecognition learn
INFO: ===========================================
Oct 24, 2012 10:17:22 PM mvn.FaceRecognition learn
INFO: Loading the training images in data/all10.txt
Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: data/all10.txt (No such file or directory)
at mvn.FaceRecognition.loadFaceImgArray(FaceRecognition.java:317)
at mvn.FaceRecognition.learn(FaceRecognition.java:97)
at mvn.FaceRecognition.main(FaceRecognition.java:789)
Caused by: java.io.FileNotFoundException: data/all10.txt (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at java.io.FileInputStream.<init>(FileInputStream.java:79)
at java.io.FileReader.<init>(FileReader.java:41)
at mvn.FaceRecognition.loadFaceImgArray(FaceRecognition.java:244)
... 2 more
I don't fully understand imports and SDKs fully yet, so be easy.
Thanks.
This is not about missing libraries, but a missing .txt file.
It seems like the all10.txt file is not included in the JavaCV download.
Check out http://www.shervinemami.info/faceRecognition.html under the heading
"How to use the offline cmd-based FaceRec system:"
You find the all10.txt file in his zip facerecExample_ORL.zip and the faces needed in the zip
Cambridge_FaceDB.zip
Create a data folder where FaceRecognition.java is.
Put the .txt files in that folder as well as the Cambridge_FaceDB folder:
samples/
FaceRecognition.java
data/
all10.txt
Cambridge_FaceDB/

PDFlib works only if the library is in /usr/lib not in a custom path

we are using PDFlib for personalizing PDFs.
The pdflib.jar library and the libpdf_java.so file are both in the folder:
/home/user/my/custom/library/path/
I start the server with this argument:
java -Djava.library.path=/home/user/my/custom/library/path/
like it is mentioned in the pdflib tutorial
After deploying on my jBoss5 Server i got this error message:
ERROR [STDERR] Cannot load the PDFlib shared library/DLL for Java.
Make sure to properly install the native PDFlib library. For your
information, the current value of java.library.path is:
/home/user/my/custom/library/path/
So, the path ist correct (i tried it with and without the / at the end)
If I put the jar and the lib in my /usr/lib folder, everything works fine, but not with my custom folders.
I use it on a linux 64bit, if that matters!
The custom folder and the files got chmod 755 - so this shouldn't be the problem
Looking forward to your hints!