Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 31-05-2017, 01:48
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,812
Thanks: 1,117
Thanked 7,466 Times in 2,903 Posts
KaktoR is on a distinguished road
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
Will test it further on weekend. But i am sure i have forgot something important.

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
Attached Images
File Type: png Unbenannt.png (27.7 KB, 114 views)
__________________
Haters gonna hate

Last edited by KaktoR; 31-05-2017 at 01:55.
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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



All times are GMT -7. The time now is 02:45.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com