I created a blackberry application but I am having problems publishing it on my web site. I have uploaded the jad, jar, alx and cod file (from which I extracted the whole content). I also added the missing MIME types. But when I try to download the application by requesting the jad file, I get a 500 error with the details saying that the file myproject-30.cod is missing.
So I looked at the list of cod file... sure enough, they go from 0 to 29. No 30, 31 or above. However, in the jad file, there are references for cod files for up to 110.
My question is: how can I configure eclipse to produce the jar file properly? Or, alternatively, how can I modify the jad file to delete references to the 30+ cod files? Or maybe it is that the cod file is missing files?
You may try with blackberry ant tools, task will look like this:
<target name="produce_ota">
<mkdir dir="${ota.dir}" />
<jadtool input="your_app_name.jad" destdir="${ota.dir}">
<fileset dir="${build.dir}" includes="*.cod" />
</jadtool>
</target>
This will produce all needed cod parts and jad file to ${ota.dir} assuming there will be built application in ${build.dir} directory.
Check out slashdev.ca tutorial - Blackberry development with Ant & Eclipse
For some reason, the JAD file was not recreated by the rapc compile tool. Basically, it was created a couple of week ago and that's it, so clearly it was not up-to-date. To force the eclipse plugin to recreate the file, I simply deleted it. The new file is now working fine.
Related
Just had a quick question, in my ant build.xml, when I am stating where my jar's that need to be included are located, is it possible to include a .zip file with the classes i need in there as well? Only reason I am asking is because I have received classes that I am dependent on from an outside source and they are just zipped up. I was thinking something like this could be possible.
<path id="test.lib">
<fileset dir="{basedir}/../path/to/lib/files" includes="testzip.zip" />
</path>
I just wasn't sure if the classes had to be in jar format. Thanks for the help!
They do not. The zip extension is fine.
I have a phonegap project and split the code in global files (that are similar for android and ios) and ios/android specific files. Then I have an ant script where I merge the files into one project again.
The problem is I have a plugin "xzing barcode scanner". The files lay within the projectname/Plugins folder of the IOS project. The files are also merged to the target directory, but in xcode they´re not shown. And when I run the app I get the error that the plugin isn`t known.
This part of the ant scirpt copies the file
<copy todir="${targetdir}/${projectName}.xcodeproj">
<fileset dir="${projectroot}/${projectName}.xcodeproj"/>
</copy>
<copy todir="${targetdir}/${projectName}">
<fileset dir="${projectroot}/${projectName}"/>
</copy>
The contents of the Plugin Folder:
CDVBarcodeScanner.mm
zxing_all_in_one.h
zxing_all_in_one.c
README
All Files are copied to the target directory (targetdir/projectname/Plugins), but somehow not merged into the project in xcode.
Anyone knows how to fix this?
Your files do not seem to be referenced to your XCode project.
I think a simple way you may try would be to copy your files manually like this (I don't know why but this kind of issue was solved for me like this XD...):
Use your Finder to go to your folder Plugin and move the "hidden" files (CDVBarcodeScanner.mm, zxing_all_in_one.h, zxing_all_in_one.c, and README) somewhere else, on your Desktop for instance.
Open XCode and create an empty file for the folder Plugin (--> Through XCode: right click on the folder Plugin, New File...->iOS->Other->Empty) and save the file as CDVBarcodeScanner.mm (for example)
Open the file CDVBarcodeScanner.mm (for example), that you put on your Desktop for example, with a simple text editor and copy the content to your new created file in XCode
Do the same for the remaining files:
zxing_all_in_one.h
zxing_all_in_one.c
README
Hope this solution will work for you. Let me know of your results.
I am trying to upload a BB app to its App World. Everything I read makes a reference to upload a COD file or some COD files.
When you get to this point when submiting the app, it gives two choices to do the upload. One is file by file and the other is to upload a .ZIP file.
My problem is that when I sign my app, it generates a JAR file where are all my images and classes and .COD files and .CRB files (languages RRC files).
What I do is to convert this JAR to ZIP file and upload the app .ZIP way but it gives me an error because of the name of CRB files that now turns to have some strange characters. They come from a resources_en.rrc to a resources_úen.crb
I am doing something wrong but I can't figure it out. What is the right way to do this or what am I doing wrong?
Thanks in advance!
For Eclipse:
The COD is in your workspace\ProjectName\deliverables\Standard\\YourProject.cod
All you need to upload the the App World is this COD file, don't need to do any converting of a JAR. Do, however, make sure you have signed the file by (in Eclipse) right clicking on the project -> BlackBerry -> Sign with Signature Tool
The COD file is produced by RIM's compiler (rapc) and is the file that is signed. If you are using JDE for development it should be in the top level directory of your workspace. I'm not familiar with where Eclipse puts it.
I there any way that I can see the contents of a Blackberry COD file to check which classes are in there?
You can't.
You can unzip content of *.jar, not the *.cod.
Earlier you could use some Zip utility like 7Zip etc to see the contents in the jad, However I got error with the cod files generated by the newer versions of the JDE
Oh, I think we can view content of BB COD file. I use Total Commander to view content of archive file, such as ZIP, JAR or COD. It's OK.
I have this team build target setup to after compile
<Target Name="AfterCompile">
<Copy SourceFiles="$(SolutionRoot)\Development_VS2008\MyCompanyName.SharePoint.12" DestinationFolder="c:\testing"></Copy>
</Target>
I want the folder structure copied from source to destination...
Amazingly I am getting this error
Could not copy the file "C:\TFS\NightlyBuild\Sources\Development_VS2008\MyCompanyName.SharePoint.12\"
to the destination file "c:\testing\", because the destination is a folder instead of a file.
To copy the source file into a folder, consider using the DestinationFolder parameter instead of DestinationFiles.
As you can see I am indeed using the destinationfolder parameter, does anyone know what I am doing wrong?
I think it might be just because SourceFiles is a directory rather than the files you want to copy. Try this:
<Target Name="AfterCompile">
<ItemGroup>
<FilesToCopy Include="$(SolutionRoot)\Development_VS2008\MyCompanyName.SharePoint.12\**\*.*"/>
</ItemGroup>
<Copy SourceFiles="#(FilesToCopy)" DestinationFolder="c:\testing\%(RecursiveDir)"/>
</Target>
This error happened to me not under Team Foundation project, but standalone one, and when I add new .dll file with build action ContentWithTargetPath. I wanted this library to be included in my output directory. Record for this action appears in one of the ItemGroup section in .csproj file like:
<ContentWithTargetPath Include="Resources\Libraries\libName.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</ContentWithTargetPath>
But for some reason this is not enough to ContentWithTargetPath option works fine (I saw the explanation about it somewhere in StackOverflow, but don't remember where). You should manually add TargetPath subsection to ContentWithTargetPath like this:
<ContentWithTargetPath Include="Resources\Libraries\libName.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>libName.dll</TargetPath>
</ContentWithTargetPath>
TargetPath subsection doesn't appear by IntelliSense while editing the .csproj file in Visual Studio, as well as it doesn't appear in libName.dll's properties window, so you should add this subsection by hand. This scenario comes out even in my Visual Studio Community 2017.
PS. You can edit .csproj file while in Visual Studio - unload this project and choose "Edit YourProjectName.csproj" option (right mouse click on unloaded project). Edit and save .csproj file, then reload the project.
You need something such as this:
<CreateItem Include="someFolder\**\*.*">
<Output ItemName="files" TaskParameter="Include" />
</CreateItem>
<Copy SourceFiles="#(files)" DestinationFiles="#(files->'C:\folder\%(relativedir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
Or alternatively I've found the easiest way (if you want to be a bit more stringent about what to include/ exclude) is with some custom MSBuild tasks I've written: http://www.aaron-powell.com/blog.aspx?cat=AaronPowell.MSBuild.Tasks
You provide a source directory, a destination direction (support for network shares is provided) and file names/ extensions to exclude.
It's mainly because Team Build makes a real mess (particularly with web apps) when it run and it's not really possible to use the standard MSBuild copy tasks.
We are experiencing a lot of problems with postbuild xcopy commands. And we decided to avoid xcopy commands.
We are now including the files (which we want to copy) into project, and we are setting copy local property to "Copy if newer" and target directory (directory structure must be same in project)
It helps a lot.
Maybe it also fit your situation.
Copy task doesn't support copying directories apparently (as it's based on 'copy'), and xcopy will fails sometimes due to long filenames in source (>256 characters).
I did this (with robocopy):
<Exec WorkingDirectory="$(MSBuildProjectDirectory)"
Command='robocopy $(MSBuildProjectDirectory)\Main $(DropLocation) /S /COPY:DATS /NP /NFL /NDL /v' ContinueOnError="true" />
I had exactly the same message:
Error 103 Could not copy the file "obj\Release\xxxx.dll" to the destination file "bin\Release\xxxx.dll", because the destination is a folder instead of a file. To copy the source file into a folder, consider using the DestinationFolder parameter instead of DestinationFiles. xxxx
It happened (I don´t know why) that I had in the release folder another folder with the same name of the assembly (including extension), so Visual Studio could not create the assembly there. It is not a configuration in the project or solution, so I just deleted the folder (that I don´t know how it was created) and it worked.