da_ZuBR Опубликовано 11 апреля, 2006 Жалоба Поделиться Опубликовано 11 апреля, 2006 (изменено) Итак, ваша карта закончена. и готова к выходу в свет, что делать? 1. Вам понадобятся 2 програмки: а) Nullsoft Scriptable Install System - фактически библиотеки для создания инсталера б)HM NIS EDIT - Для написания инсталяционного скрипта. 2. Отредактировать уже готовый скрипт(пример ниже) или создать свой. Вот пример скрипта: ; Script generated by the HM NIS Edit Script Wizard. ; HM NIS Edit Wizard helper defines Name of the product you want to install !define PRODUCT_NAME "Gates of Ultramar" Version number of product you want to install !define PRODUCT_VERSION "1.0" !define PRODUCT_PUBLISHER "Rayden" Insert a link to you homepage here !define PRODUCT_WEB_SITE "http://forums.relicnews.com/showthread.php?t=57379" ; MUI 1.67 compatible ------ !include "MUI.nsh" ; MUI Settings !define MUI_ABORTWARNING Here you can define the location of an icon you want to use !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" ; Welcome page !insertmacro MUI_PAGE_WELCOME ; License page !define MUI_LICENSEPAGE_CHECKBOX Here you can define the readme text on first page of the installer, it should be a rtf so you can do some formatting with it because only *.txt and *.rtf is supported !insertmacro MUI_PAGE_LICENSE "D:\Windows\Installer\Licence_Gou.rtf" ; Directory page !insertmacro MUI_PAGE_DIRECTORY ; Instfiles page !insertmacro MUI_PAGE_INSTFILES ; Finish page !insertmacro MUI_PAGE_FINISH ; Language files !insertmacro MUI_LANGUAGE "English" ; MUI end ------ Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" The filename of the generated installer file OutFile "Gates of Ultramar.exe" The following 2 lines read out the installation directory out of the windows registry InstallDir "$PROGRAMFILES\THQ\Dawn of War\w40k" InstallDirRegKey HKLM "SOFTWARE\THQ\Dawn of War" "InstallLocation" This line indicates that the different packages of installation will be shown to the user ShowInstDetails show Here the first installation group section starts (Hauptgruppe = Main group :) ) Section "Hauptgruppe" SEC01 Set the directory where it should be installed, $INSTDIR is the path from the install location selection you can normally choose in installers SetOutPath "$INSTDIR\W40K\" Overwrite existing files SetOverwrite ifnewer SetOverwrite try This command sets the actual path for installing on the target computer (Loading Screen) SetOutPath "$INSTDIR\w40k\Data\scenarios\mp\loading" File "F:\W40k\Data\scenarios\mp\loading\6p_gates_of_ultramar.tga" This command sets the actual path for installing on the target computer (MP folder where maps are located) SetOutPath "$INSTDIR\w40k\Data\scenarios\mp" File "F:\W40k\Data\scenarios\mp\6p_gates_of_ultramar.sgb" File "F:\W40k\Data\scenarios\mp\6p_gates_of_ultramar.tga" File "F:\W40k\Data\scenarios\mp\6p_gates_of_ultramar_icon.tga" File "F:\W40k\Data\scenarios\mp\6p_gates_of_ultramar_mm.tga" This is where i put my readme :) SetOutPath "$INSTDIR\w40k\Data\scenarios" File "F:\W40k\Data\scenarios\GoU_Readme.txt" This command sets the actual path for installing on the target computer (Detail Textures) SetOutPath "$INSTDIR\w40k\Data\Art\scenarios\textures\detail" File "F:\W40k\Data\Art\scenarios\textures\detail\sand_dunes_gravel.dds" File "F:\W40k\Data\Art\scenarios\textures\detail\sand_dunes_sand_detail_01.dds" File "F:\W40k\Data\Art\scenarios\textures\detail\SnowfieldWF.dds" File "F:\W40k\Data\Art\scenarios\textures\detail\Snowfill.dds" File "F:\W40k\Data\Art\scenarios\textures\detail\mars.dds" File "F:\W40k\Data\Art\scenarios\textures\detail\mars3.dds" File "F:\W40k\Data\Art\scenarios\textures\detail\beach_sand_gravel.dds" File "F:\W40k\Data\Art\scenarios\textures\detail\beach_sand_ripple.dds" File "F:\W40k\Data\Art\scenarios\textures\detail\beach_water_ripple.dds This command sets the actual path for installing on the target computer, this path can diver depends on the decals you want to install (Decals) SetOutPath "$INSTDIR\w40k\Data\Art\Decals\custom" File "F:\W40k\Data\Art\Decals\custom\fluorites-crystals.dds" File "F:\W40k\Data\Art\Decals\custom\fluorites-crystals_02.dds" File "F:\W40k\Data\Art\Decals\custom\iceberg.dds" File "F:\W40k\Data\Art\Decals\custom\ice_cliff_02.dds" File "F:\W40k\Data\Art\Decals\custom\runescript-ice.dds" File "F:\W40k\Data\Art\Decals\custom\rune_infinity_ice.dds" File "F:\W40k\Data\Art\Decals\custom\snow&Ice_01.dds" File "F:\W40k\Data\Art\Decals\custom\snow&Ice_02.dds" File "F:\W40k\Data\Art\Decals\custom\snow01.dds" File "F:\W40k\Data\Art\Decals\custom\snow_cliff_01.dds" File "F:\W40k\Data\Art\Decals\custom\mars_dirt1.dds" File "F:\W40k\Data\Art\Decals\custom\mars_rock1.dds" More decals SetOutPath "$INSTDIR\w40k\Data\Art\Decals\urban" File "F:\W40k\Data\Art\Decals\urban\factory_roof_bay_door.dds" File "F:\W40k\Data\Art\Decals\urban\marker_warning_corner.dds" File "F:\W40k\Data\Art\Decals\urban\marker_warning_edge00.dds" File "F:\W40k\Data\Art\Decals\urban\marker_warning_edge90.dds" File "F:\W40k\Data\Art\Decals\urban\road_corner000.dds" File "F:\W40k\Data\Art\Decals\urban\road_corner090.dds" File "F:\W40k\Data\Art\Decals\urban\road_corner180.dds" File "F:\W40k\Data\Art\Decals\urban\road_corner270.dds" File "F:\W40k\Data\Art\Decals\urban\road_intersect.dds" File "F:\W40k\Data\Art\Decals\urban\road_straight00.dds" File "F:\W40k\Data\Art\Decals\urban\road_straight90.dds" File "F:\W40k\Data\Art\Decals\urban\road_t-junction000.dds" File "F:\W40k\Data\Art\Decals\urban\road_t-junction180.dds" File "F:\W40k\Data\Art\Decals\urban\road_t-junction270.dds" File "F:\W40k\Data\Art\Decals\urban\road_t-junction90.dds" More decals ... SetOutPath "$INSTDIR\w40k\Data\Art\Decals\symbols" File "F:\W40k\Data\Art\Decals\symbols\chapter_ultramarine.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_assault1.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_assault2.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_devestator1.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_devestator2.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_HQ1.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_HQ2.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_skull1.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_skull2.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_skull3.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_tactical1.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_tactical2.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_vetran1.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_vetran2.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_vetran3.dds" This part deleted the files from my BETA version of Gates of Ultramar, if they are already deleted no error will occure Delete "$INSTDIR\W40k\Data\scenarios\mp\Gates of Ultramar.sgb" Delete "$INSTDIR\\W40k\Data\scenarios\mp\Gates of Ultramar.tga" Delete "$INSTDIR\\W40k\Data\scenarios\mp\Gates of Ultramar_icon.tga" Delete "$INSTDIR\\W40k\Data\scenarios\mp\Gates of Ultramar_mm.tga" Delete "$INSTDIR\\W40k\Data\scenarios\mp\loading\Gates of Ultramar.tga" End of Hauptgruppe Section SectionEnd Section -Post SectionEnd 3. Компилирование. После редактирования скрипта, запускаем программу "MakeNSISW" и делаем то что указано на картинке: После нажатия, скрипт будет запущен и будет скомпилирован *.ехе файл, который и будет инсталяционным. З.Ы. Скоро последует перевод аннотаций скрипта Изменено 15 марта, 2013 пользователем jONES Ссылка на комментарий Поделиться на другие сайты Поделиться
GreatVV Опубликовано 12 апреля, 2006 Жалоба Поделиться Опубликовано 12 апреля, 2006 (изменено) Извини зубр. Я сделал черновой перевод. Найдешь ошибки исправляй. Тебе можно :) Вот вам экспресс перевод. От меня. ; Script generated by the HM NIS Edit Script Wizard. ; HM NIS Edit Wizard helper defines Имя твоего продукта !define PRODUCT_NAME "Gates of Ultramar" Версия !define PRODUCT_VERSION "1.0" Издатель(Распространитель) !define PRODUCT_PUBLISHER "Rayden" Сюда вставь линк на свою домашнюю страницу !define PRODUCT_WEB_SITE "http://forums.relicnews.com/showthread.php?t=57379" ;MUI 1.67 compatible ------ !include "MUI.nsh" ; MUI Settings !define MUI_ABORTWARNING Здесь ты можешь вставить путь к картинке, которая будет иконкой инсталятора !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" ; Страница приветствия !insertmacro MUI_PAGE_WELCOME ; Страница лицензии !define MUI_LICENSEPAGE_CHECKBOX Здесь ты можешь вставить текст твоего Readme на первую страницу инсталятора, это должен быть rtf потому что в нем ты можешь форматировать нормально текст, а поддерживается только *.txt and *.rtf !insertmacro MUI_PAGE_LICENSE "D:\Windows\Installer\Licence_Gou.rtf" ; Страница папки !insertmacro MUI_PAGE_DIRECTORY ; Страница Установки файлов !insertmacro MUI_PAGE_INSTFILES ; последняя страница !insertmacro MUI_PAGE_FINISH ; Язык файлов !insertmacro MUI_LANGUAGE "English" ; MUI end ------ Имя и версия продукта Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" Название генерируемое для файла OutFile "Gates of Ultramar.exe" Следущие две строчки читают установочную директорию их реестра InstallDir "$PROGRAMFILES\THQ\Dawn of War\w40k" InstallDirRegKey HKLM "SOFTWARE\THQ\Dawn of War" "InstallLocation" Это строка показывает различные распаковки, котрые будут показаны пользователю ShowInstDetails show Это первая часть групп установки section starts (Hauptgruppe = Главная группа smile.gif ) Section "Hauptgruppe" SEC01 Установи папку куда это будет устанавливаться. $INSTDIR это путь который ты можешь выбрать при установки SetOutPath "$INSTDIR\W40K\" Перезапись существующих файлов SetOverwrite ifnewer SetOverwrite try Эта команда определит настоящий путь установки на целевой компьютер! SetOutPath "$INSTDIR\w40k\Data\scenarios\mp\loading" File "F:\W40k\Data\scenarios\mp\loading\6p_gates_of_ultramar.tga" Эта команда установит действительный путь установки на целевой компьютер! (MP папка, где находятся карты) SetOutPath "$INSTDIR\w40k\Data\scenarios\mp" File "F:\W40k\Data\scenarios\mp\6p_gates_of_ultramar.sgb" File "F:\W40k\Data\scenarios\mp\6p_gates_of_ultramar.tga" File "F:\W40k\Data\scenarios\mp\6p_gates_of_ultramar_icon.tga" File "F:\W40k\Data\scenarios\mp\6p_gates_of_ultramar_mm.tga" Это вставляет мое Readme smile.gif SetOutPath "$INSTDIR\w40k\Data\scenarios" File "F:\W40k\Data\scenarios\GoU_Readme.txt" Эта команда установит действительный путь установки на целевой компьютер! (текстуры) SetOutPath "$INSTDIR\w40k\Data\Art\scenarios\textures\detail" File "F:\W40k\Data\Art\scenarios\textures\detail\sand_dunes_gravel.dds" File "F:\W40k\Data\Art\scenarios\textures\detail\sand_dunes_sand_detail_01.dds" File "F:\W40k\Data\Art\scenarios\textures\detail\SnowfieldWF.dds" File "F:\W40k\Data\Art\scenarios\textures\detail\Snowfill.dds" File "F:\W40k\Data\Art\scenarios\textures\detail\mars.dds" File "F:\W40k\Data\Art\scenarios\textures\detail\mars3.dds" File "F:\W40k\Data\Art\scenarios\textures\detail\beach_sand_gravel.dds" File "F:\W40k\Data\Art\scenarios\textures\detail\beach_sand_ripple.dds" File "F:\W40k\Data\Art\scenarios\textures\detail\beach_water_ripple.dds Эта команда установит действительный путь установки на целевой компьютер! (деколи)SetOutPath "$INSTDIR\w40k\Data\Art\Decals\custom" File "F:\W40k\Data\Art\Decals\custom\fluorites-crystals.dds" File "F:\W40k\Data\Art\Decals\custom\fluorites-crystals_02.dds" File "F:\W40k\Data\Art\Decals\custom\iceberg.dds" File "F:\W40k\Data\Art\Decals\custom\ice_cliff_02.dds" File "F:\W40k\Data\Art\Decals\custom\runescript-ice.dds" File "F:\W40k\Data\Art\Decals\custom\rune_infinity_ice.dds" File "F:\W40k\Data\Art\Decals\custom\snow&Ice_01.dds" File "F:\W40k\Data\Art\Decals\custom\snow&Ice_02.dds" File "F:\W40k\Data\Art\Decals\custom\snow01.dds" File "F:\W40k\Data\Art\Decals\custom\snow_cliff_01.dds" File "F:\W40k\Data\Art\Decals\custom\mars_dirt1.dds" File "F:\W40k\Data\Art\Decals\custom\mars_rock1.dds" еще деколи SetOutPath "$INSTDIR\w40k\Data\Art\Decals\urban" File "F:\W40k\Data\Art\Decals\urban\factory_roof_bay_door.dds" File "F:\W40k\Data\Art\Decals\urban\marker_warning_corner.dds" File "F:\W40k\Data\Art\Decals\urban\marker_warning_edge00.dds" File "F:\W40k\Data\Art\Decals\urban\marker_warning_edge90.dds" File "F:\W40k\Data\Art\Decals\urban\road_corner000.dds" File "F:\W40k\Data\Art\Decals\urban\road_corner090.dds" File "F:\W40k\Data\Art\Decals\urban\road_corner180.dds" File "F:\W40k\Data\Art\Decals\urban\road_corner270.dds" File "F:\W40k\Data\Art\Decals\urban\road_intersect.dds" File "F:\W40k\Data\Art\Decals\urban\road_straight00.dds" File "F:\W40k\Data\Art\Decals\urban\road_straight90.dds" File "F:\W40k\Data\Art\Decals\urban\road_t-junction000.dds" File "F:\W40k\Data\Art\Decals\urban\road_t-junction180.dds" File "F:\W40k\Data\Art\Decals\urban\road_t-junction270.dds" File "F:\W40k\Data\Art\Decals\urban\road_t-junction90.dds" и еще деколи ... SetOutPath "$INSTDIR\w40k\Data\Art\Decals\symbols" File "F:\W40k\Data\Art\Decals\symbols\chapter_ultramarine.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_assault1.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_assault2.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_devestator1.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_devestator2.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_HQ1.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_HQ2.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_skull1.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_skull2.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_skull3.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_tactical1.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_tactical2.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_vetran1.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_vetran2.dds" File "F:\W40k\Data\Art\Decals\symbols\spacemarine_vetran3.dds" Эта часть удаляет мои файлы бета версии Gates of Ultramar. Если они уже удалены то ошибка не вылезет Delete "$INSTDIR\W40k\Data\scenarios\mp\Gates of Ultramar.sgb" Delete "$INSTDIR\\W40k\Data\scenarios\mp\Gates of Ultramar.tga" Delete "$INSTDIR\\W40k\Data\scenarios\mp\Gates of Ultramar_icon.tga" Delete "$INSTDIR\\W40k\Data\scenarios\mp\Gates of Ultramar_mm.tga" Delete "$INSTDIR\\W40k\Data\scenarios\mp\loading\Gates of Ultramar.tga" End of Hauptgruppe Section SectionEnd Section -Post SectionEnd Хочу сказать что не надо печатать русский текст - удалите его. Или выделите его ";". Обратить внимание что все файлы путь на которые идут после команды File - это файлы, которые находятся на ТВОЕМ компе (т.е. того кто делает инсталятор), а все где есть $INSTDIR это те которые появятся на компьютере у того кто будет УСТАНАВЛИВАТЬ этот мод. З.Ы. Я мог вполне где то удалить запятые так что сверся с оригиналом З.Ы.Ы Спасибо зубру за то что снял Read Only Изменено 12 апреля, 2006 пользователем (Horde) ZuBR Ссылка на комментарий Поделиться на другие сайты Поделиться
Рекомендуемые сообщения
Пожалуйста, войдите, чтобы комментировать
Вы сможете оставить комментарий после входа в
Войти