Kindly
Silver Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору NightW0lf Цитата: Работает, НО не совсем так как надо. А именно получается - "$app_data_root$=true|false|C:\Documents and Settings\All Users\Документы\STALKER-SHOC" за место "$app_data_root$=true|false|C:\|Documents and Settings\All Users\Документы\STALKER-SHOC\" + еще при создание этой строки происходит полное стирание всех дргиух, а именно | В игровой инсталлятор включаем пустой файл 'fsgame.ltx' и юзаем такой код: Код: procedure CurStepChanged(CurStep: TSetupStep); var S: String; begin If CurStep=ssPostInstall then begin S := ExpandConstant('{commondocs}\STALKER-SHOC\') //меняем на то, что нужно, благо, эти символы встречаются в файле только один раз StringChangeEx(S, ':\', ':\|', True); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$app_data_root$=true|false|' + S + #13, true); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$game_data$ = false| true| $fs_root$| gamedata\' + #13, true); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$game_ai$ = true| false| $game_data$| ai\' + #13, true); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$game_spawn$ = true| false| $game_data$| spawns\' + #13, true); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$game_anims$ = true| true| $game_data$| anims\' + #13, true); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$game_levels$ = true| false| $game_data$| levels\' + #13, true); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$game_meshes$ = true| true| $game_data$| meshes\' + #13, true); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$game_dm$ = true| true| $game_data$| meshes\' + #13, true); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$game_shaders$ = true| true| $game_data$| shaders\' + #13, true); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$game_sounds$ = true| true| $game_data$| sounds\' + #13, true); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$game_textures$ = true| true| $game_data$| textures\' + #13, true); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$game_scripts$ = true| false| $game_data$| scripts\' + #13, true); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$game_config$ = true| false| $game_data$| config\' + #13, true); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$level$ = false| false| $game_levels$' + #13, true); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$game_saves$ = true| false| $app_data_root$| savedgames\' + #13, true); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$logs$ = true| false| $app_data_root$| logs\' + #13, true); SaveStringToFile(ExpandConstant('{app}')+'\fsgame.ltx', '$screenshots$ = true| false| $app_data_root$| screenshots\' + #13, true); end; end; | На выходе получаем 100% сходство с оригинальным файлом. p.s. пришлось так извращаться, поскольку игра чувствительна к последовательности строк, просто дописать требуемую строку внизу чревато глюками. |