MsgBox(0, "Rssification - Руссификация Прошки", "It's based on otf fonts" & @CRLF & "При помощи otf шрифтов")
If ProcessExists("xtop.exe") Then
MsgBox(0, "Process denied (Неа!)", "Running Pro|Engineer is detected!" & @CRLF & "Russification process closed" & @CRLF & "Вижу процесс xtop.exe - Прошку закрой!")
Exit
EndIf
$way = "c:\Program Files\proeWildfire 3.0 4.0\"
if FileExists ("d:\ptc\wildfire3\") = 1 Then
$way = "d:\ptc\wildfire3\"
EndIf
if FileExists ("d:\ptc\wildfire4\") = 1 Then
$way = "d:\ptc\wildfire4\"
EndIf
$way = InputBox ("Way to Pro|Engineer", "For example: c:\Program Files\proeWildfire 4.0\", $way)
if @error = 1 Then
MsgBox(0, "Process stoped (Не хочешь - как хочешь)", "Nothing was installed" & @CRLF & "Ничего не было установлено")
Exit
EndIf
if FileExists ($way & "\i486_nt\") = 1 Then
FileInstall ("include\wildfire4\i486_nt\text\russian\special.fnt", $way & "\i486_nt\text\russian\special.fnt", 1)
FileInstall ("include\wildfire4\i486_nt\text\russian\arial.ttf", $way & "\i486_nt\text\russian\arial.ttf", 1)
FileInstall ("include\wildfire4\i486_nt\text\russian\GOST_A.otf", $way & "\i486_nt\text\russian\GOST_A.otf", 1)
Else
FileInstall ("include\wildfire4\i486_nt\text\russian\special.fnt", $way & "\x86e_win64\text\russian\special.fnt", 1)
FileInstall ("include\wildfire4\i486_nt\text\russian\arial.ttf", $way & "\x86e_win64\text\russian\arial.ttf", 1)
FileInstall ("include\wildfire4\i486_nt\text\russian\GOST_A.otf", $way & "\x86e_win64\text\russian\GOST_A.otf", 1)
EndIf
FileInstall ("include\wildfire4\text\russian\font.ndx", $way & "\text\russian\font.ndx", 1)
FileInstall ("include\wildfire4\text\russian\arial.ndx", $way & "\text\russian\arial.ndx", 1)
_RegSetEnvironment("LANG", "russian", 0, 0, 1)
Func _RegSetEnvironment($sEnv_Name, $sEnv_Value, $iReplace=0, $iKeyVal=0, $iEnv_Update=0)
If $sEnv_Name = "" Then Return SetError(1, 0, 0)
If $sEnv_Value = "" Then Return SetError(2, 0, 0)
If $iReplace <> 0 And $iReplace <> 1 Then Return SetError(3, 0, 0)
Local $iRet = 0, $iError = 0
Local $sSystemRegKey = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
Local $sUserRegKey = "HKEY_CURRENT_USER\Environment"
Local $sRegKey = $sSystemRegKey
If $iKeyVal = 1 Then $sRegKey = $sUserRegKey
If $iReplace = 1 Then
$iRet = RegWrite($sRegKey, $sEnv_Name, "REG_SZ", $sEnv_Value)
$iError = @error
ElseIf RegRead($sRegKey, $sEnv_Name) = "" Then
$iRet = RegWrite($sRegKey, $sEnv_Name, "REG_SZ", $sEnv_Value)
$iError = @error
EndIf
If $iEnv_Update Then EnvUpdate()
Return SetError($iError, 0, $iRet)
EndFunc
MsgBox (0, "Finish", "Russification done, may be need reboot")