Changes between Version 27 and Version 28 of PySideForAndroid


Ignore:
Timestamp:
Feb 17, 2013, 10:26:25 PM (11 years ago)
Author:
Martin Kolman
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PySideForAndroid

    v27 v28  
    248248 * the path to the installation folder is used when setting important environmental variables, so make sure to change all the corresponding paths when changing the unique name
    249249
    250 
    251 ====== What to rename and where ======
    252 Lets say we want to rename the example project from {{{PySideExample}}} to {{{BarApp}}} and from {{{org.modrana.PySideExample}}} to {{{foo.foomatic.BarApp}}}
    253 
    254 * rename the project file:
    255 {{{
    256 mv PySideExample.pro BarApp.pro
    257 }}}
    258 
    259 * replace the name inside the project file:
    260 {{{
    261 sed -i "s/PySideExample/BarApp/g" BarApp.pro
    262 }}}
    263 
    264 * replace all unique names in {{{main.h}}}:
    265 {{{
    266 sed -i "s/org.modrana.PySideExample/foo.foomatic.BarApp/g" main.h
    267 }}}
    268 
    269 * replace all unique names in the {{{QtActivity}}}:
    270 {{{
    271 sed -i "s/org.modrana.PySideExample/foo.foomatic.BarApp/g" android/src/org/kde/necessitas/origo/QtActivity.java
    272 }}}
    273 
    274 * replace all names in the Android manifest file:
    275 {{{
    276 sed -i "s/org.modrana.PySideExample/foo.foomatic.BarApp/g" android/AndroidManifest.xml
    277 sed -i "s/PySideExample/BarApp/g" android/AndroidManifest.xml
    278 }}}
    279 
    280 * and the last is in the {{{android/res/strings.xml}}} and {{{android/build.xml}}} file:
    281 {{{
    282 sed -i "s/PySideExample/BarApp/g" android/res/values/strings.xml
    283 sed -i "s/PySideExample/BarApp/g" android/build.xml
    284 }}}
    285 
    286 You can also run this combined script from the project directory, which does all the operations described above:
     250====== Project rename script ======
     251
     252You can also run this combined script from the project directory, which should do all the needed renaming:
    287253{{{
    288254NEW_NAME="BarApp"
     
    300266Just change {{{NEW_NAME}}} and {{{NEW_UNIQUE_NAME}}} to values matching you application and you are set. :)
    301267
     268====== What the rename script does ======
     269Lets say we want to rename the example project from {{{PySideExample}}} to {{{BarApp}}} and from {{{org.modrana.PySideExample}}} to {{{foo.foomatic.BarApp}}}
     270
     271* rename the project file:
     272{{{
     273mv PySideExample.pro BarApp.pro
     274}}}
     275
     276* replace the name inside the project file:
     277{{{
     278sed -i "s/PySideExample/BarApp/g" BarApp.pro
     279}}}
     280
     281* replace all unique names in {{{main.h}}}:
     282{{{
     283sed -i "s/org.modrana.PySideExample/foo.foomatic.BarApp/g" main.h
     284}}}
     285
     286* replace all unique names in the {{{QtActivity}}}:
     287{{{
     288sed -i "s/org.modrana.PySideExample/foo.foomatic.BarApp/g" android/src/org/kde/necessitas/origo/QtActivity.java
     289}}}
     290
     291* replace all names in the Android manifest file:
     292{{{
     293sed -i "s/org.modrana.PySideExample/foo.foomatic.BarApp/g" android/AndroidManifest.xml
     294sed -i "s/PySideExample/BarApp/g" android/AndroidManifest.xml
     295}}}
     296
     297* and the last is in the {{{android/res/strings.xml}}} and {{{android/build.xml}}} file:
     298{{{
     299sed -i "s/PySideExample/BarApp/g" android/res/values/strings.xml
     300sed -i "s/PySideExample/BarApp/g" android/build.xml
     301}}}
     302
    302303'''NOTE:''' Some of these names can be changed from the Necessitas Qt Creator GUI or of course also by using an editor.
    303304
     
    307308find . -type f -print0 | xargs -0 file | grep -P text | cut -d: -f1 | xargs grep "PySideExample"
    308309}}}
    309 
    310310
    311311===== Replacing the application =====