找回密码
 加入我们

QQ登录

只需一步,快速开始

搜索
查看: 3169|回复: 8

[webOS开发] 没有SDK,没问题,用Safari就可以试着开发webOS应用了

[复制链接]
发表于 2009-6-11 20:40 | 显示全部楼层 |阅读模式
http://forums.precentral.net/web ... ri-without-sdk.html/ n, J9 Z2 c* e0 U) o+ I* u
由于webos用的webkit的引擎,safari和google chrome也是webkit,所以这两个浏览器都可以运行示例程序。
: G" Z! I% M+ J3 i更新更方便的办法是把/usr目录拷到盘的根目录下,比如c:/usr 用chrome打开的时候,/usr/相关的目录会自动影射到盘的要目下。  n- _, p* E; z3 @$ M
这样就不需要改文件中的路径。7 _. C2 j( R, A9 }6 V
然后直接用chrome打开app里的index.html就可以了。! t/ D+ k* f+ l! ]. W4 _, X
比较完美的就是计算器。其它的程序,有些可以运行,但可以是由于涉及硬件方面的,多数运行不起来。# \+ I# Y. @3 X9 L0 r
06/12/2009, 04:45 PM           #11 (permalink)! l/ f9 X/ T% P7 T+ q4 f/ S- V9 Q: y
drnull; I1 N4 i) b% Y/ [3 l/ S
Member+ q3 D# S, v# y, S8 L9 ]

8 u7 l4 O$ h+ o( Y# e; W5 J( XJoin Date: May 2008
4 [4 G' I$ ~% y4 _' KPosts: 3( [0 L1 m3 ]* B+ L( `. @
Thanks: 0
- G* k- w" Q8 ?1 ^. }! x/ gThanked 0 Times in 0 Posts) ~4 H# U" Z7 z! B$ G

5 l9 t% b3 j( v9 H" B: j: Q/ UQuote:* r+ i2 y' M5 w+ }1 x; k  [
Originally Posted by johncc  8 U3 M& g7 c7 ~/ W% D
I also was able to run the Pre calculator extracted from the WebosDoctor package (figured that it would not access the hardware) by copying Predan's 'frameworks' folder under the 'com.palm.app.calculator' folder at the same level as the 'app' folder, and editing index.html to change the line
, n3 Z) T% J' H. C; Q5 b4 RNice guys, thanks for posting this. A quick note that you don't have to modify files if you extract the palm folder to c:\usr\palm. Chrome at least will properly look at "/usr/palm/frameworks" and change it to "c:\usr\palm\frameworks" for you automatically.

: U# i' o. T- ^1 u9 p9 D  A# b. `6 L+ ^: \! i' C3 S. P
最先的
: k9 {7 ~2 P4 F) M0 h
Develop Pre Apps in Safari Without SDK4 D- G) C, X0 v5 D( c% o
) o3 r8 E  L' z) ~6 c
predan 0 f  n# H6 W" q5 j8 ?  b8 q3 _
Hello,
0 y& D9 b5 r0 p! p7 i; j4 Z
! w# `1 H( D0 LI tweaked the mojo framework files found in the leaked root image to work in Safari. I can't seem to link anything since
% W" B9 V$ j0 e( B- M
3 y; f& m2 D7 N% I$ t: R/ pthis is my first post, but more info is at newcome.wordpress.com% g: U) W" |# H: A+ M
3 J4 {( N  o  w7 j! I  y
You can download the zip file that includes a demo project via a link in the blog post.% p. x+ E) O# g- x! W1 ?

( N+ k* P0 A! p. \: nLet me know what you think
9 t$ {6 Y" B, U4 p, i8 q! j6 I9 w- \) j1 E! _
Dan
; |" y- {+ \* B1 F- U0 M
[ 本帖最后由 felixw 于 2009-6-13 17:59 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入我们

×
回复

使用道具 举报

发表于 2009-6-12 17:17 | 显示全部楼层
呵呵 ……不懂啊……只能背后支持了
回复 支持 反对

使用道具 举报

发表于 2009-6-12 18:24 | 显示全部楼层
好..这下熟悉开发的朋友可以先试试了..
* [" W( O7 [2 ?# P4 R
. \& y) u: @% g0 M1 S对了,为了大家看得明白一些.改了一下楼主的贴子..谢谢分享
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-6-12 21:38 | 显示全部楼层
在chrome或者safari上运行计算器。昨天自己乱改,原来是能运行,但后来不知道怎么回事又不好用了。
) M4 K5 n3 T! r6 g: E% _, ?主要步骤,今天precentral一个人同样运行了计算器,证实好用。
  d$ ^9 Y1 J$ Z1,将修改后的mojo中的framework拷到caluculator文件夹中,和app文件夹并列,9 C+ u( c' ]5 ], p
2,修改index.html中:
( m2 h) ~7 [2 g8 C0 i<script src="/usr/palm/frameworks/mojo/mojo.js" x-mojo-version="1" type="text/javascript"></script>
  D& X) ~) T5 W5 H2 u" j改为
1 S1 ], I9 V( [# ?3 c' M<script src="frameworks/mojo/mojo.js" x-mojo-version="1" type="text/javascript"></script>8 e# {8 o$ \' @
* s: n% i9 O% ^' ?7 l
然后可以用浏览器打开index.html。
$ w0 L- n* `4 x2 e& I) {6 w
. m0 W' A: i! m2 p) _( J& u4 r* C
johncc
7 |$ H  Q9 ~9 S' J# SMember
" d7 S" [1 g, R6 e! M5 t9 d. j* D6 L0 c: E
3 ~6 c( y% E$ V3 z/ G: i2 W* @
; S6 x9 u6 v, e

- J/ s' d1 G' P) S& @Join Date: Oct 20052 ^& U5 o1 ?, M2 N( a+ M
Location: Adelaide, SA, Australia
1 x+ p4 S6 w9 g; b& a0 s% S' NPosts: 1,283' h$ N  A' O4 j9 u' i7 ^: j
Thanks: 59
6 `) B7 {0 T4 b- |7 h' ~Thanked 24 Times in 20 Posts+ v' Y! T6 u4 E& I

% P& q7 t; k6 x9 lGot it to run in Google Chrome without any problems. Thanks Predan.
) C& q& x% S: o7 F' O
# g6 `3 \" N6 N2 vI also was able to run the Pre calculator extracted from the WebosDoctor package (figured that it would not access the hardware) by copying Predan's 'frameworks' folder under the 'com.palm.app.calculator' folder at the same level as the 'app' folder, and editing index.html to change the line
8 Z" d0 X. q" h1 |( u/ M) g9 [
% O/ h4 t/ q4 d, ]+ B& t9 Q. e# b<script src="/usr/palm/frameworks/mojo/mojo.js" x-mojo-version="1" type="text/javascript"></script>
/ E" N$ q2 C1 y6 l& `4 G* C
% F5 a8 o' F: @9 I' d/ y& k& F; xto
8 N, Z/ t" A. i& T0 o6 c8 o
8 _) R, J+ s* ~) j, w<script src="frameworks/mojo/mojo.js" x-mojo-version="1" type="text/javascript"></script>
- d$ C% ^1 }# r. W/ P. ^, X* P1 u  m: A1 @) M
The calculator is fully functional, by the way.. v9 H: {% f' k" A& I0 e
) d# {3 [; V; C2 i
It would be obviously better to have the frameworks folder at a higher level (with a corresponding change to the above amendment), so that it served all programs.. C, j. z& i" C  S; M, g

# {$ H% u9 G8 k3 X3 ^) E& YI have attached an image showing the Pre running in Google Chrome on my monitor.
# S; ]! S4 F* E( ]% A9 j+ D
[ 本帖最后由 felixw 于 2009-6-12 21:39 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入我们

×

评分

参与人数 1威望 +10 收起 理由
2b6c3d729918489 + 10 祝贺第一个

查看全部评分

回复 支持 反对

使用道具 举报

发表于 2009-6-22 09:38 | 显示全部楼层
激动。。刚看了下,感觉跟用ADOBE AIR开发差不多。。现在完全可以开发一些简单的东西了。。# I; H* A" W) V" b! z1 o8 Z
WEB OS有很大的开发空间啊!!!!!!!!!!!+ C- u" P; P$ g
这完全可以把WEB OS的界面改成他妈都不认识。。。
1 {7 F) n7 H9 C" ~& V5 X4 ^ 有个想法泥。。咱可以做个简单的小程序。。在手机可以上网的情况下,时时显示TREO8的最新信息。。。
回复 支持 反对

使用道具 举报

发表于 2009-6-22 15:59 | 显示全部楼层
好啊,
6 N# y1 F0 n+ g! |# j. w2 M. V: o顶楼主,
9 K/ O( t4 X4 T我学习来了,+ M+ L& {6 q) p4 a$ i+ j, X7 S+ X
不过没mojo,
! o; C; d6 b' L2 Z3 z) l1 D很多架构提供的界面的控件什么的没法用了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-6-22 17:55 | 显示全部楼层
原帖由 CyberVsQ 于 2009-6-22 15:59 发表 9 G  C5 W3 k3 P9 J! K3 a. X4 [* K
好啊,9 \' E( B" I& I! n' m7 c
顶楼主,
7 a1 r5 E, Y  ^8 R8 ~$ z我学习来了,0 v2 ]0 q. R6 Q( }3 s3 g3 d$ x, c
不过没mojo,* X& T9 L1 q9 Z
很多架构提供的界面的控件什么的没法用了

" G7 F! P7 z0 V$ X  k% x0 r等mojo的sdk发布吧。这个也就是提前看看程序的运行方式,等sdk发布了,应该有模拟器,
8 k& v$ U$ p! D4 S到时候就好了。: m0 V( o6 l/ x" f8 y: B$ {
总的来说,开发难度估计应该比以前的palm降低不少了。
回复 支持 反对

使用道具 举报

发表于 2009-8-20 13:31 | 显示全部楼层
还是不明白要怎么做kwg
回复 支持 反对

使用道具 举报

发表于 2009-9-6 17:58 | 显示全部楼层
真的吗?
# [# r5 X- h% }  `) F  N那更好了。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

QQ|Archiver|手机版|小黑屋|吹友吧 ( 京ICP备05078561号 )

GMT+8, 2024-6-7 07:32 , Processed in 0.335855 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表