Apache Cordova (3.4.0) CLI install on Windows - apache

I am trying to install cordova, I do excatly what is said in the CLI tutorial here.
After creating a new App
cordova create hello com.example.hello HelloWorld
I list all platforms and see following:
Where is other platforms liks ios? Moreover, when I try
cordova platform add android
I get following error:
What I am doing wrong or what is wrong with the Cordova?

To work, this cordova command needs to use some programs located into your sdk/tools directory. You need also have installed apache ant.
Then you must add these directories into your PATH system variable:
Background:
let's assume you have installed your Android SDK to the c:\sdk\android directory
you have installed you Apache ant to the c:\tools\apache-ant directory
Then you must create two system variables:
ANDROID_HOME with the c:\sdk\android value
ANT_HOME with the c:\tools\apache-ant value
Finally, you must modify the PATH variable and add those two to the end of the PATH' value:
;%PATH%\tools;%ANT_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
NOTE: for those who uses Linux, the instruction differs a bit.
More documentation available here.

Related

How to change file version, product and copy right values for .exe generated through electron framework

I have built an electron app, this must be able change electron file version, product version and copy right to the value I specify when package is generated. I generating the package using electron package for windows and linux. How to do this?
I see npm package rcedit is somehow linked to this, I am not sure how to use this package? I want these values to be set during electron package.
Presuming you are using the Electron Packager command line tool to package your application, please refer to its API Documentation page to learn about all the available options:
buildVersion
String
The build version of the application. Defaults to the value of
appVersion. Maps to the FileVersion metadata property on Windows, and
CFBundleVersion on macOS.
appVersion
String
The release version of the application. By default the version
property in the package.json is used but it can be overridden with
this argument. If neither are provided, the version of Electron will
be used. Maps to the ProductVersion metadata property on Windows, and
CFBundleShortVersionString on macOS.
appCopyright
String
The human-readable copyright line for the app. Maps to the
LegalCopyright metadata property on Windows, and
NSHumanReadableCopyright on macOS.
To achieve what you're asking for, you can for instance add the following options to the relevant electron-packager command in your package.json file:
--buildVersion='Build 42'
--appVersion='Version 3.14'
--appCopyright='My Own Private Copyright'

GlassFish 4.1.2 updatetool/pkg tools fail - missing pkg-bootstrap

Summary: The pkg-bootstrap.jar and related files are missing from the latest GlassFish 4.1.2 and this prevents the updatetool from running. What is the proper way to install and run updatetool on Windows 10?
Detail: I was working with the Java EE 7 tutorial and downloaded the Java EE 7 SDK Update 3 (not Web Profile) which is based on GlassFish Open Source Edition 4.1.2. I ran into a problem running the updatetool on Windows 10. When run, it gives the option to install itself but the installation fails. It looks like the update tool uses the pkg tool, and that uses a pkg-bootstrap to install itself the first time. However, this is no longer included in GlassFish 4.1.2. When the updatetool is run, it produces the following errors:
C:\glassfish4\bin>updatetool
The software needed for this command (updatetool) is not installed.
If you choose to install Update Tool, your system will be automatically
configured to periodically check for software updates. If you would like
to configure the tool to not check for updates, you can override the
default behavior via the tool's Preferences facility.
When this tool interacts with package repositories, some system information
such as your system's IP address and operating system type and version
is sent to the repository server. For more information please see:
http://wikis.oracle.com/display/updatecenter/UsageMetricsUC2
Once installation is complete you may re-run this command.
Would you like to install Update Tool now (y/n): y
C:\glassfish4>"C:\Program Files\Java\jdk1.8.0_121\bin\java" -Dimage.path="C:\glassfish4\bin\\.." -jar "C:\glassfish4\bin\\..\pkg/lib/pkg-client.jar" refresh
Error: Unable to access jarfile C:\glassfish4\bin\\..\pkg/lib/pkg-client.jar
C:\glassfish4>"C:\Program Files\Java\jdk1.8.0_121\bin\java" -Dimage.path="C:\glassfish4\bin\\.." -jar "C:\glassfish4\bin\\..\pkg/lib/pkg-bootstrap.jar" "C:\Users\[userid]\AppData\Local\Temp\pkg-bootstrap21687.props"
Error: Unable to access jarfile C:\glassfish4\bin\\..\pkg/lib/pkg-bootstrap.jar
C:\glassfish4\bin\pkg does not exist in either the latest Java EE 7 SDK Update 3 or the latest GlassFish 4.1.2. Some research on the nightly builds shows that the directory trees glassfish4/.org.opensolaris,pkg and glassfish4/pkg were removed between builds glassfish-4.1.2-b03-02_25_2017 and glassfish-4.1.2-b03-03_07_2017. I can't find anything that explains why they were removed or an alternate way to install the updatetool. My work around was to copy the two trees from glassfish-4.1.2-b03-02_25_2017 into c:\glassfish4 (from the Java EE 7 SDK Update 3) and that seems to work. But, I figure that if this was removed, there was a good reason for it, and I shouldn't be hacking it.
If there was a separate installation step for the package tool, I missed it. What is the proper way to get the updatetool to run on GlassFish 4.1.2?
I have jdk1.8.0_121 and jre1.8.0_121.
Thanks for your help.
I had the same problem as DevDevDev.
I went to the link in his post:
http://download.oracle.com/glassfish/4.1.2/nightly/index.html
Downloaded the archive:
glassfish-4.1.2-b03-02_25_2017
http://download.oracle.com/glassfish/4.1.2/nightly/glassfish-4.1.2-b03-02_25_2017.zip
Extracted the missing folders into my glassfish directory:
/glassfish4/pkg
/glassfish4/.org.opensolaris,pkg
As DevDevDev I have questions about why it was removed but it works for me...for now.... Hope it helps someone else. Thank you DevDevDev I would not have solved this without your post!
I was working with Java SE. Then I needed to work with JAX-WS, so I went into the same website as you.
Basically, it says that you have to:
Download the package (a compressed file with a folder called glassfish4)
Unzip the downloaded file (does not specify where)
voilá
It did not work for me, so I kept searching and I found this: https://forums.netbeans.org/post-91328.html
You just need to download this update from netbeans plugin Manager:
"Java EE Base"
Good luck!
I got the same problem too. It seems that glassfish 4.1 did not integrate the Update Tool, so as doc of oracle suggests, we'd better install SDK 6(glassfish 3). Here is Java EE 6 SDK Update 3, note that the version provided here is with JDK 7. If you already installed JDK in your windows 10, you may ignore it.
When you finish downloading the .exe file, you should not install SDK by double-click the .exe file. Instead, you should run below command:
java_ee_sdk-6u3-jdk7-windows-x64.exe -j [JRE-Home]
note, command here is the name of your .exe file and it needs console arg of JRE Home, mine command is as below:
java_ee_sdk-6u3-jdk7-windows-x64.exe -j D:\JDK\jre
It seems that unzipping the file using Windows explorer's zip support doesn't work properly. If you instead do as described in the README and run:
jar xvf glassfish-4.1.zip
The archive is extracted properly and all the needed pkg files are there.
What files do you need? I had the save problem I was looking for the files of tutorial. Finally I found them here: ..../glassfish4/docs/javaee-tutorial/

dojo/_base/*js missing from worklight apk in wl 6.1

I have a hybrid app that was created with WL 6.1 that uses the included dojolib. Currently it is in production for iphone and we are adding the android flavor of it. When running the code from the mobile simulator on the console, both the android and iphone work fine. The ipa file works fine. When I run the hybrid on an android device (Samsung S4), the application throws errors in the log on app startup. I have the "provide dojo libraries" turned off. In the DDMS log I see statements like the following:
09-09 12:47:12.092: E/AndroidProtocolHandler(20324): Unable to open asset URL: file:///android_asset/www/default/dojo/_base/declare.js
09-09 12:47:12.263: E/AndroidProtocolHandler(20324): Unable to open asset URL: file:///android_asset/www/default/dojo/_base/connect.js
09-09 12:47:12.303: E/AndroidProtocolHandler(20324): Unable to open asset URL: file:///android_asset/www/default/dojo/_base/event.js
Looking out in the android project in eclipse, I see those files in the "assets/www/default/dojo/_base" directory. The issue is when I look in the APK file, the "_base" directory is not there. Any help as to understanding why it is missing?
Your application should be using the compiled version of the dojo files, it seem that its not.
i would check
These files : core-web-layer.js and mobile-ui-layer are in your www folder
That the wlCommonInit function includes below:
function wlCommonInit() {
require([ "layers/core-web-layer", "layers/mobile-ui-layer" ], dojoInit);
}
I've also found an alternative way to get around the android packaging bug. As I mentioned earlier one way is to use the DojoBuildFactory to create a new layer that would have the files imbedded in them. This is the same process that WL uses to create the core-web-layer and mobile-ui-layer. I have a team working on this, but the documentation is ... scant and it is a time consuming process.
While they were doing that, I found what I think is a cleaner way of addressing the issue. Effectively open up an unsigned apk, insert the files, and then sign the APK. Worked like a charm. Here are the steps I used:
Build from working pointing to the correct worklight server and with the provide missing dojo libraries turned off
Export as Android project as an unsigned apk
Open command prompt with right env settings pointing to JDK and ADT
Create keystore (if not already done)
Unpack into temp using jar
Copy dojo files over from android/native/www/default
Pack back into apk using jar
Sign the jar
Zipalign the jar
Now you have a working apk that includes the files/directories in asset that begin with a "_".

Cordova 2.1.0 not getting included in the project after install

I am creating an IOS app with cordova 2.1.0.
I installed cordova 2.1.0, by following the steps mentioned in http://docs.phonegap.com/en/2.1.0/guide_getting-started_ios_index.md.html#Getting%20Started%20with%20iO
Now i made changes to files like AppDelegate.m, AppDelegate.h, etc. and www folder. When i see the physical folder structure in the project, the CordovaLib.xcodeproj does'nt get included in the project. Why is this happening? Why is it not getting included in the project. Every user will not download cordova and follow the steps.
Any help will be appreciated.
Thanks.
What do you mean by "user will not download". The developer (you) have to downlod it nd create the app. Cordova is packaged within your *.ip file.
If the cordov project is not oincluded, you will be unabvle to build. If you cn build it, it is included.
If you don't want to handle the complete xcode project stuff, use build.phonegap.com

Sencha Touch 2: Cannot find module `/sencha-sdk-dir/command/sencha.js`

I am on Arch Linux x64 with Sencha Touch 2 x64 installed. From the SDK directory, I ran ./sencha
[jiewmeng#JM SenchaSDKTools-2.0.0-beta3]$ ./sencha
[WARN] The current working directory (/opt/SenchaSDKTools-2.0.0-beta3) is not a recognized Sencha SDK or application folder. Running in backwards compatible mode.
Sencha Command v2.0.0 Beta 3
Copyright (c) 2012 Sencha Inc.
usage: sencha COMMAND [ARGS]
The available commands are:
build build a JSB project
create bootstrapdata generate boostrap data
create jsb generate a minimal JSB project for an app
create locale generate a template locale file from source
create manifest generate classes manifest
package package your Touch web app into a native bundle
slice theme slice a custom theme's images for IE
See 'sencha help COMMAND' for more information on a specific command.
I fixed that by adding a file .senchasdk with just "." init (as I figued Google-ing), but now I get
[jiewmeng#JM SenchaSDKTools-2.0.0-beta3]$ ./sencha
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module '/opt/SenchaSDKTools-2.0.0-beta3/command/sencha.js'
at Function._resolveFilename (module.js:332:11)
at Function._load (module.js:279:25)
at Array.0 (module.js:479:10)
at EventEmitter._tickCallback (node.js:192:40)
Whats wrong?
I solve this problem just adding the SDK path as a System Variable, and the run the command inside the sencha library folder, not the SDK folder.
I was getting the same warning as:
[jiewmeng#JM SenchaSDKTools-2.0.0-beta3]$ ./sencha
[WARN] The current working directory (/opt/SenchaSDKTools-2.0.0-beta3) is not a recognized Sencha SDK or application folder. Running in backwards compatible mode.
Sencha Command v2.0.0 Beta 3
Copyright (c) 2012 Sencha Inc.
usage: sencha COMMAND [ARGS]
The available commands are:
build build a JSB project
create bootstrapdata generate boostrap data
create jsb generate a minimal JSB project for an app
create locale generate a template locale file from source
create manifest generate classes manifest
package package your Touch web app into a native bundle
slice theme slice a custom theme's images for IE
See 'sencha help COMMAND' for more information on a specific command....
Then I downloaded the Sencha-Touch-2.0.1.1-gpl and extracted the contents to my web-root (i.e., /var/www/sencha-touch-2.0.1.1), and lastly downloaded the SenchaSDKTools and installed it via terminal as root user as follows:
root#user:/your/directory/where yo downloaded the sdk tool# ./SenchaSDKTool-2.0.1-beta3.run
I then waited for the installer to unzip the file and selected the installation directory as same where I put the Sencha-Touch library and the we have the following:
root#user:/var/www/sencha-touch-2.0.1.1# ./sencha
Sencha Command v2.0.2
Copyright (c) 2012 Sencha Inc.
.. and that is it people happy coding in sencha :-)
#todotresde Could you please share a full recipe for how to configure this on a Mac OS X.
I've just downloaded and installed the Sencha SDK in the /Applications folder, but I would hate to populate that folder with Sencha applications as instructed in the SenchaDocs at
http://docs.sencha.com/touch/2-0/#!/guide/command
cd /path/to/sencha-touch-2-sdk
sencha
The SDK install adds the SDK path variable to ~/.bash_profile
export PATH=/Applications/SenchaSDKTools-2.0.0-beta3:$PATH
export SENCHA_SDK_TOOLS_2_0_0_BETA3="/Applications/SenchaSDKTools-2.0.0-beta3"
I see some good pointers here:
http://www.sencha.com/learn/a-sencha-touch-mvc-application-with-phonegap/
As per a standard Sencha application architecture, download the SDK and then place (or symlink) it within the lib directory, named touch. We will be putting our own code in the app directory
IMPORTANT: When you are developing or experimenting, it's fine to simply place the whole SDK inside the lib folder like this. But when deploying, make sure that only the required JavaScript and CSS files remain in that folder, and remove the rest of the SDK. You do not want to compile and distribute the entire Sencha Touch SDK with your app.
First you add the SenchaSDK folder to you path,
export PATH=$PATH:/your/path/to/SenchaSDK
then you set the SENCHA_SDK_TOOLS_2_0_0_BETA3 environment variable,
export SENCHA_SDK_TOOLS_2_0_0_BETA3=/your/path/to/SenchaSDK
Now you go to your sencha library directory, like /your/path/to/sencha-touch-2.0.1.1, and you should be able to run the sencha command with no problem.