Can't create multilanguage setup
Hi,
I am trying to create a multilanguage setup.
I think I wrote all correctly in my pro file:
[QUOTE]
languages = "&EN,GE,IT "
packageheader = "$${LITERAL_HASH}{\"nameEN\",\"nameDE\",\"nameIT\"}, (0x2003995d), 4, 0, 6, TYPE=SA"
vendorinfo = ":\"Adriano\"" \
"%{\"Adriano\",\"Adriano\",\"Adriano\"}"
my_deployment.pkg_prerules += languages packageheader vendorinfo
[/QUOTE]
When I want to compile it, I get this error:
Processing appname_2003995d_release-armv5.pkg...
(12) : error: Expected , read }
When I open this file, I have this code:
[QUOTE]; appname_2003995d_template.pkg generated by qmake at 2012-08-24T21:16:53
; This file is generated by qmake and should not be modified by the user
;
&EN,GE,IT
#{"nameEN","nameDE","nameIT"}, (0x2003995d), 4, 0, 6, TYPE=SA
:"Adriano"
%{"Adriano","Adriano","Adriano"}
; Manual PKG pre-rules from PRO files
; Dependency to Qt Webkit
(0x200267C2), 4, 8, 1, {"QtWebKit"}
; Default dependency to Qt libraries
(0x2001E61C), 4, 7, 4, {"Qt"}
; Default HW/platform dependencies
[/QUOTE]
[B]The error is probably on this line (12): (0x200267C2), 4, 8, 1, {"QtWebKit"}
[/B]
I think the compiler want something like this {"QtWebKit","QtWebKit","QtWebKit"}.
How can I sovle it, so that the compiler don't want an array of strings also for the dependencies?
Or is there a workaround so that I can do it in the pro file?
Thanks!
Tiger54
Re: Can't create multilanguage setup
[QUOTE=Tiger54;902289]
I think the compiler want something like this {"QtWebKit","QtWebKit","QtWebKit"}.
How can I sovle it, so that the compiler don't want an array of strings also for the dependencies?
Or is there a workaround so that I can do it in the pro file?
[/QUOTE]
Correct, translations to all supported languages are expected for all strings in the .pkg file.
It's doable, but you need to override the [I]default_deployment[/I] variable and provide your own definitions with all the required strings.
See [URL="http://www.developer.nokia.com/Community/Wiki/Deploying_a_Qt_Application_on_Symbian#Supporting_multiple_languages"]Deploying a Qt Application on Symbian, Supporting multiple languages[/URL] for detailed info.
Re: Can't create multilanguage setup
[QUOTE=treinio;902302]Correct, translations to all supported languages are expected for all strings in the .pkg file.
It's doable, but you need to override the [I]default_deployment[/I] variable and provide your own definitions with all the required strings.
See [URL="http://www.developer.nokia.com/Community/Wiki/Deploying_a_Qt_Application_on_Symbian#Supporting_multiple_languages"]Deploying a Qt Application on Symbian, Supporting multiple languages[/URL] for detailed info.[/QUOTE]
Thank you very much Treinio!
I passed some hours with the link you sent. And I wrote this code, it seems to work:
[CODE]# Symbian Belle with mobility 1.2.0
contains(QT_VERSION, 4.7.4){
message(4.7.4)
default_deployment.pkg_prerules =
platforms = \
"(0x200267C2), 4, 8, 1, {\"QtWebKit\",\"QtWebKit\",\"QtWebKit\"}" \
"(0x2001E61C), 4, 7, 4, {\"Qt\",\"Qt\",\"Qt\"}" \
"[0x20022E6D],0,0,0,{\"S60ProductID\",\"S60ProductID\",\"S60ProductID\"}" \
"[0x20032DE7],0,0,0,{\"S60ProductID\",\"S60ProductID\",\"S60ProductID\"}" \
"(0x2002AC89), 1, 2, 0, {\"QtMobility\",\"QtMobility\",\"QtMobility\"}"
}
#Symbian S60 with mobility 1.1.3
contains(QT_VERSION, 4.7.3){
message(4.7.3)
default_deployment.pkg_prerules =
platforms = \
"(0x200267C2), 4, 7, 3, {\"QtWebKit\",\"QtWebKit\",\"QtWebKit\"}" \
"(0x2001E61C), 4, 7, 3, {\"Qt\",\"Qt\",\"Qt\"}" \
"[0x20022E6D],0,0,0,{\"S60ProductID\",\"S60ProductID\",\"S60ProductID\"}" \
"[0x1028315F],0,0,0,{\"S60ProductID\",\"S60ProductID\",\"S60ProductID\"}" \
"(0x2002AC89), 1, 1, 3, {\"QtMobility\",\"QtMobility\",\"QtMobility\"}"
}
[/CODE]
But now I have another problem with the installer pkg file:
[CODE]
&EN,GE,IT
#{"Appname","Appname","Appname"}, (0x2002CCCF), 4, 0, 6
:"Adriano"
%{"Adriano","Adriano","Adriano"}
; Manual PKG pre-rules from PRO files
[0x20022E6D],0,0,0,{"S60ProductID","S60ProductID","S60ProductID"}
[0x20032DE7],0,0,0,{"S60ProductID","S60ProductID","S60ProductID"}
{"policyEN.txt" "policyDE.txt" "policyIT.txt"}-"", FT, TA
"C:/NokiaQtSDK/appfolder/appname_2003995d.sis" - "!:\private\2002CCCE\import\appname_2003995d.sis"
@"C:/QtSDK/Symbian/SDKs/SymbianSR1Qt474//smartinstaller.sis",(0x2002CCCD)
[/CODE]
After uploading the installer:
[IMG]http://ovi.petrucci.ch/temp/Scr000139.jpg[/IMG]
The installer install the app:
[IMG]http://ovi.petrucci.ch/temp/Scr000140.jpg[/IMG]
But then instead of show the text file, the installer hide the message (you can see it in the background) and it hang up there forever - or until I press CANCEL:
[IMG]http://ovi.petrucci.ch/temp/Scr000141.jpg[/IMG]
[B]is the APP UID 0x2002CCCF right for smart installer, if it is a self signed app?[/B]
Or is it a bug?
Thanks.
Re: Can't create multilanguage setup
OK, so you're trying to display a note/license agreement that the user must accept, and the smart installer UI is blocking it? It does sound like a bug.
The easiest solution would be to just install those (localized) license text files normally, and not ask the user anything during installation. Instead, check if those files exist during application startup and if they do, display the agreement in a dialog. If the user accepts, delete the files, if not, simply quit() and they will be displayed also next time. Not sure how well this plays with store's approval criteria, but I wouldn't think it's a problem to display the agreement after installation, as long as it's done before using/connecting to any services.