Step by step Compiling Instructions for Evothings Studio

Ask, and ye shall receive.
sanyaade
Posts: 18
Joined: 14:28, 08 Apr 2014

Re: Step by step Compiling Instructions for Evothings Studio

Postby sanyaade » 04:37, 07 Aug 2014

Fredrik wrote:I've never seen this error before, and I can't reproduce it either.

Sorry, but I don't think I can be of any help here.


Many thanks Fredrik for giving it a try. I switch to Ubuntu in one of my Laptops to see how far I can get it to work.
I setup everythig and path, get cordova tested, built Apps with cordova-cli and deploy them into my tablets. Everything seems to be working apart from cordova from a call from evothings not finding the android path. I got the errors below:

git ls-remote https://github.com/don/BluetoothSerial.git HEAD
cordova build android
Running command: /home/sanyaade/evothings/EvoThingsClient/platforms/android/cordova/build
[Error: An error occurred while listing Android targets]
Error: /home/sanyaade/evothings/EvoThingsClient/platforms/android/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
/home/sanyaade/evothings/EvoThingsClient/utils.rb:11:in `sh': Command failed (RuntimeError)
from workfile.rb:381:in `build'
from workfile.rb:389:in `<main>'
buildHyper.rb:279:in `sh': undefined method `error' for main:Object (NoMethodError)
from buildPlugin.rb:136:in `buildEvoThingsClient'
from buildPlugin.rb:130:in `buildPreProcess'
from buildHyper.rb:219:in `buildDist'
from buildHyper.rb:325:in `<top (required)>'
from build.rb:11:in `load'
from build.rb:11:in `<main>'
sanyaade@sanyaade-Satellite-Pro-L300:~/evothings/EvoThingsStudio$



From the above the line
Running command: /home/sanyaade/evothings/EvoThingsClient/platforms/android/cordova/build
[Error: An error occurred while listing Android targets]
Error: /home/sanyaade/evothings/EvoThingsClient/platforms/android/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)

shows that cordova is not finding the Android tools and the platform-tools fold when call from inside EvothingsClient. I have export the those folders path in ~/.bashrc. I could run cordova-cli from command line, so also the android, andriod avd all from command line. SDK API 19, 18, 17, 16 were installed. I even create avd emulator just to cover many areas but cordova seems to stop at those point during the build process.

Do I need to put the Android libraries in a particular folder? I went through the workfile.rub, cordova build but I could not find anything.
Has anybody encounter this same error? If I want to buy the evothings workbench alone, which configuration do I need to disable the client from?

Many thanks to you, Mikael and everybody.

Hear from you soon!

God blesses!!!

Best regards,
Sanyaade

Fredrik
Site Admin
Posts: 196
Joined: 15:00, 18 Nov 2013

Re: Step by step Compiling Instructions for Evothings Studio

Postby Fredrik » 12:43, 07 Aug 2014

"An error occurred while listing Android targets"

Another unheard-of message from cordova. It seems something on your computer is broken.

You can try running "git clean -fdx" in the EvothingsClient directory. It might help.

User avatar
micke
Posts: 256
Joined: 20:49, 18 Nov 2013

Re: Step by step Compiling Instructions for Evothings Studio

Postby micke » 12:51, 08 Aug 2014

Hi Sanyaade,

1. Regarding the failed build:

Code: Select all

c:/COMPILERS/Ruby200/lib/ruby/2.0.0/fileutils.rb:1375:in `initialize': Invalid argument - ../EvothingsStudio_0.7.3/source/do
cumentation/.git/objects/pack/pack-db7ee7faac969bc972d87a07be294177fcb00b2e.idx (Errno::EINVAL)


What I can see is that "BUILD SUCCESSFUL" is the message from the build of the Android app for EvothingsClient.

Then I am not sure at which step the build fails. "Copying Hyper to dist dir" states that the actual build of EvothingsWorkbench started.

This line in the Ruby stack trace says that the error is when copying files to the build output directory:

Code: Select all

from buildHyper.rb:62:in `buildCopyHyperToDistDir'


Do you have write access to the output destination? You can look into buildHyper.rb in the HyperReload repo and see what happens. Perhaps put some log messages there if needed. But put them in the version in the HyperReload folder, not in EvoThingsStudio folder, because that gets overwritten when you run build.rb.

Looked into buildHyper.rb now, and it is the copy of the documentation as you say that fails:

Code: Select all

   FileUtils.copy_entry(
      pathSourceDoc,
      pathDistSource + "documentation/")


But the previous copy or the "hyper" directory appeared to have worked. What happens if you comment out the copy of the documentation directory, just as a test?

2. Regarding the failed add of plugin https://github.com/don/BluetoothSerial.git:

Could "could not create work tree dir" indicate some kind of issue with file access/rights? Did it work to add other plugins? What happens if you just as a test try to add the plugin manually in the Cordova project (in EvoThingsClient)?

The previous log showed that the build of the Android app worked, but was that on Windows 7 64 bit, and it is on Windows 7 32 bit this problem happens? Perhaps you can get more help from the Cordova people or from Don Coleman?

Very best, Mikael

User avatar
micke
Posts: 256
Joined: 20:49, 18 Nov 2013

Re: Step by step Compiling Instructions for Evothings Studio

Postby micke » 12:53, 08 Aug 2014

Sanyaade, just want to say we are preparing a new release of Evothings Studio (0.8.0), you should update all repos to the latest versions as we have fixed several issues recently. I don't think your build issues are related though.
Best regards, Mikael

sanyaade
Posts: 18
Joined: 14:28, 08 Apr 2014

Re: Step by step Compiling Instructions for Evothings Studio

Postby sanyaade » 17:35, 09 Aug 2014

@Mikael

Many thanks for your support.

Its on Windows 7 32bit the I was having those problem. I have administrator right. The software built successfully, create the required folders needed for distribution. It was when it starts to copy files from various folders into the final package folder that the error occured.

I moved after that into Linux and while working on Ubuntu 14.04, 32bit, I had another problem which was coming from cordova not being able to list android targets --> [error occur listing android targets]. Cordova-cli worked fine outside the Evothings. I could build Apps and deploy to both emulator and devices, I could run the android sdk manager from terminal since the path is set in ~/.bashrc, I could echo $PATH to see that the path is correctly set but cordova is called from the EvoThingsClient then cordova could not find the andriod sdk folder which is a suprise to me.

1.) The question is, is the cordova when called from inside the EvoThingsClient expect Android SDK to be in a particular folder [hard coded path]?
2.) Can I disable the Evothings client build instruction and just build the Evothings Workbench alone? [I think this is the called to the workfile.rb].
3.) Does EvothingsClient uses a particular version of cordova e.g. cordova v2.8.5 that I may need to install?

I am still thinkering with the Ubuntu platform to see how far I can push it.

Many thanks to you and Fredrik for the gorgeous support

God blesses!!!

Best regards,
Sanyaade

sanyaade
Posts: 18
Joined: 14:28, 08 Apr 2014

Re: Step by step Compiling Instructions for Evothings Studio

Postby sanyaade » 12:06, 10 Aug 2014

Latest Problems:
Hello Mikael and Fredrik

Below is the latest addition to the problems coming up on the Ubuntu box. I am workig on a 64bit Ubuntu O/S.
Building binary packages
Building Linux64
/usr/lib/ruby/1.9.1/fileutils.rb:1365:in `copy': unknown file type: ../node-webkit-bin-0.8.4/node-webkit-v0.8.4-linux-x64/nw (RuntimeError)
from /usr/lib/ruby/1.9.1/fileutils.rb:465:in `block in copy_entry'
from /usr/lib/ruby/1.9.1/fileutils.rb:1433:in `preorder_traverse'
from /usr/lib/ruby/1.9.1/fileutils.rb:462:in `copy_entry'
from buildHyper.rb:125:in `buildDistBinaryLinux'
from buildHyper.rb:113:in `buildDistBinaryLinux64'
from buildHyper.rb:90:in `buildDistBinaries'
from buildHyper.rb:233:in `buildDist'
from buildHyper.rb:337:in `<top (required)>'
from build.rb:11:in `load'
from build.rb:11:in `<main>'
sanyaade@showcase:~/evothings/EvoThingsStudio$


I am getting unknown file tyep error during the copy operation being performed by Ruby interpreter. Do i need to supply a format? I mean node-webkit --> nw is packed binary but ruby did not know how to handle this. I am trying to buy a second hand Apple Mac Pro on eBay as all the G5 that I have at home will go up to >10.6 since they are PPC and cordova as I have read need Mac OSX >=10.6 which is another dilema at hand.

I am currently stucked with the above error untill I can get rid of it as it occuring on both Windows and Linux boxes.

Hear from you Guys soon!

God blesses!!!

Best regards,
Sanyaade

Fredrik
Site Admin
Posts: 196
Joined: 15:00, 18 Nov 2013

Re: Step by step Compiling Instructions for Evothings Studio

Postby Fredrik » 12:18, 11 Aug 2014

As I recall, this error occurs when the file "../node-webkit-bin-0.8.4/node-webkit-v0.8.4-linux-x64/nw" does not exist, relative to the current working directory. Your tree should look like this:

Code: Select all

<root directory>
\-\
   EvoThingsStudio/
   |
   <other evothings repos>
   |
   node-webkin-bin-0.8.4/
   \-\
      node-webkit-v0.8.4-linux-x64/

sanyaade
Posts: 18
Joined: 14:28, 08 Apr 2014

Re: Step by step Compiling Instructions for Evothings Studio

Postby sanyaade » 17:36, 15 Aug 2014

@Fredrik

Yes you are right and the tree layout of my folders follow the exactly the one shown in your reply.

The error message is that of "unknown file type" , I think the file is found but may be ruby does not know how to handle it or what is file
format. It could be a problem of 64bit or that Ruby copy and dispatcher functions do not known how to handle node-webkit .pak and other formats. I Google
on all the errors to see what other people experience are on those problems that I am facing with Ruby and Cordova.

I was thinking may be I should try older branch version of EvoThings if it will compile and then move up the ladder gradually.
There are only few binaries files that exist in EvoThings so third party packages seem not working for me.
I have got a Mac OSX 10.74 on VirtualBox so I need to give that also a try.

Hear from you soon.

Many thanks!

God blesses!!!

Best regards,
Sanyaade

User avatar
micke
Posts: 256
Joined: 20:49, 18 Nov 2013

Re: Step by step Compiling Instructions for Evothings Studio

Postby micke » 09:46, 18 Aug 2014

Thank you for your efforts in making the build work!

Some items that may help:

I fixed a bug in the HyperReload repo, in file buildHyper.rb (replaced "error" which did not work with "raise" for error handling, and better printing of the command line).

I recommend using the latest version of all the code and build scripts.

There is now a guide for how to build apps using Cordova, perhaps this will be of some help. There is info on how to set up Cordova and the Android SDK, setting up paths etc, on Windows, Linux, and OS X:
http://evomedia.evothings.com/doc/apps- ... rview.html

Unfortunately there is no guide yet for building Evothings Studio.

If you have problems with building the Evothings Client app, you can comment out the call to buildEvoThingsClient from buildPlugin.rb, just to verify that the Evothings Workbench builds, like this:

# buildEvoThingsClient

You can also try to build Evothings Client separately, by running workfile.rb in the EvoThingsClient repo. To clean the old build and build an Android app, use this command:

ruby workfile.rb c android

You could try to do a fresh clone from GitHub of EvoThingsClient, to make sure you have the a clean copy of the latest version of the code.

Very best regards, Mikael

sanyaade
Posts: 18
Joined: 14:28, 08 Apr 2014

Re: Step by step Compiling Instructions for Evothings Studio

Postby sanyaade » 12:00, 19 Aug 2014

@Mikael,

Many thanks for the feedback, pointers and directions.
I will follow the points highlighted in you reply and update you soon!

Speak ton you soon!
God blesses!!!

Best regards,
Sanyaade


Return to “Questions and answers”

Who is online

Users browsing this forum: No registered users and 40 guests