top  Index  Search  Changes  RSS  Login

howm wiki - PhonegapWithoutEclipse Diff

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

Eclipse なしでコマンドラインから PhoneGap を使うには?

…手元ではとりあえずこれで動いた

MYPROJ=hello
mkdir "$MYPROJ"
cd "$MYPROJ"

mkdir -p assets/www libs res
cp ../phonegap/phonegap-1.2.0.js assets/www
cp ../phonegap/phonegap-1.2.0.jar libs
cp -r ../phonegap/xml res
cp ../phonegap/Sample/AndroidManifest.xml .
cp -r ../phonegap/Sample/res/{drawable,values} res
cp -r ../phonegap/Sample/src .

MYDOM="jp.sourceforge.howm"
MYDIR="jp/sourceforge/howm"
sed -i "s/PhoneGapExample/$MYPROJ/g" res/values/strings.xml
sed -i "s/com[.]phonegap[.]example/$MYDOM.$MYPROJ/g" **/*(^/)
pushd .
cd src
mkdir -p "$MYDIR"
mv com/phonegap/example $MYDIR/$MYPROJ
rmdir -p com/phonegap
popd

vi assets/www/index.html

assets/www/index.html の内容:
<!DOCTYPE HTML>
<html>
  <head>
   <title>PhoneGap</title>
   <script type="text/javascript" charset="utf-8" src="phonegap-1.2.0.js"></script>
  </head>
  <body>
   <h1>Hello World</h1>
  </body>
</html>

----
{{comment}}
----