Getting Lazarus/pl: what changed
Revision 3 to 4. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | 1 | Pobieranie Lazarusa | |
| 2 | 2 | ||
| 3 | 3 | ## Pobierz i zainstaluj oficjalną wersję programu Lazarus | |
| 4 | 4 | ||
| 5 | 5 | ### Z systemu SourceForge | |
| 6 | 6 | ||
| 7 | 7 | Wersje binarne dla różnych platform dostępne są w [strefie pobierania na Lazarus Sourceforge](https://sourceforge.net/projects/lazarus/files/). | |
| 8 | 8 | ||
| 9 | 9 | Dla osób, które mają zablokowany dostęp do SF, wydania Lazarusa z Sourceforge są dostępne na: | |
| 10 | 10 | ||
| 11 | 11 | - <ftp://ftp.freepascal.org/pub/lazarus/releases/> | |
| 12 | 12 | - następnie na stronie (synchronizowane po pewnym czasie) <http://michael-ep3.physik.uni-halle.de/Lazarus/releases/> | |
| 13 | 13 | - oraz <http://mirrors.iwi.me/lazarus/> | |
| 14 | 14 | ||
| 15 | 15 | ### Dla konkretnej platformy | |
| 16 | 16 | ||
| 17 | 17 | Aby pobrać Lazarusa dla Windows - użyj powyższego linku Sourceforge. | |
| 18 | 18 | ||
| 19 | 19 | [[ReactOS/pl|Pobierz Lazarusa dla ReactOS]] | |
| 20 | 20 | ||
| 21 | 21 | [[Lazarus release version for Ubuntu/pl|Pobierz Lazarusa dla Ubuntu]] | |
| 22 | 22 | ||
| 23 | 23 | [[Install on Fedora/pl|Pobierz Lazarusa dla Fedora]] | |
| 24 | 24 | ||
| 25 | 25 | [[Lazarus release version for Suse/pl|Pobierz Lazarusa dla Suse]] | |
| 26 | 26 | ||
| 27 | 27 | [[Scientific Linux/pl|Pobierz Lazarusa dla Scientific Linux]] | |
| 28 | 28 | ||
| 29 | 29 | [[Lazarus on Raspberry Pi|Pobierz Lazarusa dla Raspberry Pi (Raspbian)]] | |
| 30 | 30 | ||
| 31 | 31 | [[Installing Lazarus on macOS|Pobierz Lazarusa dla Mac]] | |
| 32 | 32 | ||
| 33 | 33 | [[Lazarus on Solaris|Lazarus na Solaris]] | |
| 34 | 34 | ||
| 35 | 35 | ## Uzyskanie klienta Git | |
| 36 | 36 | ||
| 37 | 37 | ### Klient TortoiseGit | |
| 38 | 38 | ||
| 39 | 39 | Klient TortoiseGit dostępny jest tylko dla systemu Windows. Możesz go pobrać z <https://tortoisegit.org/> | |
| 40 | 40 | ||
| 41 | 41 | ### Git dla Windows | |
| 42 | 42 | ||
| 43 | 43 | Klient wiersza poleceń: | |
| 44 | 44 | ||
| 45 | 45 | <https://gitforwindows.org/> <https://git-scm.com/download/win> | |
| 46 | 46 | ||
| 47 | 47 | ### Inni klienci | |
| 48 | 48 | ||
| 49 | 49 | Klient wiersza poleceń GIT jest dostępny pod adresem <https://git-scm.com/downloads> dla wielu platform. | |
| 50 | 50 | ||
| 51 | 51 | W systemie Linux zaleca się zainstalowanie *git* przy użyciu systemu zarządzania pakietami właściwemu dla twojej dystrybucji. Na przykład: | |
| 52 | 52 | ||
| 53 | - | ||
| 53 | + | ```text | |
| 54 | + | sudo apt-get install git | |
| 55 | + | ``` | |
| 54 | 56 | ||
| 55 | 57 | ## Pobieranie Lazarusa z serwera GitLab | |
| 56 | 58 | ||
| 57 | 59 | ### Wersja rozwojowa Lazarusa | |
| 58 | 60 | ||
| 59 | 61 | Aby zdobyć Lazarusa po raz pierwszy, użyj wiersza poleceń: | |
| 60 | 62 | ||
| 61 | - | ||
| 63 | + | ```text | |
| 64 | + | git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git lazarus | |
| 65 | + | ``` | |
| 62 | 66 | ||
| 63 | 67 | W bieżącym katalogu zostanie utworzony nowy katalog o nazwie „lazarus”. | |
| 64 | 68 | ||
| 65 | 69 | ### Naprawcza gałąź najnowszej wersji Lazarusa | |
| 66 | 70 | ||
| 67 | 71 | Przejdź do katalogu „lazarus” utworzonego przez powyższe polecenie **git clone** i uruchom polecenie | |
| 68 | 72 | ||
| 69 | - | ||
| 73 | + | ```text | |
| 74 | + | git switch fixes_2_2 | |
| 75 | + | ``` | |
| 70 | 76 | ||
| 71 | 77 | Zmień nazwę gałęzi (ang. branch) zgodnie z wybraną wersją poprawek. Pobierz listę za pomocą | |
| 72 | 78 | ||
| 73 | - | ||
| 79 | + | ```text | |
| 80 | + | git branch --all | |
| 81 | + | ``` | |
| 74 | 82 | ||
| 75 | 83 | Wynik będzie zawierał wiersze podobne do | |
| 76 | 84 | ||
| 77 | - | ||
| 85 | + | ```text | |
| 86 | + | remote/origin/fixes_2_2 | |
| 87 | + | ``` | |
| 78 | 88 | ||
| 79 | 89 | Nazwa gałęzi to tylko ostatnia część ścieżki. | |
| 80 | 90 | ||
| 81 | 91 | ### Następnie zaktualizuj kod źródłowy | |
| 82 | 92 | ||
| 83 | 93 | Otwórz terminal/wiersz poleceń, przejdź do katalogu „lazarus” i wpisz: | |
| 84 | 94 | ||
| 85 | - | ||
| 86 | - | ||
| 95 | + | ```text | |
| 96 | + | git switch main | |
| 97 | + | git pull | |
| 98 | + | ``` | |
| 87 | 99 | ||
| 88 | 100 | zamiast gałęzi main możesz chcieć określić gałąź poprawek. | |
| 89 | 101 | ||
| 90 | 102 | Aby skompilować Lazarusa zobacz to. | |
| 91 | 103 | ||
| 92 | 104 | ## Skrypty | |
| 93 | 105 | ||
| 94 | 106 | Istnieją skrypty dla systemów Windows i Linux, które automatyzują pobieranie i budowanie Lazarusa: [[LazarusScripts|Skrypty dla Lazarusa]] | |
| 95 | 107 | ||
| 96 | 108 | ## Kompilowanie i uruchamianie Lazarusa | |
| 97 | 109 | ||
| 98 | 110 | Zobacz szczegółowy przewodnik instalacji - [[Installing Lazarus|Instalowanie Lazarusa]]. | |
| 99 | 111 | ||
| 100 | 112 | ### Korzystanie z wiersza poleceń | |
| 101 | 113 | ||
| 102 | 114 | Lazarus jest dostarczany z automatycznie wygenerowanym plikiem **Makefile** (o nazwie „Makefile”) dla narzędzi gnu „**make**”. | |
| 103 | 115 | ||
| 104 | 116 | > **Warning:** Jeśli masz również zainstalowane narzędzia Embarcadero (lub Borland), ich polecenie „make” może kolidować z gnu „make”. W takim przypadku możesz usunąć lub zmienić nazwę pliku binarnego powodującego konflikt z Embarcadero, usunąć jego katalog z Windows PATH lub ustawić ścieżkę w konsoli przed wywołaniem *make*: | |
| 105 | 117 | > | |
| 106 | 118 | > set path=c:\pascal\3.2.0\bin\i386-win32;%path% | |
| 107 | 119 | ||
| 108 | 120 | > **Warning:** „make” może również zawieść, jeśli masz na swojej ścieżce powłokę (taką jak sh.exe). Zależy to od tego, jak ta powłoka interpretuje cudzysłowy i odwrotne ukośniki. | |
| 109 | 121 | ||
| 110 | 122 | **make** pozwala łatwo skompilować Lazarusa z wiersza poleceń. Musisz najpierw zainstalować i skonfigurować fpc i fpc-packages. | |
| 111 | 123 | ||
| 112 | 124 | Aby uruchomić kompilację, przejdź do katalogu Lazarus w swoim terminalu i wpisz: | |
| 113 | 125 | ||
| 114 | - | ||
| 126 | + | ```text | |
| 127 | + | make | |
| 128 | + | ``` | |
| 115 | 129 | ||
| 116 | 130 | Powinno to odbudować LCL i Lazarus IDE z zainstalowanymi podstawowymi pakietami. | |
| 117 | 131 | ||
| 118 | 132 | Innym przydatnym poleceniem jest | |
| 119 | 133 | ||
| 120 | - | ||
| 134 | + | ```text | |
| 135 | + | make bigide | |
| 136 | + | ``` | |
| 121 | 137 | ||
| 122 | 138 | które dodaje te same pakiety, które ma wersja oficjalna. | |
| 123 | 139 | ||
| 124 | 140 | Następnie możesz uruchomić Lazarusa z tego samego katalogu źródłowego za pomocą polecenia „lazarus” (w systemach uniksowych „./lazarus”). | |
| 125 | 141 | ||
| 126 | 142 | Jeśli chcesz uruchomić kilka wersji, możesz nakazać lazarusowi użycie określonych katalogów konfiguracyjnych za pomocą opcji --pcp, np. : | |
| 127 | 143 | ||
| 128 | - | ||
| 144 | + | ```text | |
| 145 | + | lazarus --pcp=/home/TY/myLaz19 | |
| 146 | + | ``` | |
| 129 | 147 | ||
| 130 | 148 | ### Cele kompilacji | |
| 131 | 149 | ||
| 132 | 150 | Celem kompilacji nie zawsze musi być tylko i wyłącznie główny program. Czasami możemy chcieć skompilować tylko część programu. Wykonać to możemy za pomocą dodatkowych komend. | |
| 133 | 151 | ||
| 134 | 152 | #### make help | |
| 135 | 153 | ||
| 136 | 154 | Aby zobaczyć listę dostępnych celów dla ***make*** wykonaj polecenie [[make help]]. Uwaga: „**make help**” istnieje od wersji 1.0. A oto wynik polecenia „**make help**”: | |
| 137 | 155 | ||
| 138 | 156 | ``` bash | |
| 139 | 157 | ||
| 140 | 158 | make help | |
| 141 | 159 | ||
| 142 | 160 | Main targets | |
| 143 | 161 | Without any target, target 'all' will be invoked. | |
| 144 | 162 | all build all needed, i.e. minimal IDE, lazbuild, startlazarus. | |
| 145 | 163 | clean deletes files that 'bigide' creates. It does not clean up all possible | |
| 146 | 164 | targets. Clean other target: make clean LCL_PLATFORM=qt | |
| 147 | 165 | distclean Clean all targets and common leftovers. | |
| 148 | 166 | lazbuild build lazbuild and lcl with nogui widgetset | |
| 149 | 167 | bigide as all, except that the IDE is built with a lot of extra packages | |
| 150 | 168 | useride calls lazbuild to build an IDE with your active profile, requires lazbuild | |
| 151 | 169 | install installs Lazarus under /usr/local/share/lazarus | |
| 152 | 170 | You can change the directory by appending INSTALL_PREFIX=/some/path | |
| 153 | 171 | ||
| 154 | 172 | Sub targets | |
| 155 | 173 | registration build package FCL | |
| 156 | 174 | lazutils build package LazUtils, requires registration | |
| 157 | 175 | codetools build package CodeTools, requires lazutils | |
| 158 | 176 | lcl build package LCLBase and LCL, requires lazutils | |
| 159 | 177 | tools build lazres, svn2revisioninc, updatepofiles, lrstolfm, | |
| 160 | 178 | requires LCL with nogui widgetset | |
| 161 | 179 | basecomponents build debuggerintf, lazdebuggergdbmi, lazcontrols, synedit, ideintf | |
| 162 | 180 | for the LCL_PLATFORM, requires lcl | |
| 163 | 181 | bigidecomponents build many extra packages for the LCL_PLATFORM, requires basecomponents | |
| 164 | 182 | lhelp build lhelp, requires bigidecomponents | |
| 165 | 183 | starter build startlazarus, requires basecomponents | |
| 166 | 184 | examples build basic examples, requires basecomponents | |
| 167 | 185 | Note: There are more examples having their own directory | |
| 168 | 186 | ||
| 169 | 187 | Flags: | |
| 170 | 188 | PP=/path/to/fpc use another compiler | |
| 171 | 189 | USESVN2REVISIONINC=0 do not update ide/revision.inc | |
| 172 | 190 | INSTALL_PREFIX=/usr used by 'install' as path prefix | |
| 173 | 191 | FPC_DIR=/usr/share/fpcsrc/3.0.4 used by fpcmake when regenerating Makefiles | |
| 174 | 192 | OPT='-vwnbq -gh' append these options when calling the compiler | |
| 175 | 193 | ||
| 176 | 194 | Usage examples: | |
| 177 | 195 | ||
| 178 | 196 | Update svn and build a minimal IDE, startlazarus and lazbuild: | |
| 179 | 197 | make clean | |
| 180 | 198 | svn up | |
| 181 | 199 | make clean all | |
| 182 | 200 | ||
| 183 | 201 | Note: You can start lazarus with 'startlazarus' | |
| 184 | 202 | Note: Use the IDE or lazbuild to compile your projects/packages. | |
| 185 | 203 | ||
| 186 | 204 | Update svn and build an IDE with your last set of packages: | |
| 187 | 205 | make clean | |
| 188 | 206 | svn up | |
| 189 | 207 | make clean lazbuild useride | |
| 190 | 208 | ||
| 191 | 209 | Clean up: | |
| 192 | 210 | There is no command to clean up a svn repository completely, but | |
| 193 | 211 | you can use the following command under Linux/OS X: | |
| 194 | 212 | svn status | grep '\?' | sed -e 's/\? *//' | xargs rm -r | |
| 195 | 213 | ||
| 196 | 214 | Another possibility is to create a clean copy via the svn export command. | |
| 197 | 215 | ||
| 198 | 216 | Install: | |
| 199 | 217 | Note: You can use Lazarus without installing. Just start the lazarus executable. | |
| 200 | 218 | 1. Build Lazarus as normal user with one of the above commands. | |
| 201 | 219 | 2. Install as root into /usr | |
| 202 | 220 | sudo make install | |
| 203 | 221 | This installs startlazarus, lazarus-ide, lazbuild under /usr/bin | |
| 204 | 222 | and copies the whole lazarus source directory to /usr/share/lazarus | |
| 205 | 223 | ``` | |
| 206 | 224 | ||
| 207 | 225 | ### Parametry polecenia make | |
| 208 | 226 | ||
| 209 | 227 | Istnieją dodatkowe parametry, które można wykorzystać do stworzenia Lazarusa. Zobacz przykład powyżej. | |
| 210 | 228 | ||
| 211 | 229 | - **OPT**=%compiler_switches | |
| 212 | 230 | ||
| 213 | 231 | %compiler_switches jest przekazywany do każdego wywołania fpc. Opcja jest przydatna przy określaniu definicji | |
| 214 | 232 | ||
| 215 | 233 | Na przykład: | |
| 216 | 234 | ||
| 217 | - | ||
| 235 | + | ```text | |
| 236 | + | make bigide OPT="-dNoGdkPixBufLib -gw2" | |
| 237 | + | ``` | |
| 218 | 238 | ||
| 219 | 239 | tworzy LCL i IDE z predefiniowaną opcją NoGdkPixBufLib i informacją o debugowaniu dwarf2. | |
| 220 | 240 | ||
| 221 | 241 | - **LCL_PLATFORM**=%platform | |
| 222 | 242 | ||
| 223 | 243 | %platform to docelowy zestaw [[Widgetset|widżetów]]. Może to być win32, wince, gtk, gtk2, qt, carbon, cocoa, customdrawn. | |
| 224 | 244 | ||
| 225 | 245 | Na przykład: | |
| 226 | 246 | ||
| 227 | - | ||
| 247 | + | ```text | |
| 248 | + | make LCL_PLATFORM=gtk2 | |
| 249 | + | ``` | |
| 228 | 250 | ||
| 229 | 251 | Przebudowuje LCL i IDE dla zestawu widżetów gtk2 | |
| 230 | 252 | ||
| 231 | 253 | - **FPC**=%compiler_path | |
| 232 | 254 | ||
| 233 | 255 | lub | |
| 234 | 256 | ||
| 235 | 257 | - **PP**=%compiler_path | |
| 236 | 258 | ||
| 237 | 259 | %compiler_path to ścieżka+nazwa pliku do niestandardowego pliku binarnego kompilatora, za pomocą którego chcesz zbudować kod wynikowy. | |
| 238 | 260 | ||
| 239 | 261 | jak na przykład: | |
| 240 | 262 | ||
| 241 | - | ||
| 263 | + | ```text | |
| 264 | + | make FPC="~/Pfad/fpc" | |
| 265 | + | ``` | |
| 242 | 266 | ||
| 243 | 267 | ## Przeglądaj repozytorium źródeł za pomocą przeglądarki internetowej | |
| 244 | 268 | ||
| 245 | 269 | Zawartość repozytorium GIT można również przeglądać za pomocą przeglądarki internetowej za pośrednictwem [interfejsu](https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/main). | |
| 246 | 270 | ||
| 247 | 271 | ## Dystrybucje Lazarusa | |
| 248 | 272 | ||
| 249 | 273 | Istnieje kilka nieoficjalnych stron, na których również można znaleźć Lazarusa i Free Pascala: | |
| 250 | 274 | ||
| 251 | 275 | - [NewPascal](http://newpascal.org) to wyselekcjonowana dystrybucja dla systemu Windows, która nie wymaga instalatora i zawiera kilka nowych funkcji. (jest bardzo nieaktualna) | |
| 252 | 276 | - Dystrybucja [getlazarus](http://www.getlazarus.org) łączy najnowocześniejsze wersje Lazarusa z łatwymi w użyciu skryptami instalacyjnymi dla kilku platform i dodatkowymi komponentami. | |
| 253 | 277 | - [FreeSparta](https://freesparta.com/) to komercyjna dystrybucja Lazarusa dla Windows. (witryna obecnie nieczynna) | |
| 254 | 278 | - Możesz pobrać obraz Ubuntu LiveCD z Austriackiego Uniwersytetu Nauk Stosowanych z linku <http://www.sigma-server.com/liveCD/Ubuntu-7.10-NTC-Lazarus.iso>, dla którego plik md5sum znajduje się tutaj <http://www.sigma-server.com/liveCD/Ubuntu-7.10-NTC-Lazarus.iso.md5>. | |
| 255 | 279 | - Dystrybucja [CodeTyphon](http://www.pilotlogic.com) łączy Lazarusa z dodatkowymi pakietami i komponentami. | |
| 256 | 280 | - [LiteZarus](https://github.com/x2nie/LiteZarus) to dystrybucja Lazarusa przeznaczona do tworzenia projektów innych niż w oparciu o LCL. | |
| 257 | 281 | - Lazarus jest dostępny na płytach CD i pamięciach USB w sklepie [Blaise Pascal Magazine](http://www.blaisepascal.eu). | |
| 258 | 282 | ||
| 259 | 283 | ## Zobacz także | |
| 260 | 284 | ||
| 261 | 285 | - [Forum: Wyjaśnienie instalacji z głównej gałęzi „trunk” w systemie Windows](http://forum.lazarus.freepascal.org/index.php/topic,36347.msg242123.html#msg242123) | |
| 262 | 286 | ||
| 263 | 287 | --- | |
| 264 | 288 | *From the Free Pascal wiki, page "Getting Lazarus/pl", as it stood on 2021-11-11 after a change by Slawek, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* | |
| 265 | 289 | Category: Install | |
| 266 | 290 | Category: Lazarus |
