Difference between revisions of "Getting Lazarus/ru"

From Lazarus wiki
Jump to navigationJump to search
Line 123: Line 123:
  
 
===Цели Make===
 
===Цели Make===
====помощь по make====
+
====Помощь по make====
  
To see a list of available targets for '''''make''''' type [[make help]]. Note: "'''make help'''" exists since 1.0. Here is the output of "'''make help'''":
+
Чтобы просмотреть список доступных целей для '''''make''''', наберите [[make help]]. Примечание: "'''make help'''" существует с [версии Лазаруса] 1.0. Вот вывод команды "'''make help'''":
  
  
Line 132: Line 132:
  
 
  Main targets
 
  Main targets
                   Without any target, target 'all' will be invoked.
+
                   Without any target, target 'all' will be invoked.                          |Без какой-либо цели будет вызываться цель 'all'.
   all            build all needed, i.e. minimal IDE, lazbuild, startlazarus.
+
   all            build all needed, i.e. minimal IDE, lazbuild, startlazarus.                |собрать все необходимое, то есть минимальную IDE, lazbuild, startlazarus.
   clean          deletes files that 'bigide' creates. It does not clean up all possible
+
   clean          deletes files that 'bigide' creates. It does not clean up all possible     |удаляет файлы, которые создает 'bigide'. Он не очищает все возможные
                   targets. Clean other target: make clean LCL_PLATFORM=qt
+
                   targets. Clean other target: make clean LCL_PLATFORM=qt                    |цели. Очистить другую цель: make clean LCL_PLATFORM=qt
   distclean      Clean all targets and common leftovers.
+
   distclean      Clean all targets and common leftovers.                                    |Очистить все цели и общие остатки.
   lazbuild      build lazbuild and lcl with nogui widgetset
+
   lazbuild      build lazbuild and lcl with nogui widgetset                               |собрать lazbuild и lcl с набором виджетов nogui
   bigide        as all, except that the IDE is built with a lot of extra packages
+
   bigide        as all, except that the IDE is built with a lot of extra packages         |аналогично 'all', кроме того, что IDE собрал с большим количеством дополнительных пакетов 
   useride        calls lazbuild to build an IDE with your active profile, requires lazbuild
+
   useride        calls lazbuild to build an IDE with your active profile, requires lazbuild |вызывает lazbuild для сборки IDE с вашим активным профилем, требует lazbuild
   install        installs Lazarus under /usr/local/share/lazarus
+
   install        installs Lazarus under /usr/local/share/lazarus                            |устанавливает Lazarus в /usr/local/share/lazarus
                   You can change the directory by appending INSTALL_PREFIX=/some/path
+
                   You can change the directory by appending INSTALL_PREFIX=/some/path        |Вы можете изменить каталог, добавив INSTALL_PREFIX=/some/path
  
 
  Sub targets
 
  Sub targets
   registration  build package FCL
+
   registration  build package FCL                                                          |сборка пакета FCL
   lazutils      build package LazUtils, requires registration
+
   lazutils      build package LazUtils, requires registration                             |сборка пакета LazUtils, требуется регистрация
   codetools      build package CodeTools, requires lazutils
+
   codetools      build package CodeTools, requires lazutils                                |сборка пакета CodeTools, требуется lazutils
   lcl            build package LCLBase and LCL, requires lazutils
+
   lcl            build package LCLBase and LCL, requires lazutils                           |сборка пакетов LCLBase и LCL, требует lazutils                         
   tools          build lazres, svn2revisioninc, updatepofiles, lrstolfm,
+
   tools          build lazres, svn2revisioninc, updatepofiles, lrstolfm,                    |сборка lazres, svn2revisioninc, updatepofiles, lrstolfm,
                   requires LCL with nogui widgetset
+
                   requires LCL with nogui widgetset                                         |требуется LCL с набором виджетов nogui
   basecomponents build debuggerintf, lazdebuggergdbmi, lazcontrols, synedit, ideintf
+
   basecomponents build debuggerintf, lazdebuggergdbmi, lazcontrols, synedit, ideintf        |сборка debuggerintf, lazdebuggergdbmi, lazcontrols, synedit, ideintf
                   for the LCL_PLATFORM, requires lcl
+
                   for the LCL_PLATFORM, requires lcl                                         |для LCL_PLATFORM требуется lcl                 
   bigidecomponents build many extra packages for the LCL_PLATFORM, requires basecomponents
+
   bigidecomponents build many extra packages for the LCL_PLATFORM, requires basecomponents  |сборка многих дополнительных пакетов для LCL_PLATFORM, требуются basecomponents
   lhelp          build lhelp, requires bigidecomponents
+
   lhelp          build lhelp, requires bigidecomponents                                    |сборка lhelp, требуются bigidecomponents
   starter        build startlazarus, requires basecomponents
+
   starter        build startlazarus, requires basecomponents                                |сборка startlazarus, требуются basecomponents
   examples      build basic examples, requires basecomponents                                                                                                      
+
   examples      build basic examples, requires basecomponents                             |сборка базовых примеров, требуются basecomponents                                                                                               
                   Note: There are more examples having their own directory                                                                                            
+
                   Note: There are more examples having their own directory                   |Примечание: есть еще примеры, имеющие собственный каталог                                                                         
 
                                                                                                                                                                        
 
                                                                                                                                                                        
 
  Flags:                                                                                                                                                                 
 
  Flags:                                                                                                                                                                 

Revision as of 23:46, 15 December 2018

Deutsch (de) English (en) español (es) français (fr) 日本語 (ja) polski (pl) português (pt) русский (ru) slovenčina (sk)



ENG: AT THE MOMENT THIS PAGE IS UNDER TRANSLATION.
RUS: В НАСТОЯЩИЙ МОМЕНТ СТРАНИЦА НАХОДИТСЯ В ПРОЦЕССЕ ПЕРЕВОДА.



Загрузка и установка релизной версии Lazarus

Из SourceForge

Бинарные выпуски для различных платформ доступны через площадку Lazarus Sourceforge.

Для тех, у кого заблокирован SF, релизы Lazarus от Sourceforge отзеркалированы на:

Конкретные для платформы

Получить Lazarus для Windows - используйте ссылку Sourceforge выше.

Получить Lazarus для ReactOS

Получить Lazarus для Ubuntu

Получить Lazarus для Fedora

Получить Lazarus для Suse

Получить Lazarus для Mandriva

Получить Lazarus для Scientific Linux

Получить Lazarus для Raspberry Pi (Raspbian)

Получить Lazarus для Mac

Lazarus on Solaris

Получение SVN клиента

TortoiseSVN клиент

Клиент TortoiseSVN предназначен только для Windows. Вы можете скачать его с http://tortoisesvn.tigris.org/.



Прим.перев.: На момент перевода статьи загрузить TortoiseSVN можно здесь. Также можно скачать и установить руссификаторы для x32 и x64 версии программы.

Приятным бонусом к руссификатору идет и русская справка в chm-формате

TortoiseSVN chm rus.png


Эта страница демонстрирует, как загрузить и обновить исходный код Lazarus SVN, но таким же образом его можно использовать для исходного кода FPC.

Другие клиенты

Клиент командной строки SVN доступен на официальном SVN веб-сайте для многих платформ.

В Linux рекомендуется установить subversion, используя систему управления пакетами, предлагаемую вашим дистрибутивом. Например:

 sudo apt-get install subversion

Получение Lazarus с сервера Subversion

Версия Lazarus для разработчиков

Чтобы получить Lazarus в первый раз, используйте командную строку:

svn co https://svn.freepascal.org/svn/lazarus/trunk lazarus

Тогда в текущем каталоге создастся новый каталог "lazarus".

Исправленная ветка последней версии Lazarus

Это даст вам последний релиз плюс все коммиты с исправлением ошибок с тех пор. На момент написания статьи последний [стабильный] релиз 1.8.x.

svn co https://svn.freepascal.org/svn/lazarus/branches/fixes_1_8/ lazarus_1_8

Позже просто замените последнюю числовую часть номерами последней версии.

Обновление исходников позже

Откройте терминал/командную строку, перейдите в каталог lazarus и введите:

 svn update

Используйте вышеупомянутые URL с другими клиентами SVN и обновляйте команды соответственно.

Чтобы скомпилировать среду, см. Сборка и запуск Lazarus.

Сценарии

Существуют скрипты для Windows и Linux для автоматизации загрузки и сборки Lazarus: Scripts for Lazarus

Сборка и запуск Lazarus

См. Installing Lazarus - подробное руководство по установке.

Использование командной строки

Lazarus поставляется с автоматически сгенерированным Makefile (с именем "Makefile") для утилиты gnu "make".

Warning-icon.png

Предупреждение: If you also have Embarcadero (or Borland) tools installed, their "make" might conflict with gnu "make". In that case you can either delete or rename the conflicting Embarcadero binary, or remove its directory from Windows PATH, or set the path in the console before calling make: Если у вас также установлены инструменты Embarcadero (или Borland), их "make" может конфликтовать с gnu "make". В этом случае вы можете либо удалить или переименовать конфликтующий двоичный файл Embarcadero, либо удалить его каталог из Windows PATH, либо задать путь в консоли перед вызовом make:

 set path=c:\pascal\3.0.4\bin\i386-win32;%path%

make позволяет легко компилировать Lazarus из командной строки. Сначала вам нужно установить и настроить fpc и fpc-пакеты.

Для компиляции перейдите в каталог Lazarus в вашем терминале и наберите

make

Это должно пересобрать LCL и Lazarus IDE с установленными базовыми пакетами.

Еще одна полезная команда

make bigide

, которая добавляет те же пакеты, что и в версии выпуска.

Затем вы можете запустить Lazarus из той же исходной директории с помощью команды "lazarus" (в системах Unix "./lazarus").

Если вы хотите запустить несколько версий, вы можете настроить lazarus на использование определенных каталогов конфигурации с помощью параметра --pcp, например, :

 lazarus --pcp=/home/YOU/myLaz19

Цели Make

Помощь по make

Чтобы просмотреть список доступных целей для make, наберите make help. Примечание: "make help" существует с [версии Лазаруса] 1.0. Вот вывод команды "make help":


 
make help 

 Main targets
                  Without any target, target 'all' will be invoked.                          |Без какой-либо цели будет вызываться цель 'all'.
   all            build all needed, i.e. minimal IDE, lazbuild, startlazarus.                |собрать все необходимое, то есть минимальную IDE, lazbuild, startlazarus.
   clean          deletes files that 'bigide' creates. It does not clean up all possible     |удаляет файлы, которые создает 'bigide'. Он не очищает все возможные 
                  targets. Clean other target: make clean LCL_PLATFORM=qt                    |цели. Очистить другую цель: make clean LCL_PLATFORM=qt
   distclean      Clean all targets and common leftovers.                                    |Очистить все цели и общие остатки.
   lazbuild       build lazbuild and lcl with nogui widgetset                                |собрать lazbuild и lcl с набором виджетов nogui 
   bigide         as all, except that the IDE is built with a lot of extra packages          |аналогично 'all', кроме того, что IDE собрал с большим количеством дополнительных пакетов   
   useride        calls lazbuild to build an IDE with your active profile, requires lazbuild |вызывает lazbuild для сборки IDE с вашим активным профилем, требует lazbuild
   install        installs Lazarus under /usr/local/share/lazarus                            |устанавливает Lazarus в /usr/local/share/lazarus
                  You can change the directory by appending INSTALL_PREFIX=/some/path        |Вы можете изменить каталог, добавив INSTALL_PREFIX=/some/path

 Sub targets
   registration   build package FCL                                                          |сборка пакета FCL
   lazutils       build package LazUtils, requires registration                              |сборка пакета LazUtils, требуется регистрация
   codetools      build package CodeTools, requires lazutils                                 |сборка пакета CodeTools, требуется lazutils
   lcl            build package LCLBase and LCL, requires lazutils                           |сборка пакетов LCLBase и LCL, требует lazutils                           
   tools          build lazres, svn2revisioninc, updatepofiles, lrstolfm,                    |сборка lazres, svn2revisioninc, updatepofiles, lrstolfm,
                  requires LCL with nogui widgetset                                          |требуется LCL с набором виджетов nogui
   basecomponents build debuggerintf, lazdebuggergdbmi, lazcontrols, synedit, ideintf        |сборка debuggerintf, lazdebuggergdbmi, lazcontrols, synedit, ideintf
                  for the LCL_PLATFORM, requires lcl                                         |для LCL_PLATFORM требуется lcl                  
   bigidecomponents build many extra packages for the LCL_PLATFORM, requires basecomponents  |сборка многих дополнительных пакетов для LCL_PLATFORM, требуются basecomponents
   lhelp          build lhelp, requires bigidecomponents                                     |сборка lhelp, требуются bigidecomponents
   starter        build startlazarus, requires basecomponents                                |сборка startlazarus, требуются basecomponents
   examples       build basic examples, requires basecomponents                              |сборка базовых примеров, требуются basecomponents                                                                                                 
                  Note: There are more examples having their own directory                   |Примечание: есть еще примеры, имеющие собственный каталог                                                                          
                                                                                                                                                                       
 Flags:                                                                                                                                                                
   PP=/path/to/fpc        use another compiler                                                                                                                         
   USESVN2REVISIONINC=0   do not update ide/revision.inc                                                                                                               
   INSTALL_PREFIX=/usr    used by 'install' as path prefix                                                                                                             
   FPC_DIR=/usr/share/fpcsrc/3.0.4   used by fpcmake when regenerating Makefiles                                                                                       
   OPT='-vwnbq -gh'       append these options when calling the compiler                                                                                               
                                                                                                                                                                       
 Usage examples:                                                                                                                                                       
                                                                                                                                                                       
 Update svn and build a minimal IDE, startlazarus and lazbuild:                                                                                                      
   make clean                                                                                                                                                          
   svn up                                                                                                                                                               
   make clean all                                                                                                                                                      
                                                                                                                                                                       
 Note: You can start lazarus with 'startlazarus'                                                                                                                       
 Note: Use the IDE or lazbuild to compile your projects/packages.                                                                                                      
                                                                                                                                                                       
 Update svn and build an IDE with your last set of packages:                                                                                                         
   make clean                                                                                                                                                          
   svn up                                                                                                                                                              
   make clean lazbuild useride                                                                                                                                         
                                                                                                                                                                       
 Clean up:                                                                                                                                                             
  There is no command to clean up a svn repository completely, but                                                                                                     
  you can use the following command under Linux/OS X:                                                                                                                  
  svn status | grep '\?' | sed -e 's/\? *//' | xargs rm -r                                                                                                             
                                                                                                                                                                       
  Another possibility is to create a clean copy via the svn export command.                                                                                            
                                                                                                                                                                       
 Install:                                                                                                                                                              
   Note: You can use Lazarus without installing. Just start the lazarus executable.                                                                                    
   1. Build Lazarus as normal user with one of the above commands.                                                                                                     
   2. Install as root into /usr                                                                                                                                        
          sudo make install
      This installs startlazarus, lazarus-ide, lazbuild under /usr/bin
      and copies the whole lazarus source directory to /usr/share/lazarus

Make parameters

There are additional parameters which can be used to make Lazarus. See a fully working example above.

  • OPT=%compiler_switches

the %compiler_switches is passed to each fpc call. The option is useful for specifying defines

For example:

 make bigide OPT="-dNoGdkPixBufLib -gw2" 

makes LCL and ide with NoGdkPixBufLib defined and dwarf2 debug info.

  • LCL_PLATFORM=%platform

%platform is the target widgetset. It can be win32,wince,gtk,gtk2,qt,carbon,cocoa,customdrawn.

For example:

 make LCL_PLATFORM=gtk2

Rebuilds LCL and IDE for gtk2 widgetset

  • FPC=%compiler_path

or

  • PP=%compiler_path

%compiler_path is the path+filename to a custom compiler binary you want to build the target with.

such as:

make FPC="~/Pfad/fpc"

Development versions from Git

There is a Git mirror of the official SubVersion repository being maintained on GitHub. This mirror gets sync'ed every 15 minutes with the SubVersion repository. For more information on getting Git and cloning the Lazarus repository, follow this link: Git Mirrors. You can also use git directly with SubVersion server using git-svn link. See Lazarus git-svn for details.

Browse the Source Repository with a Web Browser

The contents of the SVN archive can also be browsed with your web-browser through this viewcvs interface.

Lazarus Distributions

There are some unofficial sites where you can find Lazarus and Free Pascal too:


See also