mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-14 02:17:36 +08:00
update language and installer
This commit is contained in:
11
CHANGELOG
11
CHANGELOG
@@ -1,4 +1,6 @@
|
||||
2022.09.0 (0.84.3)
|
||||
- Added 86PCM support for PC-98 emulation. (nanshiki)
|
||||
- Added German language translation. (Link-Mario)
|
||||
- Improved ANSI.SYS detection for the welcome banner
|
||||
and CLS command. The command "INTRO WELCOME" will
|
||||
re-display the welcome banner without running the
|
||||
@@ -6,10 +8,19 @@
|
||||
- Improved IME support on macOS SDL2 build. (Wengier)
|
||||
- Improved detection for the Chinese/Japanese/Korean
|
||||
keyboard layouts on Windows platform. (Wengier)
|
||||
- Improved Windows installer for selecting languages
|
||||
for the DOS emulator. (Wengier)
|
||||
- Improved config option "file access tries" for the
|
||||
Linux and macOS platforms. (Wengier)
|
||||
- Fixed SafeDisc 2 check for Red Alert 2 by renaming
|
||||
the IDE CD-ROM device. (rderooy & psyraven)
|
||||
- Fixed problem when inputting characters with call
|
||||
INT21/AH=3Fh in PC-98 mode. (nanshiki)
|
||||
- Fixed hang on zip-mounted drives. (tbr)
|
||||
- Fixed file copying problem with Windows 9x install
|
||||
at the end of the DOS-based Setup. (Wengier)
|
||||
- Fixed command like "IF NOT EXIST D:\NUL ..." not
|
||||
working if the drive does not exist. (Wengier)
|
||||
- Fixed that pasting text from clipboard via mouse
|
||||
may not work properly in some cases. (Wengier)
|
||||
- Fixed the mouse scrolling wheel not working with
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
:DOSBOX-X:LANGUAGE:Deutsch
|
||||
:DOSBOX-X:CODEPAGE:453
|
||||
:DOSBOX-X:VERSION:2022.08.0
|
||||
:DOSBOX-X:VERSION:2022.09.0
|
||||
:DOSBOX-X:REMARK:
|
||||
:AUTOEXEC_CONFIGFILE_HELP
|
||||
Befehle in diesen Zeilen werden zum Start ausgefuehrt.
|
||||
@@ -522,7 +522,7 @@ Usage: ←[34;1m←[32;1mMOUNT←[0m ←[37;1mdrive←[0m ←[36;1mlocal_directo
|
||||
-usecd [drive #] Fuer direkte Hardware-Emulation wie z.B Audio-Wiedergabe.
|
||||
-ioctl Nutze Low-Level-Hardware-Zugriff (gefolgt von -usecd Option).
|
||||
-aspi Nutze installierten ASPI-Layer (gefolgt von -usecd Option).
|
||||
-freesize [size] Lege freien Speicher des LWs in MB fest (in KB fuer Disketten).
|
||||
-freesize [size] Lege freien Speicher des LWs in MB fest (in KB fuer Disketten)
|
||||
-nocachedir Kein Laufwerks-Cache. Aktualisiere in Echtzeit.
|
||||
-z drive Verschiebe Laufwerk Z: zu anderem Buchstaben.
|
||||
-o Gib Laufwerk an als: local, remote.
|
||||
@@ -1090,7 +1090,7 @@ Haengt Disketten-, Festplatten und CD-Images ein.
|
||||
←[32;1mIMGMOUNT←[0m -u ←[37;1mdrive|driveNum←[0m (or ←[32;1mIMGMOUNT←[0m ←[37;1mdrive|driveNum←[0m ←[36;1mfile←[0m [options] -u)
|
||||
←[37;1mdrive←[0m Buchstabe zum Einhaengen des Images.
|
||||
←[37;1mdriveNum←[0m Zahl zum Einhaengen, 0-1 = Disketten, 2-5 = Festplatten.
|
||||
←[36;1mfile←[0m Image-Dateiname(n), oder ←[33;1mIMGMAKE.IMG←[0m wenn nichts angegeben.
|
||||
←[36;1mfile←[0m Image-Dateiname(n), oder ←[33;1mIMGMAKE.IMG←[0m wenn nichts angegeben
|
||||
-t iso Image-Typ ist CD-ISO oder CUE/BIN-Image.
|
||||
-t hdd|floppy|ram Image-Typ ist Festplatte (inkl. VHD/HDI)|Diskette|RAM-LW.
|
||||
-fs iso Dateisystem ist ISO 9660 (Standard fuer .iso/.cue-Dateien).
|
||||
@@ -1855,8 +1855,7 @@ SHIFT
|
||||
|
||||
.
|
||||
:SHELL_CMD_FOR_HELP
|
||||
Fuehrt das angegebene Kommando aus, fuer jede Datei
|
||||
in einer Dateiliste.
|
||||
Führt das angegebene Kommando aus, für jede Datei in einer Liste.
|
||||
|
||||
.
|
||||
:SHELL_CMD_FOR_HELP_LONG
|
||||
@@ -1982,8 +1981,7 @@ aufzulisten.
|
||||
|
||||
.
|
||||
:SHELL_CMD_LOADHIGH_HELP
|
||||
Laedt ein Programm in den oberen Speicher
|
||||
(benoetigt XMS und UMB Speicher).
|
||||
Lädt ein Programm in den oberen Speicher (mit XMS und UMB Speicher).
|
||||
|
||||
.
|
||||
:SHELL_CMD_LOADHIGH_HELP_LONG
|
||||
@@ -2173,7 +2171,7 @@ CHCP nnn[:[language]]
|
||||
Unterstuetzte Codepages, die in Verbindung mit
|
||||
TrueType-Font-Output kombiniert werden koennen:
|
||||
|
||||
437,737,775,808,850,852,853,855-866,869,872,874,1250-1258,3021
|
||||
437,453,737,775,808,850,852,853,855-866,869,872,874,1250-1258,3021
|
||||
|
||||
und 2-Byte-Codepages, inklusive 932, 936, 949, und 950/951.
|
||||
|
||||
@@ -3062,6 +3060,12 @@ DOSBox-X Wiki-Guide
|
||||
:MENU:help_issue
|
||||
DOSBox-X Support
|
||||
.
|
||||
:MENU:help_nic
|
||||
Netzwerkschnittstellen auflisten
|
||||
.
|
||||
:MENU:help_prt
|
||||
Druckergeräte auflisten
|
||||
.
|
||||
:MENU:help_about
|
||||
Ueber DOSBox-X
|
||||
.
|
@@ -1,5 +1,5 @@
|
||||
#define MyAppName "DOSBox-X"
|
||||
#define MyAppVersion "2022.08.0"
|
||||
#define MyAppVersion "2022.09.0"
|
||||
#define MyAppBit "(32-bit)"
|
||||
#define MyAppPublisher "joncampbell123 [DOSBox-X Team]"
|
||||
#define MyAppURL "https://dosbox-x.com/"
|
||||
@@ -34,6 +34,7 @@ DisableStartupPrompt=yes
|
||||
DisableWelcomePage=no
|
||||
DisableDirPage=no
|
||||
DisableReadyPage=no
|
||||
ShowLanguageDialog=no
|
||||
AlwaysShowDirOnReadyPage=yes
|
||||
AlwaysShowGroupOnReadyPage=yes
|
||||
ArchitecturesInstallIn64BitMode=x64
|
||||
@@ -48,7 +49,28 @@ InfoBeforeLabel=Please read the general information about DOSBox-X below.
|
||||
InfoAfterClickLabel=You have now installed DOSBox-X. Please note that you can customize DOSBox-X settings in dosbox-x.conf. Also, when in the DOSBox-X command line, you can type HELP for DOSBox-X help, or EXIT to close the DOSBox-X window.
|
||||
|
||||
[Languages]
|
||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
Name: "en"; MessagesFile: "compiler:Default.isl"
|
||||
Name: "fr"; MessagesFile: "compiler:Default.isl"
|
||||
Name: "ge"; MessagesFile: "compiler:Default.isl"
|
||||
Name: "ja"; MessagesFile: "compiler:Default.isl"
|
||||
Name: "ko"; MessagesFile: "compiler:Default.isl"
|
||||
Name: "pt"; MessagesFile: "compiler:Default.isl"
|
||||
Name: "sc"; MessagesFile: "compiler:Default.isl"
|
||||
Name: "sp"; MessagesFile: "compiler:Default.isl"
|
||||
Name: "tc"; MessagesFile: "compiler:Default.isl"
|
||||
Name: "tr"; MessagesFile: "compiler:Default.isl"
|
||||
|
||||
[LangOptions]
|
||||
en.LanguageID=$0409
|
||||
fr.LanguageID=$040C
|
||||
ge.LanguageID=$0407
|
||||
ja.LanguageID=$0411
|
||||
ko.LanguageID=$0412
|
||||
pt.LanguageID=$0416
|
||||
sc.LanguageID=$0804
|
||||
sp.LanguageID=$0C0A
|
||||
tc.LanguageID=$0404
|
||||
tr.LanguageID=$041F
|
||||
|
||||
[Tasks]
|
||||
Name: "contextmenu"; Description: "Add ""Run/Open with DOSBox-X"" context menu for Windows Explorer"
|
||||
@@ -80,6 +102,7 @@ Source: "..\..\fonts\FREECG98.BMP"; DestDir: "{app}"; Flags: ignoreversion; Comp
|
||||
Source: "..\..\fonts\wqy_1?pt.bdf"; DestDir: "{app}"; Flags: ignoreversion; Components: full typical
|
||||
Source: "..\..\fonts\Nouveau_IBM.ttf"; DestDir: "{app}"; Flags: ignoreversion; Components: full typical compact
|
||||
Source: "..\..\fonts\SarasaGothicFixed.ttf"; DestDir: "{app}"; Flags: ignoreversion; Components: full typical compact
|
||||
Source: "..\..\translations\de\de_DE.lng"; DestDir: "{app}\languages"; Flags: ignoreversion; Components: full typical compact
|
||||
Source: "..\..\translations\en\en_US.lng"; DestDir: "{app}\languages"; Flags: ignoreversion; Components: full typical compact
|
||||
Source: "..\..\translations\es\es_ES.lng"; DestDir: "{app}\languages"; Flags: ignoreversion; Components: full typical compact
|
||||
Source: "..\..\translations\fr\fr_FR.lng"; DestDir: "{app}\languages"; Flags: ignoreversion; Components: full typical compact
|
||||
@@ -179,7 +202,7 @@ Type: files; Name: "{app}\stderr.txt"
|
||||
|
||||
[Code]
|
||||
var
|
||||
msg: string;
|
||||
msg, lang: string;
|
||||
HelpButton: TNewButton;
|
||||
PageCustom: TInputFileWizardPage;
|
||||
PageBuild, PageLang, PageOutput, PageFont, PageVer: TInputOptionWizardPage;
|
||||
@@ -226,6 +249,97 @@ begin
|
||||
HelpButton.OnClick := @HelpButtonOnClick;
|
||||
HelpButton.Parent := WizardForm;
|
||||
end;
|
||||
procedure SetLanguage();
|
||||
var
|
||||
i: Integer;
|
||||
line, linetmp, section: String;
|
||||
FileLines: TStringList;
|
||||
begin
|
||||
if FileExists(ExpandConstant('{app}\dosbox-x.conf')) and (PageLang.Values[1] or PageLang.Values[2] or PageLang.Values[3] or PageLang.Values[4] or PageLang.Values[5] or PageLang.Values[6] or PageLang.Values[7] or PageLang.Values[8] or PageLang.Values[9]) then
|
||||
begin
|
||||
FileLines := TStringList.Create;
|
||||
FileLines.LoadFromFile(ExpandConstant('{app}\dosbox-x.conf'));
|
||||
section := '';
|
||||
for i := 0 to FileLines.Count - 1 do
|
||||
begin
|
||||
line := Trim(FileLines[i]);
|
||||
if (Length(line)>2) and (Copy(line, 1, 1) = '[') and (Copy(line, Length(line), 1) = ']') then
|
||||
section := Copy(line, 2, Length(line)-2);
|
||||
if (Length(line)>0) and (Copy(line, 1, 1) <> '#') and (Copy(line, 1, 1) <> '[') and (Pos('=', line) > 1) then
|
||||
begin
|
||||
linetmp := Trim(Copy(line, 1, Pos('=', line) - 1));
|
||||
if (CompareText(linetmp, 'language') = 0) and (CompareText(section, 'dosbox') = 0) then
|
||||
begin
|
||||
linetmp := Trim(Copy(line, 1, Pos('=', line)));
|
||||
if (PageLang.Values[1]) and FileExists(ExpandConstant('{app}\languages\fr_FR.lng')) then
|
||||
FileLines[i] := linetmp+' fr_FR';
|
||||
if (PageLang.Values[2]) and FileExists(ExpandConstant('{app}\languages\de_DE.lng')) then
|
||||
FileLines[i] := linetmp+' de_DE';
|
||||
if (PageLang.Values[3]) and FileExists(ExpandConstant('{app}\languages\ja_JP.lng')) then
|
||||
FileLines[i] := linetmp+' ja_JP';
|
||||
if (PageLang.Values[4]) and FileExists(ExpandConstant('{app}\languages\ko_KR.lng')) then
|
||||
FileLines[i] := linetmp+' ko_KR';
|
||||
if (PageLang.Values[5]) and FileExists(ExpandConstant('{app}\languages\pt_BR.lng')) then
|
||||
FileLines[i] := linetmp+' pt_BR';
|
||||
if (PageLang.Values[6]) and FileExists(ExpandConstant('{app}\languages\zh_CN.lng')) then
|
||||
FileLines[i] := linetmp+' zh_CN';
|
||||
if (PageLang.Values[7]) and FileExists(ExpandConstant('{app}\languages\es_ES.lng')) then
|
||||
FileLines[i] := linetmp+' es_ES';
|
||||
if (PageLang.Values[8]) and FileExists(ExpandConstant('{app}\languages\zh_TW.lng')) then
|
||||
FileLines[i] := linetmp+' zh_TW';
|
||||
if (PageLang.Values[9]) and FileExists(ExpandConstant('{app}\languages\tr_TR.lng')) then
|
||||
FileLines[i] := linetmp+' tr_TR';
|
||||
end;
|
||||
if (CompareText(linetmp, 'keyboardlayout') = 0) and (CompareText(section, 'dos') = 0) then
|
||||
begin
|
||||
linetmp := Trim(Copy(line, 1, Pos('=', line)));
|
||||
if (PageLang.Values[1]) then
|
||||
FileLines[i] := linetmp+' fr';
|
||||
if (PageLang.Values[2]) then
|
||||
FileLines[i] := linetmp+' de';
|
||||
if (PageLang.Values[3]) then
|
||||
FileLines[i] := linetmp+' jp';
|
||||
if (PageLang.Values[4]) then
|
||||
FileLines[i] := linetmp+' ko';
|
||||
if (PageLang.Values[5]) then
|
||||
FileLines[i] := linetmp+' br';
|
||||
if (PageLang.Values[6]) then
|
||||
FileLines[i] := linetmp+' cn';
|
||||
if (PageLang.Values[7]) then
|
||||
FileLines[i] := linetmp+' sp';
|
||||
if (PageLang.Values[8]) then
|
||||
FileLines[i] := linetmp+' tw';
|
||||
if (PageLang.Values[9]) then
|
||||
FileLines[i] := linetmp+' tr';
|
||||
end;
|
||||
if (CompareText(linetmp, 'country') = 0) and (CompareText(section, 'config') = 0) then
|
||||
begin
|
||||
linetmp := Trim(Copy(line, 1, Pos('=', line)));
|
||||
if (PageLang.Values[1]) then
|
||||
FileLines[i] := linetmp+' 33,859';
|
||||
if (PageLang.Values[2]) then
|
||||
FileLines[i] := linetmp+' 49,453';
|
||||
if (PageLang.Values[3]) then
|
||||
FileLines[i] := linetmp+' 81,932';
|
||||
if (PageLang.Values[4]) then
|
||||
FileLines[i] := linetmp+' 82,949';
|
||||
if (PageLang.Values[5]) then
|
||||
FileLines[i] := linetmp+' 55,860';
|
||||
if (PageLang.Values[6]) then
|
||||
FileLines[i] := linetmp+' 86,936';
|
||||
if (PageLang.Values[7]) then
|
||||
FileLines[i] := linetmp+' 34,858';
|
||||
if (PageLang.Values[8]) then
|
||||
FileLines[i] := linetmp+' 886,950';
|
||||
if (PageLang.Values[9]) then
|
||||
FileLines[i] := linetmp+' 90,857';
|
||||
break;
|
||||
end
|
||||
end
|
||||
end;
|
||||
FileLines.SaveToFile(ExpandConstant('{app}\dosbox-x.conf'));
|
||||
end;
|
||||
end;
|
||||
procedure InitializeWizard();
|
||||
begin
|
||||
if not Is32BitInstaller() and not IsWin64 then
|
||||
@@ -270,10 +384,11 @@ begin
|
||||
PageOutput.Add('OpenGL with pixel-perfect scaling');
|
||||
PageOutput.Add('TrueType font (TTF) / Direct3D output');
|
||||
PageOutput.Values[2] := True;
|
||||
msg:='DOSBox-X supports language files to display messages in different languages. The user interface is English by default, but you can select a different language for its user interface. This setting can be later modified in the configuration file (dosbox-x.conf).';
|
||||
PageLang:=CreateInputOptionPage(PageOutput.ID, 'User interface language', 'Select the language for DOSBox-X''s user interface', msg, True, False);
|
||||
msg:='DOSBox-X supports language files to display messages in different languages. The language for the user interface and internal DOS is English by default, but you can select a different language for its user interface and internal DOS. The language and code page settings can be later modified in the configuration file (dosbox-x.conf).';
|
||||
PageLang:=CreateInputOptionPage(PageOutput.ID, 'User interface and DOS language', 'Select the language for DOSBox-X''s user interface and internal DOS', msg, True, False);
|
||||
PageLang.Add('Default (English)');
|
||||
PageLang.Add('French (français)');
|
||||
PageLang.Add('French (Français)');
|
||||
PageLang.Add('German (Deutsch)');
|
||||
PageLang.Add('Japanese (日本語)');
|
||||
PageLang.Add('Korean (한국어)');
|
||||
PageLang.Add('Portuguese (português do Brasil)');
|
||||
@@ -282,6 +397,25 @@ begin
|
||||
PageLang.Add('Traditional Chinese (繁體/正體中文)');
|
||||
PageLang.Add('Turkish (Türkçe)');
|
||||
PageLang.Values[0] := True;
|
||||
lang := ExpandConstant('{language}');
|
||||
if lang = 'fr' then
|
||||
PageLang.Values[1] := True;
|
||||
if lang = 'ge' then
|
||||
PageLang.Values[2] := True;
|
||||
if lang = 'ja' then
|
||||
PageLang.Values[3] := True;
|
||||
if lang = 'ko' then
|
||||
PageLang.Values[4] := True;
|
||||
if lang = 'pt' then
|
||||
PageLang.Values[5] := True;
|
||||
if lang = 'sc' then
|
||||
PageLang.Values[6] := True;
|
||||
if lang = 'sp' then
|
||||
PageLang.Values[7] := True;
|
||||
if lang = 'tc' then
|
||||
PageLang.Values[8] := True;
|
||||
if lang = 'tr' then
|
||||
PageLang.Values[9] := True;
|
||||
msg:='DOSBox-X allows you to select a TrueType font (or OpenType font) for the TrueType font (TTF) output. It has a builtin TTF font as the default font for the output, but you may want to select a different TTF (or TTC/OTF) font than the default one.' #13#13 'This setting can be later modified in the DOSBox-X''s configuration file (dosbox-x.conf).';
|
||||
PageFont:=CreateInputOptionPage(PageLang.ID, 'TrueType font', 'Select the font for the TrueType font output', msg, True, False);
|
||||
PageFont.Add('Default TrueType font');
|
||||
@@ -305,8 +439,49 @@ begin
|
||||
PageVer.Add('DOS version 7.10 (for LFN and FAT32 support)');
|
||||
end;
|
||||
function ShouldSkipPage(PageID: Integer): Boolean;
|
||||
var
|
||||
i: Integer;
|
||||
defcp: Boolean;
|
||||
line, linetmp, section: String;
|
||||
FileLines: TStringList;
|
||||
begin
|
||||
Result := ((PageID = PageOutput.ID) or (PageID = PageLang.ID) or (PageID = PageFont.ID) or (PageID = PageCustom.ID) or (PageID = PageVer.ID)) and FileExists(ExpandConstant('{app}\dosbox-x.conf')) or ((PageID = PageFont.ID) and (not PageOutput.Values[2] or PageLang.Values[2] or PageLang.Values[3] or PageLang.Values[5] or PageLang.Values[7])) or ((PageID = PageCustom.ID) and (not PageOutput.Values[2] or not PageFont.Values[5]));
|
||||
if (PageID = PageLang.ID) then
|
||||
begin
|
||||
if FileExists(ExpandConstant('{app}\dosbox-x.conf')) then
|
||||
begin
|
||||
if (ExpandConstant('{language}') = 'en') or (WizardSetupType(False) = 'compact') then
|
||||
begin
|
||||
Result := True;
|
||||
exit;
|
||||
end;
|
||||
FileLines := TStringList.Create;
|
||||
FileLines.LoadFromFile(ExpandConstant('{app}\dosbox-x.conf'));
|
||||
section := '';
|
||||
defcp := False;
|
||||
for i := 0 to FileLines.Count - 1 do
|
||||
begin
|
||||
line := Trim(FileLines[i]);
|
||||
if (Length(line)>2) and (Copy(line, 1, 1) = '[') and (Copy(line, Length(line), 1) = ']') then
|
||||
section := Copy(line, 2, Length(line)-2);
|
||||
if (Length(line)>0) and (Copy(line, 1, 1) <> '#') and (Copy(line, 1, 1) <> '[') and (Pos('=', line) > 1) then
|
||||
begin
|
||||
linetmp := Trim(Copy(line, 1, Pos('=', line) - 1));
|
||||
if (CompareText(linetmp, 'country') = 0) and (CompareText(section, 'config') = 0) then
|
||||
begin
|
||||
linetmp := Trim(Copy(line, Pos('=', line) + 1, Length(line)));
|
||||
if (CompareText(linetmp, '') = 0) then
|
||||
defcp := True;
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
Result := not defcp;
|
||||
end
|
||||
else
|
||||
Result := False;
|
||||
end
|
||||
else
|
||||
Result := ((PageID = PageOutput.ID) or (PageID = PageFont.ID) or (PageID = PageCustom.ID) or (PageID = PageVer.ID)) and FileExists(ExpandConstant('{app}\dosbox-x.conf')) or ((PageID = PageFont.ID) and (not PageOutput.Values[2] or PageLang.Values[3] or PageLang.Values[4] or PageLang.Values[6] or PageLang.Values[8])) or ((PageID = PageCustom.ID) and (not PageOutput.Values[2] or not PageFont.Values[5]));
|
||||
end;
|
||||
function NextButtonClick(CurPageID: Integer): Boolean;
|
||||
begin
|
||||
@@ -356,6 +531,29 @@ begin
|
||||
if Is32BitInstaller() and (PageBuild.Values[3]) and (PageBuild.Values[5]) then
|
||||
msg:=msg+'MinGW low-end build SDL2';
|
||||
Wizardform.ReadyMemo.Lines.Add(' '+msg);
|
||||
lang:='';
|
||||
if PageLang.Values[0] or PageLang.Values[1] or PageLang.Values[2] or PageLang.Values[3] or PageLang.Values[4] or PageLang.Values[5] or PageLang.Values[6] or PageLang.Values[7] or PageLang.Values[8] or PageLang.Values[9] then
|
||||
begin
|
||||
lang:='Default (English)';
|
||||
if (PageLang.Values[1]) then
|
||||
lang:='French (Français)';
|
||||
if (PageLang.Values[2]) then
|
||||
lang:='German (Deutsch)';
|
||||
if (PageLang.Values[3]) then
|
||||
lang:='Japanese (日本語)';
|
||||
if (PageLang.Values[4]) then
|
||||
lang:='Korean (한국어)';
|
||||
if (PageLang.Values[5]) then
|
||||
lang:='Portuguese (português do Brasil)';
|
||||
if (PageLang.Values[6]) then
|
||||
lang:='Simplified Chinese (简体中文)';
|
||||
if (PageLang.Values[7]) then
|
||||
lang:='Spanish (Español)';
|
||||
if (PageLang.Values[8]) then
|
||||
lang:='Traditional Chinese (繁體/正體中文)';
|
||||
if (PageLang.Values[9]) then
|
||||
lang:='Turkish (Türkçe)';
|
||||
end;
|
||||
if not FileExists(ExpandConstant('{app}\dosbox-x.conf')) then
|
||||
begin
|
||||
if PageOutput.Values[0] or PageOutput.Values[1] or PageOutput.Values[2] then
|
||||
@@ -369,28 +567,11 @@ begin
|
||||
msg:='TrueType font (TTF) / Direct3D output';
|
||||
Wizardform.ReadyMemo.Lines.Add(' '+msg);
|
||||
end;
|
||||
if PageLang.Values[0] or PageLang.Values[1] or PageLang.Values[2] or PageLang.Values[3] or PageLang.Values[4] or PageLang.Values[5] or PageLang.Values[6] or PageLang.Values[7] or PageLang.Values[8] then
|
||||
if Length(lang) > 0 then
|
||||
begin
|
||||
Wizardform.ReadyMemo.Lines.Add('');
|
||||
Wizardform.ReadyMemo.Lines.Add('User interface language:');
|
||||
msg:='Default (English)';
|
||||
if (PageLang.Values[1]) then
|
||||
msg:='French (français)';
|
||||
if (PageLang.Values[2]) then
|
||||
msg:='Japanese (日本語)';
|
||||
if (PageLang.Values[3]) then
|
||||
msg:='Korean (한국어)';
|
||||
if (PageLang.Values[4]) then
|
||||
msg:='Portuguese (português do Brasil)';
|
||||
if (PageLang.Values[5]) then
|
||||
msg:='Simplified Chinese (简体中文)';
|
||||
if (PageLang.Values[6]) then
|
||||
msg:='Spanish (Español)';
|
||||
if (PageLang.Values[7]) then
|
||||
msg:='Traditional Chinese (繁體/正體中文)';
|
||||
if (PageLang.Values[8]) then
|
||||
msg:='Turkish (Türkçe)';
|
||||
Wizardform.ReadyMemo.Lines.Add(' '+msg);
|
||||
Wizardform.ReadyMemo.Lines.Add('User interface and DOS language:');
|
||||
Wizardform.ReadyMemo.Lines.Add(' '+lang);
|
||||
end;
|
||||
if PageFont.Values[0] or PageFont.Values[1] or PageFont.Values[2] or PageFont.Values[3] or PageFont.Values[4] or PageFont.Values[5] then
|
||||
begin
|
||||
@@ -425,6 +606,12 @@ begin
|
||||
Wizardform.ReadyMemo.Lines.Add(' '+msg);
|
||||
end
|
||||
end
|
||||
else if Length(lang) > 0 then
|
||||
begin
|
||||
Wizardform.ReadyMemo.Lines.Add('');
|
||||
Wizardform.ReadyMemo.Lines.Add('User interface and DOS language:');
|
||||
Wizardform.ReadyMemo.Lines.Add(' '+lang);
|
||||
end
|
||||
end
|
||||
end;
|
||||
procedure CurStepChanged(CurrentStep: TSetupStep);
|
||||
@@ -539,21 +726,23 @@ begin
|
||||
begin
|
||||
if (not PageLang.Values[1]) and FileExists(ExpandConstant('{app}\languages\fr_FR.lng')) then
|
||||
DeleteFile(ExpandConstant('{app}\languages\fr_FR.lng'));
|
||||
if (not PageLang.Values[2]) and FileExists(ExpandConstant('{app}\languages\ja_JP.lng')) then
|
||||
if (not PageLang.Values[2]) and FileExists(ExpandConstant('{app}\languages\de_DE.lng')) then
|
||||
DeleteFile(ExpandConstant('{app}\languages\de_DE.lng'));
|
||||
if (not PageLang.Values[3]) and FileExists(ExpandConstant('{app}\languages\ja_JP.lng')) then
|
||||
DeleteFile(ExpandConstant('{app}\languages\ja_JP.lng'));
|
||||
if (not PageLang.Values[3]) and FileExists(ExpandConstant('{app}\languages\ko_KR.lng')) then
|
||||
if (not PageLang.Values[4]) and FileExists(ExpandConstant('{app}\languages\ko_KR.lng')) then
|
||||
DeleteFile(ExpandConstant('{app}\languages\ko_KR.lng'));
|
||||
if (not PageLang.Values[4]) and FileExists(ExpandConstant('{app}\languages\pt_BR.lng')) then
|
||||
if (not PageLang.Values[5]) and FileExists(ExpandConstant('{app}\languages\pt_BR.lng')) then
|
||||
DeleteFile(ExpandConstant('{app}\languages\pt_BR.lng'));
|
||||
if (not PageLang.Values[5]) and FileExists(ExpandConstant('{app}\languages\zh_CN.lng')) then
|
||||
if (not PageLang.Values[6]) and FileExists(ExpandConstant('{app}\languages\zh_CN.lng')) then
|
||||
DeleteFile(ExpandConstant('{app}\languages\zh_CN.lng'));
|
||||
if (not PageLang.Values[6]) and FileExists(ExpandConstant('{app}\languages\es_ES.lng')) then
|
||||
if (not PageLang.Values[7]) and FileExists(ExpandConstant('{app}\languages\es_ES.lng')) then
|
||||
DeleteFile(ExpandConstant('{app}\languages\es_ES.lng'));
|
||||
if (not PageLang.Values[7]) and FileExists(ExpandConstant('{app}\languages\zh_TW.lng')) then
|
||||
if (not PageLang.Values[8]) and FileExists(ExpandConstant('{app}\languages\zh_TW.lng')) then
|
||||
DeleteFile(ExpandConstant('{app}\languages\zh_TW.lng'));
|
||||
if (not PageLang.Values[8]) and FileExists(ExpandConstant('{app}\languages\tr_TR.lng')) then
|
||||
if (not PageLang.Values[9]) and FileExists(ExpandConstant('{app}\languages\tr_TR.lng')) then
|
||||
DeleteFile(ExpandConstant('{app}\languages\tr_TR.lng'));
|
||||
if (not PageLang.Values[2]) and (not PageLang.Values[3]) and (not PageLang.Values[5]) and (not PageLang.Values[7]) and (not PageFont.Values[1]) then
|
||||
if (not PageLang.Values[3]) and (not PageLang.Values[4]) and (not PageLang.Values[6]) and (not PageLang.Values[8]) and (not PageFont.Values[1]) then
|
||||
begin
|
||||
if FileExists(ExpandConstant('{app}\SarasaGothicFixed.ttf')) then
|
||||
DeleteFile(ExpandConstant('{app}\SarasaGothicFixed.ttf'));
|
||||
@@ -564,85 +753,7 @@ begin
|
||||
DeleteFile(ExpandConstant('{app}\Nouveau_IBM.ttf'));
|
||||
end;
|
||||
end;
|
||||
if FileExists(ExpandConstant('{app}\dosbox-x.conf')) and (PageLang.Values[1] or PageLang.Values[2] or PageLang.Values[3] or PageLang.Values[4] or PageLang.Values[5] or PageLang.Values[6] or PageLang.Values[7] or PageLang.Values[8]) then
|
||||
begin
|
||||
FileLines := TStringList.Create;
|
||||
FileLines.LoadFromFile(ExpandConstant('{app}\dosbox-x.conf'));
|
||||
section := '';
|
||||
for i := 0 to FileLines.Count - 1 do
|
||||
begin
|
||||
line := Trim(FileLines[i]);
|
||||
if (Length(line)>2) and (Copy(line, 1, 1) = '[') and (Copy(line, Length(line), 1) = ']') then
|
||||
section := Copy(line, 2, Length(line)-2);
|
||||
if (Length(line)>0) and (Copy(line, 1, 1) <> '#') and (Copy(line, 1, 1) <> '[') and (Pos('=', line) > 1) then
|
||||
begin
|
||||
linetmp := Trim(Copy(line, 1, Pos('=', line) - 1));
|
||||
if (CompareText(linetmp, 'language') = 0) and (CompareText(section, 'dosbox') = 0) then
|
||||
begin
|
||||
linetmp := Trim(Copy(line, 1, Pos('=', line)));
|
||||
if (PageLang.Values[1]) and FileExists(ExpandConstant('{app}\languages\fr_FR.lng')) then
|
||||
FileLines[i] := linetmp+' fr_FR';
|
||||
if (PageLang.Values[2]) and FileExists(ExpandConstant('{app}\languages\ja_JP.lng')) then
|
||||
FileLines[i] := linetmp+' ja_JP';
|
||||
if (PageLang.Values[3]) and FileExists(ExpandConstant('{app}\languages\ko_KR.lng')) then
|
||||
FileLines[i] := linetmp+' ko_KR';
|
||||
if (PageLang.Values[4]) and FileExists(ExpandConstant('{app}\languages\pt_BR.lng')) then
|
||||
FileLines[i] := linetmp+' pt_BR';
|
||||
if (PageLang.Values[5]) and FileExists(ExpandConstant('{app}\languages\zh_CN.lng')) then
|
||||
FileLines[i] := linetmp+' zh_CN';
|
||||
if (PageLang.Values[6]) and FileExists(ExpandConstant('{app}\languages\es_ES.lng')) then
|
||||
FileLines[i] := linetmp+' es_ES';
|
||||
if (PageLang.Values[7]) and FileExists(ExpandConstant('{app}\languages\zh_TW.lng')) then
|
||||
FileLines[i] := linetmp+' zh_TW';
|
||||
if (PageLang.Values[8]) and FileExists(ExpandConstant('{app}\languages\tr_TR.lng')) then
|
||||
FileLines[i] := linetmp+' tr_TR';
|
||||
end;
|
||||
if (CompareText(linetmp, 'keyboardlayout') = 0) and (CompareText(section, 'dos') = 0) then
|
||||
begin
|
||||
linetmp := Trim(Copy(line, 1, Pos('=', line)));
|
||||
if (PageLang.Values[1]) then
|
||||
FileLines[i] := linetmp+' fr';
|
||||
if (PageLang.Values[2]) then
|
||||
FileLines[i] := linetmp+' jp';
|
||||
if (PageLang.Values[3]) then
|
||||
FileLines[i] := linetmp+' ko';
|
||||
if (PageLang.Values[4]) then
|
||||
FileLines[i] := linetmp+' br';
|
||||
if (PageLang.Values[5]) then
|
||||
FileLines[i] := linetmp+' cn';
|
||||
if (PageLang.Values[6]) then
|
||||
FileLines[i] := linetmp+' sp';
|
||||
if (PageLang.Values[7]) then
|
||||
FileLines[i] := linetmp+' tw';
|
||||
if (PageLang.Values[8]) then
|
||||
FileLines[i] := linetmp+' tr';
|
||||
break;
|
||||
end;
|
||||
if (CompareText(linetmp, 'country') = 0) and (CompareText(section, 'config') = 0) then
|
||||
begin
|
||||
linetmp := Trim(Copy(line, 1, Pos('=', line)));
|
||||
if (PageLang.Values[1]) then
|
||||
FileLines[i] := linetmp+' 33,859';
|
||||
if (PageLang.Values[2]) then
|
||||
FileLines[i] := linetmp+' 81,932';
|
||||
if (PageLang.Values[3]) then
|
||||
FileLines[i] := linetmp+' 82,949';
|
||||
if (PageLang.Values[4]) then
|
||||
FileLines[i] := linetmp+' 55,860';
|
||||
if (PageLang.Values[5]) then
|
||||
FileLines[i] := linetmp+' 86,936';
|
||||
if (PageLang.Values[6]) then
|
||||
FileLines[i] := linetmp+' 34,858';
|
||||
if (PageLang.Values[7]) then
|
||||
FileLines[i] := linetmp+' 886,950';
|
||||
if (PageLang.Values[8]) then
|
||||
FileLines[i] := linetmp+' 90,857';
|
||||
break;
|
||||
end
|
||||
end
|
||||
end;
|
||||
FileLines.SaveToFile(ExpandConstant('{app}\dosbox-x.conf'));
|
||||
end;
|
||||
SetLanguage();
|
||||
if FileExists(ExpandConstant('{app}\dosbox-x.conf')) and (PageFont.Values[1] or PageFont.Values[2] or PageFont.Values[3] or PageFont.Values[4] or PageFont.Values[5]) then
|
||||
begin
|
||||
FileLines := TStringList.Create;
|
||||
@@ -985,7 +1096,8 @@ begin
|
||||
FileLinesold.free;
|
||||
FileLinesnew.free;
|
||||
DeleteFile(ExpandConstant('{app}\dosbox-x.conf.old'));
|
||||
end
|
||||
end;
|
||||
SetLanguage();
|
||||
end;
|
||||
DeleteFile(ExpandConstant('{app}\dosbox-x.reference.setup.conf'));
|
||||
end
|
||||
|
Reference in New Issue
Block a user