How to make CN1Lib that depends on other CN1Lib - codenameone

I'm trying to create a CN1Lib from Steve's cloudinary source, it uses BouncyCastleCN1Lib.cn1lib.
How do I use this lib in my code?
When I clean build, I got errors pointing to javabc.SecureRandom and org.bouncycastle.crypto, even though I have the CN1Lib inside my lib folder and there's no way to do refresh libs as all codenameone options are disabled because I don't have the `CodeNameOneBuildClient.jar for the taskdef.

You can't nest cn1libs. If you need to use classes from one cn1lib in another you need to specify that as a requirement to your users and change the classpath of the project to compile against the other cn1lib.
Then in the final project both cn1libs should be placed in the lib directory for the project to work.

Related

React Native - should I relink after an library update?

After I update an already existing React Native library, is it necessary to relink it again?
linking just sets up your native projects to link to the module in your node_modules. Unless there is a major change to the module, you only need to do it once.
For iOS, this will modify your .pbxproj file, updating your targets and adding links to the framework (if needed) and the .xcodeproj in node_modules/<module>
For android, it will modify your settings.gradle file to include the project from node_modules. It will also update your build.gradle to compile the new library, and it will modify your MainApplication.java file to add the new lib to react.
No, you don't need to relink the lib.

Netbeans JSF - Creating executable JAR file

I'm working at the moment on an JSF Project project. Everything is working fine. Creating .war-file, deploying it.
What I actually want is, to create a executable JAR-file for a single Class. In this Class I have a Main-method that sends an email after executing it.
I the past I have worked with Eclipse. And that was very easy.
Now I am working with Netbeans. I have red a lot of posts with the information to clean and build the project. Next to that checking the .dist folder for the JAR-files.
I have either the .dist folder, or any JAR-files in my Project folder for that correlate file.
How can I easily create that JAR-file in Netbeans?
Assuming you are using a native NetBeans project rather than Maven:
The build artefact of a project is defined by it's project type. A JSB/Web project is always build into a WAR file.
If there is one class in your project that you want to put into a JAR file, the clean solution would be to create a new "Java" project with that class (as your class clearly has no dependencies to your Web Application this should work).
For such a project NetBeans will automatically create a runnable JAR file if you configure the main method.
In your JSF project you can simply include that project as a library. If you enable "Build projects on classpath", the jar will automatically be build when you build the web application.
Another approach would be to customize the Ant script NetBeans uses internally and add a target that builds your executable JAR file from that single class.
Details on how to customize the IDE generated Ant script can be found in the manual:
https://docs.oracle.com/netbeans/nb82/netbeans/NBDAG/create_japps.htm#CHDDAHEB

How do you uninstall an extension using the CodenameOne Settings tool in NetBeans?

I installed the braintree, and other, extension into my project in NetBeans. I no longer want to use the extension. There does not seem to be a way to remove the extension using the Settings tool. Removing the libraries from the project does not seem to remove the extension.
Remove the files with the name of the extension (cn1lib and the ver file) from the lib directory (you can see it in the files tab)
Open Codename One Settings -> Build Hints and remove the ios.* and android.* entries you didn't add manually
Right click project and select Codename One -> Refresh Client Libs
Was able to successfully resolve the problem using the supplied solution. I was not correctly removing the files from the project library.

Adding packages like moment.js & account.js to meteor Project

How do I add these JS packages to a meteor project? Do I simply place the JS files in the public folder so the client and server can access them? Or is there some specific steps that I need to follow?
These kind of standalone libraries can be directly placed in the /lib directory under your project.
For use on both the client and the server, place them into project/lib folder.
Or if you want to use them only at client-side, place them as usual in project/client/lib
In short, It depends.
I would recommend you check out http://atmosphere.meteor.com for a list of packages. If what you're looking for is there, install meteorite with npm install -g meteorite (https://github.com/oortcloud/meteorite)
Once you have metorite installed you can install these community packages quite easily using mrt add packagename
Most packages are on http://atmosphere.meteor.com.
But if for some reason the JS package you want isn't on atmosphere, depending on the package, if its a UI package (e.g datepicker, etc) put it in the /client/lib folder to avoid meteor crashing (only accessible by client).
If its a type of module abstractor (e.g backbone - backbone is included in meteor already btw: add using meteor add backbone) you could put it in the /lib directory of your package, it will be referenced automatically by both the server and client.
You have to add the packages via console.
Type "meteor add accounts-password" for example.
See here
Perhaps you should watch some of these videos here
to get an idea how meteor packages are added.

how to package install version of dotnetnuke from source of it

I changed source of DotNetnuke (a little!) and I want to package an install version of my new DotNetNuke.
How Can I do this?
p.s: I know It's not recommended to change the source but I have no another option
(Telerik calendar do not support my date format and I have to replace it with another calendar !)
Thanks in advance
Answer depends on what you have changed, but the simplest way is to deliver patch that should be installed after normal dnn installation. For example, if you have only changed dll, you can ask to follow normal dnn setup instructions and finally relpace dll. If it's more than on file, you can review how dnn upgrade package is built. It follows same folder structure and places only changed files. So if you have couple of dlls changed in bin, the will be placed in bin folder, and if you have changed some ascx file it should be placed in same path by creating same folder hierarchy.
You can also create a package that can be installed to deploy your changes but for smaller set of files it will be complecated.
Let me know if you need more help.
You can package any change into a DNN install package by including the compiled files along with a DNN Manifest file. This can then be installed via the Extensions page. A manifest file is an Xml file which controls where the contents of an install zip are installed. You can make it as simple or as complicated as you need. You can also include xml merge statements to make changes to the web.config file upon install and uninstall. See the wiki for reference : http://www.dotnetnuke.com/Resources/Wiki/Page/Manifests.aspx
Incidentally, you may have been able to deliver your modified telerik source as a separate provider, and configure it via the web.config, thus saving you from modifying the source code. To do something like that, you would build your own module, and plug it in and replace the standard Telerik references.

Resources