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 | |
| 252 | You can also run this combined script from the project directory, which should do all the needed renaming: |
| 268 | ====== What the rename script does ====== |
| 269 | Lets 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 | {{{ |
| 273 | mv PySideExample.pro BarApp.pro |
| 274 | }}} |
| 275 | |
| 276 | * replace the name inside the project file: |
| 277 | {{{ |
| 278 | sed -i "s/PySideExample/BarApp/g" BarApp.pro |
| 279 | }}} |
| 280 | |
| 281 | * replace all unique names in {{{main.h}}}: |
| 282 | {{{ |
| 283 | sed -i "s/org.modrana.PySideExample/foo.foomatic.BarApp/g" main.h |
| 284 | }}} |
| 285 | |
| 286 | * replace all unique names in the {{{QtActivity}}}: |
| 287 | {{{ |
| 288 | sed -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 | {{{ |
| 293 | sed -i "s/org.modrana.PySideExample/foo.foomatic.BarApp/g" android/AndroidManifest.xml |
| 294 | sed -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 | {{{ |
| 299 | sed -i "s/PySideExample/BarApp/g" android/res/values/strings.xml |
| 300 | sed -i "s/PySideExample/BarApp/g" android/build.xml |
| 301 | }}} |
| 302 | |