close
Warning:
AdminModule failed with TracError: Unable to instantiate component <class 'trac.ticket.admin.ComponentAdminPanel'> (super(type, obj): obj must be an instance or subtype of type)
- Timestamp:
-
Feb 17, 2013, 10:26:25 PM (13 years ago)
- Author:
-
Martin Kolman
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v27
|
v28
|
|
248 | 248 | * 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 |
249 | 249 | |
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: |
287 | 253 | {{{ |
288 | 254 | NEW_NAME="BarApp" |
… |
… |
|
300 | 266 | Just change {{{NEW_NAME}}} and {{{NEW_UNIQUE_NAME}}} to values matching you application and you are set. :) |
301 | 267 | |
| 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 | |
302 | 303 | '''NOTE:''' Some of these names can be changed from the Necessitas Qt Creator GUI or of course also by using an editor. |
303 | 304 | |
… |
… |
|
307 | 308 | find . -type f -print0 | xargs -0 file | grep -P text | cut -d: -f1 | xargs grep "PySideExample" |
308 | 309 | }}} |
309 | | |
310 | 310 | |
311 | 311 | ===== Replacing the application ===== |