rhomobile / rhoelements-issues

Issues area for RhoElements
0 stars 0 forks source link

B49 - Building for Windows Mobile #28

Closed pascalw closed 11 years ago

pascalw commented 11 years ago

Is there any up-to-date documentation on how to build for Windows Mobile 6.5?

I've followed the documentation here: http://edgedocs.rhomobile.com/rhodes/build#build-for-windows-mobile (which seems to be exactly the same as the docs for Rho 2.2, so might be outdated), however my Windows Mobile build is failing.

I'm using the exact same config as for building Rho 2.2, which builds without any issues.

This is the relevant section of my rhobuild.yml:


---
env:
  paths:
    java: C:/Program Files/Java/jdk1.6.0_11/bin
    android: C:/android-sdk-windows
    android-ndk: C:/android-ndk-r4b
    cabwiz: C:/Program Files/Windows Mobile 6 SDK/Tools/CabWiz
    msbuild: C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe
    vcbuild: C:/Program Files/Microsoft Visual Studio 9.0/VC/vcpackages/vcbuild.exe

The build is failing with the following errors:

..\..\shared\LogImpl.cpp(1) : fatal error C1083: Cannot open include file: 'generated/cpp/LogBase.h': No such file or directory
WebViewBase.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\cpp\WebViewBase.cpp': No such file or directory
WebView_ruby_wrap.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\cpp\WebView_ruby_wrap.cpp': No such file or directory
WebView_js_wrap.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\cpp\WebView_js_wrap.cpp': No such file or directory
webview_js_api.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\webview_js_api.cpp': No such file or directory
webview_api_init.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\webview_api_init.cpp': No such file or directory
WebViewImpl.cpp
.\src\WebViewImpl.cpp(1) : fatal error C1083: Cannot open include file: '../../../shared/generated/cpp/WebViewBase.h': No such file or directory
SQLite3Base.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\cpp\SQLite3Base.cpp': No such file or directory
SQLite3_ruby_wrap.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\cpp\SQLite3_ruby_wrap.cpp': No such file or directory
SQLite3_js_wrap.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\cpp\SQLite3_js_wrap.cpp': No such file or directory
sqlite3_js_api.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\sqlite3_js_api.cpp': No such file or directory
sqlite3_api_init.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\sqlite3_api_init.cpp': No such file or directory
SQLite3Impl.cpp
..\..\shared\SQLite3Impl.cpp(1) : fatal error C1083: Cannot open include file: 'generated/cpp/SQLite3Base.h': No such file or directory
NetworkBase.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\cpp\NetworkBase.cpp': No such file or directory
Network_ruby_wrap.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\cpp\Network_ruby_wrap.cpp': No such file or directory
Network_js_wrap.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\cpp\Network_js_wrap.cpp': No such file or directory
network_js_api.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\network_js_api.cpp': No such file or directory
network_api_init.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\network_api_init.cpp': No such file or directory
NetworkImpl.cpp
..\..\shared\NetworkImpl.cpp(15) : fatal error C1083: Cannot open include file: 'generated/cpp/NetworkBase.h': No such file or directory
Generating Code...
Compiling...
ProcessBase.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\cpp\ProcessBase.cpp': No such file or directory
Process_ruby_wrap.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\cpp\Process_ruby_wrap.cpp': No such file or directory
Process_js_wrap.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\cpp\Process_js_wrap.cpp': No such file or directory
process_js_api.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\process_js_api.cpp': No such file or directory
process_api_init.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\process_api_init.cpp': No such file or directory
SystemBase.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\cpp\SystemBase.cpp': No such file or directory
System_ruby_wrap.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\cpp\System_ruby_wrap.cpp': No such file or directory
System_js_wrap.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\cpp\System_js_wrap.cpp': No such file or directory
system_js_api.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\system_js_api.cpp': No such file or directory
system_api_init.cpp
c1xx : fatal error C1083: Cannot open source file: '..\..\shared\generated\system_api_init.cpp': No such file or directory
SystemImplBase.cpp
c:\users\user\.pik\rubies\ruby-193-p429\lib\ruby\gems\1.9.1\gems\rhodes-4.0.0.beta.49\lib\commonapi\coreapi\ext\shared\SystemImplBase.h(1) : fatal error C1083: Cannot open include file: 'generated/cpp/SystemBase.h': No such file or directory
SystemImpl.cpp
c:\users\user\.pik\rubies\ruby-193-p429\lib\ruby\gems\1.9.1\gems\rhodes-4.0.0.beta.49\lib\commonapi\coreapi\ext\platform\wm\src\../../../shared/SystemImplBase.h(1) : fatal error C1083: Cannot open include file: 'generated/cpp/SystemBase.h': No such file or directory
Generating Code...
Build log was saved at "file://C:\Users\user\.pik\rubies\Ruby-193-p429\lib\ruby\gems\1.9.1\gems\rhodes-4.0.0.beta.49\platform\wm\bin\Windows Mobile 6 Professional SDK (ARMV4I)\extensions\coreapi\Release\BuildLog.htm"
Coreapi - 72 error(s), 0 warning(s)
rake aborted!
["C:/Program Files/Microsoft Visual Studio 9.0/VC/vcpackages/vcbuild.exe" /M4 "CoreAPI.vcproj" "Release|Windows Mobile 6 Professional SDK (ARMV4I)"]
rognar commented 11 years ago

Hi. Pls attach full rake console log.

pascalw commented 11 years ago

@rognar please find the rake output in your email.

genywind commented 11 years ago

how did you build it ? Using rake command ?

pascalw commented 11 years ago

@genywind yes. I was trying to install the application on a connected device using rake run:wm:device.

abhineetagarwal commented 11 years ago

If running the project through visual studio then this issue might be coming because the associated *.xml files which will generate their respective files was not executed.

In command prompt, please change the directory to the local path where “\rhodes\lib\commonAPI\coreapi\ext” is present.

Then run the below command for running all associated xml files for which the error has been logged:-

rhogen api XML_NAME.xml

XML_NAME will be “webview.xml”, “sqlite3.xml”, “Network.xml” etc.

Next step is to build the project and it should work properly.

If it doesn’t work then probably the "UserMacro" content of “Coreapi.vsprops” file under “wm” folder need to be edited in the below manner.

<UserMacro Name="RHO_ROOT" Value="..............\rhodes" /> <UserMacro Name="TEMP_FILES_DIR" Value="$(RHO_ROOT)\platform\wm\bin\$(PlatformName)\extensions\$(ProjectName)" />

Building again will resolve the issue.

The settings for path under rhobuild.yml are mentioned below:-

paths: java: "C:/Program Files/Java/jdk1.7.0_25/bin" android: "C:/android/android-sdk" android-ndk: "C:/android/android-ndk-r8e" cabwiz: "C:/Program Files (x86)/Windows Mobile 6 SDK/Tools/CabWiz" msbuild: "C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe" vcbuild: "C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/vcpackages/vcbuild.exe"

Please let me know, if still the issue exists.

pascalw commented 11 years ago

@abhineetagarwal thanks for your response.

I'm not building from visual studio. Is this a bug or is it supposed to work like this? I've never had to do this on RhoMobile 2.2.

abhineetagarwal commented 11 years ago

No this is not a bug. There must be setting issue. I mean the path has not set properly under "rhobuild.yml" or "build.yml".

Please pull the code again and do the necessary settings and i believe it should work. The above errors comes when their assciated *.xml files are not executed using the rhogen api command.

I believe you are running from command prompt. If yes, then are you using manual or auto common spec? Please check the path settings under "rhobuild.yml" present under "rhodes" folder and "build.yml" present under auto or manual common spec folder.

If you are running from RMS IDE, then the path for rhobuild.yml is present in the below path:- "\MotorolaRhoMobileSuite4.0.0.beta.49\ruby\lib\ruby\gems\1.9.1\gems\rhodes-4.0.0.beta.49"

I am attaching the screenshot of rhobuild.yml & build.yml.

rhobuild yml build yml

abhineetagarwal commented 11 years ago

If all the setting is proper and want to build the local "rhodes" then uncomment the sdk part from build.yml as mentioned in the below screenshot.

build yml

pfmaggi commented 11 years ago

Pascal, try to add a "RHO_ROOT" environment path to the rhodes gem. I need to add this have it working: https://developer.motorolasolutions.com/thread/3310

~Pietro

abhineetagarwal commented 11 years ago

After setting the above configuration, first call the below command.

rake clean:wm rake run:wm:device

genywind commented 11 years ago

Guys, never advice to set RHO_ROOT. This is deprecated feature and will be removed

Do not set sdk in build.yml. If you use rhodes gem, latest gem will be found automatically try to remove bin folder in application folder and try again

pascalw commented 11 years ago

@genywind @pfmaggi I just tried this and that did allow me to build.

I've removed it now and it's still building, but I suspect that what @abhineetagarwal said is indeed true. Rhogen was not ran for those xml files, but because I set the RHO_ROOT manually that did allow to run. So there's probably still an issue here on clean systems which haven't build yet.

genywind commented 11 years ago

When you install new RMS, it usually require to run clean command inside your application before build do not use RHO_ROOT or sdk, you can easily forget about them and will be use some outdated foldes

pascalw commented 11 years ago

@genywind ok, got it. It's probably a good idea to add this to the docs though.