|
#5
|
||||
|
||||
|
Have not tested yet, but this should work?
Code:
#define AC3Registry
...
#ifdef AC3Registry
function GetAppName(Param: string): string;
begin
Result:=FmtMessage(ExpandConstant('{cm:AppName}'),[chr(39)]) ;
end;
#else
function GetAppName(Default:String):String;
begin
if not (GetIniString('Messages', 'ApplicationName', '', ExpandConstant('{tmp}\' + ActLang + '.txt')) = '') and (GetValStr('InstallOptions', 'ApplicationName' + ActLangShort, '') = '') then
Result := GetIniString('Messages', 'ApplicationName', '', ExpandConstant('{tmp}\' + ActLang + '.txt'))
else
Result:=GetValStr('InstallOptions', 'ApplicationName' + ActLangShort, GetOrigAppName(''))
end;
#endif
And a question: Can i use #ifdef for this on [CustomMessages] too? If yes, it is neccessary at all? Edit: Ok, it seems to work. I have just switched #define to ON. But as i said, will test it with registry.iss on weekend. Edit 2: Here is the full code i am using for the fast test Code:
#define AC3Registry Code:
[CustomMessages] #ifdef AC3Registry eng.AppName=Assassin%1s Creed(R) III #endif Code:
#ifdef AC3Registry
function GetAppName(Param: string): string;
begin
Result:=FmtMessage(ExpandConstant('{cm:AppName}'),[chr(39)]) ;
end;
#else
function GetAppName(Default:String):String;
begin
if not (GetIniString('Messages', 'ApplicationName', '', ExpandConstant('{tmp}\' + ActLang + '.txt')) = '') and (GetValStr('InstallOptions', 'ApplicationName' + ActLangShort, '') = '') then
Result := GetIniString('Messages', 'ApplicationName', '', ExpandConstant('{tmp}\' + ActLang + '.txt'))
else
Result:=GetValStr('InstallOptions', 'ApplicationName' + ActLangShort, GetOrigAppName(''))
end;
#endif
__________________
Haters gonna hate
Last edited by KaktoR; 31-05-2017 at 01:55. |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| dvd playing problem... | themis_t | CD/DVD Software & Utilities | 6 | 20-10-2004 14:44 |
| Problem with Record Now Max ver 4.5 | brkr101 | PS2 Games | 2 | 22-04-2004 22:40 |
| problem with my xbox | mrlucky | XBox Games | 1 | 11-01-2004 09:38 |
| A problem about NFS Underground | Gilvin | PC Games | 1 | 22-11-2003 22:17 |
| Problem with pics on web pages and cookies | EVOEvo | CD/DVD-Writers | 3 | 05-10-2003 18:57 |