# HG changeset patch # User teknolog # Date 1273610117 -3600 # Node ID a9d05a49b7cdb21c8c9acc0d84492d480c84e5b2 # Parent 6d6eecde68e8834183ace52c99d2ea82d1da4465 Added build number generator diff -r 6d6eecde68e8 -r a9d05a49b7cd application/data/PodcastClient_common.rls --- a/application/data/PodcastClient_common.rls Wed May 05 11:07:27 2010 +0100 +++ b/application/data/PodcastClient_common.rls Tue May 11 21:35:17 2010 +0100 @@ -23,4 +23,4 @@ rls_string STRING_r_caption "Podcatcher" rls_string STRING_r_short_caption "Podcatcher" -rls_string STRING_r_about_text_s60 "Podcatcher 1.00\n© 2007-2010 Sebastian Brannstrom, Lars Persson, Anders Fridlund, EmbedDev AB" +rls_string STRING_r_about_text_s60 "Podcatcher 1.00(%d)\n© 2007-2010 Sebastian Brannstrom, Lars Persson, Anders Fridlund, EmbedDev AB" diff -r 6d6eecde68e8 -r a9d05a49b7cd application/data/PodcastStrings.ra --- a/application/data/PodcastStrings.ra Wed May 05 11:07:27 2010 +0100 +++ b/application/data/PodcastStrings.ra Tue May 11 21:35:17 2010 +0100 @@ -75,3 +75,5 @@ RESOURCE TBUF r_reset_db_query {buf = STRING_r_podcast_setting_reset_db_query;} RESOURCE TBUF r_error_disk_full {buf = STRING_r_error_disk_full; } +RESOURCE TBUF r_about_text {buf = STRING_r_about_text_s60;} + diff -r 6d6eecde68e8 -r a9d05a49b7cd application/inc/buildno.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/application/inc/buildno.h Tue May 11 21:35:17 2010 +0100 @@ -0,0 +1,2 @@ +// Build number generated by increment_buildno.py, do not edit manually +#define BUILD_NO 21 \ No newline at end of file diff -r 6d6eecde68e8 -r a9d05a49b7cd application/sis/buildno.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/application/sis/buildno.txt Tue May 11 21:35:17 2010 +0100 @@ -0,0 +1,1 @@ +21 \ No newline at end of file diff -r 6d6eecde68e8 -r a9d05a49b7cd application/sis/increment_buildno.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/application/sis/increment_buildno.py Tue May 11 21:35:17 2010 +0100 @@ -0,0 +1,54 @@ +import os; + +BUILDNO_FILE = 'buildno.txt' + +PKG_FILE_UDEB_TEMPLATE = 'podcatcher_udeb_template.pkg' +PKG_FILE_UDEB = 'podcatcher_udeb.pkg' +PKG_FILE_UREL_TEMPLATE = 'podcatcher_urel_template.pkg' +PKG_FILE_UREL = 'podcatcher_urel.pkg' +HEADER_FILE = '..\\inc\\buildno.h' +BUILDNO_TAG = 'BUILDNO' + +def update_buildno(buildno_file): + #read previous build number + f = open(buildno_file, 'r') + buildno = int(f.read()) + f.close() + + # increment build number and write it back to the file + buildno = buildno + 1 + buildno_str = '%d' % buildno + + print 'New build number is %d' % buildno + + f = open(buildno_file, 'w') + f.write(buildno_str) + f.close() + return buildno + +def update_pkg(pkg_template, pkg_file, buildno): + print 'Writing %s' % pkg_file + #update 'build' number in PKG file + f = open (pkg_template, 'r') + g = open (pkg_file, 'w') + + buildno_str = '%d' % buildno + + for line in f: + line = line.replace(BUILDNO_TAG, buildno_str) + g.write(line) + +def update_header(header_file, buildno): + print 'Writing %s' % header_file + buildno_str = '// Build number generated by increment_buildno.py, do not edit manually\r\n#define BUILD_NO %d' % buildno + + f = open(header_file, 'w') + f.write(buildno_str) + f.close() + return buildno + +new_buildno = update_buildno(BUILDNO_FILE) +update_pkg(PKG_FILE_UDEB_TEMPLATE, PKG_FILE_UDEB, new_buildno) +update_pkg(PKG_FILE_UREL_TEMPLATE, PKG_FILE_UREL, new_buildno) +update_header(HEADER_FILE, new_buildno) +print 'Remember to rebuild to get the build number into the about dialog!' \ No newline at end of file diff -r 6d6eecde68e8 -r a9d05a49b7cd application/sis/make_release.py --- a/application/sis/make_release.py Wed May 05 11:07:27 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -import os; - -#del *.sis - delete all sis files python style -os.system('del *.sis'); - -#update 'build' number in PKG file -os.system('hg log -l 1 > temp.txt'); - -os.system('makesis -d%EPOCROOT% podcatcher_udeb.pkg'); -os.system('signsis podcatcher_udeb.sis podcatcher_udeb_signed.sis podcast.cer podcast.key'); - -#update 'build' number in PKG file -os.system('makesis -d%EPOCROOT% podcatcher_urel.pkg'); -os.system('signsis podcatcher_urel.sis podcatcher_urel_signed.sis podcast.cer podcast.key'); \ No newline at end of file diff -r 6d6eecde68e8 -r a9d05a49b7cd application/sis/podcatcher_udeb.pkg --- a/application/sis/podcatcher_udeb.pkg Wed May 05 11:07:27 2010 +0100 +++ b/application/sis/podcatcher_udeb.pkg Tue May 11 21:35:17 2010 +0100 @@ -1,7 +1,7 @@ &EN :"Symbian Foundation" %{"Podcatcher"} -#{"Podcatcher"},(0xA0009D00), 1, 00, 0, TYPE=SA +#{"Podcatcher"},(0xA0009D00), 1, 00, 21, TYPE=SA ;Supports S60 3rd edition [0x101F7961], 0, 0, 0, {"Series60ProductID"} diff -r 6d6eecde68e8 -r a9d05a49b7cd application/sis/podcatcher_udeb.sis Binary file application/sis/podcatcher_udeb.sis has changed diff -r 6d6eecde68e8 -r a9d05a49b7cd application/sis/podcatcher_udeb_signed.sis Binary file application/sis/podcatcher_udeb_signed.sis has changed diff -r 6d6eecde68e8 -r a9d05a49b7cd application/sis/podcatcher_urel.pkg --- a/application/sis/podcatcher_urel.pkg Wed May 05 11:07:27 2010 +0100 +++ b/application/sis/podcatcher_urel.pkg Tue May 11 21:35:17 2010 +0100 @@ -1,7 +1,7 @@ &EN :"Symbian Foundation" %{"Podcatcher"} -#{"Podcatcher"},(0xA0009D00), 1, 00, 0, TYPE=SA +#{"Podcatcher"},(0xA0009D00), 1, 00, 21, TYPE=SA ;Supports S60 3rd edition [0x101F7961], 0, 0, 0, {"Series60ProductID"} diff -r 6d6eecde68e8 -r a9d05a49b7cd application/src/PodcastListView.cpp --- a/application/src/PodcastListView.cpp Wed May 05 11:07:27 2010 +0100 +++ b/application/src/PodcastListView.cpp Tue May 11 21:35:17 2010 +0100 @@ -31,6 +31,8 @@ #include #include +#include "buildno.h" + const TInt KDefaultGran = 5; CPodcastListContainer::CPodcastListContainer() @@ -318,6 +320,11 @@ void CPodcastListView::RunAboutDialogL() { CAknNoteDialog* dlg = new(ELeave) CAknNoteDialog(); + HBufC *aboutTextTemplate = iEikonEnv->AllocReadResourceLC(R_ABOUT_TEXT); + TBuf<255> aboutText; + aboutText.Format(*aboutTextTemplate, BUILD_NO); + dlg->SetTextL(aboutText); + CleanupStack::PopAndDestroy(aboutTextTemplate); dlg->ExecuteLD(R_DLG_ABOUT); }