Fajar Nugraha Wahyu
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Fajar Nugraha Wahyu

All About fajar and everything
 
IndeksIndeks  Latest imagesLatest images  PencarianPencarian  PendaftaranPendaftaran  LoginLogin  

 

 ABOUT LAZARUS

Go down 
PengirimMessage
Admin
Admin
Admin


Jumlah posting : 23
Join date : 13.10.12
Age : 27
Lokasi : Pamulang

ABOUT LAZARUS Empty
PostSubyek: ABOUT LAZARUS   ABOUT LAZARUS Icon_minitimeSat Nov 03, 2012 6:45 am

THIS ALL ABOUT LAZARUS
lol! Very Happy Smile
Lazarus adalah sebuah perpustakaan open source komponen visual dan IDE kuat untuk cepat lintas-platform pengembangan. The IDE contains all the features of a modern development suite, including a debugger, code completion, visual designers, refactoring tools, and translation and documentation tools. IDE berisi semua fitur dari rangkaian pembangunan modern, termasuk debugger, code completion, desainer visual, alat refactoring, dan terjemahan dan alat dokumentasi. The Lazarus Project started on Linux ten years ago and now runs on all major platforms: Linux, Windows and Mac OS X. The Lazarus Project's motto is “Write once compile anywhere”, and it provides cross-platform libraries, a cross-platform compiler and a cross-platform IDE. Proyek Lazarus di Linux mulai sepuluh tahun yang lalu dan sekarang berjalan pada semua platform utama: Linux, Windows dan Mac OS X. moto Proyek Lazarus adalah "Menulis cukup sekali mengkompilasi mana saja", dan menyediakan cross-platform perpustakaan, sebuah cross compiler-platform dan IDE cross-platform.
Lazarus' features include the following: Fitur Lazarus meliputi:
• An easy-to-learn language: Pascal. Mudah-untuk-belajar bahasa: Pascal.
• A visual form designer. Seorang desainer visual yang terbentuk.
• Producing native code executables that execute with speeds comparable to C/C++—no virtual machine here! Memproduksi executable asli yang mengeksekusi kode dengan kecepatan sebanding dengan C / C + +-tidak ada mesin virtual di sini!
• Allowing direct access to system libraries. Memungkinkan akses langsung ke perpustakaan sistem.
• Supporting embedded assembler code. Mendukung kode assembler tertanam.
• Easily handling big projects with millions of lines. Mudah menangani proyek-proyek besar dengan jutaan baris.
• Compatibility with the Delphi visual component library. Kompatibilitas dengan perpustakaan komponen visual Delphi.
And, if all that weren't enough, Lazarus also is open source and free of charge, even for commercial development. Dan, jika semua itu belum cukup, Lazarus juga adalah open source dan bebas bertanggung jawab, bahkan untuk pengembangan komersial. The Lazarus IDE is shown in Figure 1. Lazarus IDE ditunjukkan pada Gambar 1.

Figure 1. Gambar 1. Lazarus IDE Lazarus IDE
Free Pascal Compiler Free Pascal Compiler
Lazarus uses the powerful Free Pascal Compiler (FPC), which understands Object Pascal (a descendant of Pascal). Lazarus menggunakan Gratis kuat Kompiler Pascal (FPC), yang memahami Object Pascal (keturunan Pascal). Free Pascal (aka, FPK Pascal) is a 32- and 64-bit professional Object Pascal compiler. Free Pascal (alias, FPK Pascal) adalah 32 - profesional dan 64-bit compiler Object Pascal. It is available for the following operating systems: Linux, FreeBSD, Mac OS X/Darwin, DOS, Win32, Win64, WinCE, OS/2, Netware (libc and classic) and MorphOS, and for different processors: Intel x86, AMD64/x86_64, PowerPC, PowerPC64, SPARC and ARM. Ini tersedia untuk sistem operasi berikut: Linux, FreeBSD, Mac OS X / Darwin, DOS, Win32, Win64, WinCE, OS / 2, Netware (libc dan klasik) dan MorphOS, dan untuk prosesor yang berbeda: Intel x86, AMD64 / x86_64, PowerPC, PowerPC64, SPARC dan ARM. You can find binaries, packages and daily snapshots at the Free Pascal and Lazarus Web sites (see Resources). Anda dapat menemukan binari, paket dan snapshot harian di Free Pascal Lazarus dan Web situs (lihat Sumber). Free Pascal creates native code executables, like C and C++, and uses the GNU tools and object format, so it can use C libraries directly, and, of course, C/C++ code can use FPC libraries. Free Pascal menciptakan executable kode asli, seperti C dan C + +, dan menggunakan alat GNU dan format objek, sehingga dapat menggunakan perpustakaan secara langsung C, dan, tentu saja, C / C + + kode dapat menggunakan perpustakaan FPC. The speed and size of the created code is comparable to GCC. Kecepatan dan ukuran dari kode yang dibuat sebanding dengan GCC.
FPC also compiles fast—normally more than 10,000 lines of code per second. FPC juga mengkompilasi cepat-biasanya lebih dari 10.000 baris kode per detik. That is because in Object Pascal, forward declarations are more limited than in C/C++. Itu karena dalam Object Pascal, deklarasi maju lebih terbatas daripada di C / C + +. This saves a lot of time, even for small programs, and allows you to be more productive. Ini menghemat banyak waktu, bahkan untuk program kecil, dan memungkinkan Anda untuk menjadi lebih produktif. After a while, you'll compile without thinking, just to highlight even obvious errors. Setelah beberapa saat, Anda akan mengkompilasi tanpa berpikir, hanya untuk menyorot kesalahan bahkan jelas.
The Free Pascal Compiler itself is written entirely in Object Pascal. Free Pascal Compiler sendiri seluruhnya ditulis dalam Object Pascal. At the time of this writing, the compiler is at version 2.2.4. Pada saat penulisan ini, compiler adalah pada versi 2.2.4.
Note: Catatan:
FPC runs on more platforms than Lazarus. FPC berjalan pada platform lebih dari Lazarus. On those platforms, you can use the FP IDE, which runs in a terminal. Pada platform tersebut, Anda dapat menggunakan IDE FP, yang berjalan dalam terminal. The FP IDE usually is installed together with FPC and you can start it by typing fp . IDE FP biasanya diinstal bersama dengan FPC dan Anda dapat mulai dengan mengetik fp.
Like its ancestor Pascal, Object Pascal is very easy to learn. Seperti yang leluhur Pascal, Object Pascal sangat mudah dipelajari. C and Java programmers will understand most Pascal code without any tutorials. C dan Java programmer akan mengerti kode yang paling Pascal tanpa tutorial. The language is very type-strict, and many code inconsistencies are spotted at compile time. Bahasa ini sangat tipe-ketat, dan inkonsistensi kode banyak terlihat pada waktu kompilasi. This is especially useful for big projects, when a refactoring eventually is needed, and all affected places must be found. Hal ini sangat berguna untuk proyek-proyek besar, ketika refactoring yang akhirnya diperlukan, dan semua tempat yang terkena dampak harus ditemukan. The compiler also warns when a statement works on the current platform but may fail on another—for example, when an expression works differently on 32- and 64-bit systems. Compiler juga mengingatkan ketika pernyataan bekerja pada platform saat ini tetapi mungkin gagal pada yang lain-misalnya, ketika ekspresi sebuah karya berbeda pada 32 - dan 64-bit.
Lazarus Component Library and the IDE Lazarus Komponen Perpustakaan dan IDE
Lazarus gives FPC a face by providing the Lazarus Component Library (LCL), a library of visual components, such as buttons, edit fields, file dialogs and much more. Lazarus memberikan wajah FPC dengan menyediakan Komponen Lazarus Library (LCL), sebuah perpustakaan komponen visual, seperti tombol, mengedit bidang, dialog file dan lebih banyak. These components run on Linux, MS Windows, Mac OS X, FreeBSD and Solaris using native widgets. Komponen-komponen ini berjalan di Linux, MS Windows, Mac OS X, FreeBSD dan Solaris menggunakan widget asli. Additionally, on Linux, you have the choice between GTK or Qt as a back end. Selain itu, di Linux, Anda memiliki pilihan antara GTK atau Qt sebagai back end. The LCL calls the back-end widget sets and provides the glue between the platform-independent API and the widget set. LCL panggilan widget back-end set dan menyediakan perekat antara API platform-independen dan set widget. The code itself needs to access only the LCL API, so no change is required when switching the widget set. Kode itu sendiri perlu akses hanya API LCL, sehingga perubahan tidak diperlukan ketika berpindah set widget.
An LCL application compiled with GTK creates a native GTK application running on most Linux distributions out of the box. Sebuah aplikasi dikompilasi dengan GTK LCL menciptakan aplikasi GTK asli yang berjalan pada sebagian besar distribusi Linux keluar dari kotak. Under Windows, the choices are the WinAPI, GTK and Qt. Pada Windows, pilihan adalah WinAPI, GTK dan Qt. For Windows CE, the back end is called wince. Untuk Windows CE, bagian belakang disebut meringis. Under Mac OS X, the choices are Carbon, GTK and Qt. Dalam Mac OS X, pilihannya adalah Karbon, GTK dan Qt. The widget set can be chosen automatically by the IDE or selected manually in the dialog for the compiler options. Set widget dapat dipilih secara otomatis oleh IDE atau dipilih secara manual dalam dialog untuk pilihan kompiler. This allows you simply to copy a project developed under Linux to Windows and compile. Hal ini memungkinkan Anda cukup untuk menyalin proyek yang dikembangkan di Linux ke Windows dan kompilasi.
Some other LCL interfaces are under development—for example, fpgui, a widget set written completely in Object Pascal and Cocoa for the new Mac OS X libraries. Beberapa LCL lainnya sedang dalam pengembangan interface-misalnya, fpgui, widget set yang ditulis sepenuhnya dalam Object Pascal dan Kakao untuk Mac OS baru perpustakaan X. So, if you don't care about native widgets and you want your application to look and feel exactly the same on all platforms, you can make use of the LCL and the fpgui library, which currently runs on MS Windows, MS Windows CE and Linux with X. Jadi, jika Anda tidak peduli widget asli dan Anda ingin aplikasi Anda terlihat dan merasa persis sama pada semua platform, Anda dapat menggunakan LCL dan perpustakaan fpgui, yang saat ini berjalan pada MS Windows, MS Windows CE dan Linux dengan X.
The Lazarus IDE uses the LCL and has an integrated visual form designer, which allows you to edit forms graphically, like Glade or Trolltech's Qt Designer. Lazarus IDE menggunakan LCL dan memiliki desainer formulir terintegrasi visual, yang memungkinkan Anda untuk mengedit bentuk grafis, seperti Glade atau Trolltech Qt Designer yang. Lazarus' designer works directly with the corresponding Pascal unit source. Desainer Lazarus bekerja secara langsung dengan sumber Pascal satuan yang sesuai. For instance, double-clicking on a button in the designer automatically creates the OnClick in the source code and connects the button and the event handler. Misalnya, klik ganda pada sebuah tombol pada designer secara otomatis membuat OnClick dalam kode sumber dan menghubungkan tombol dan event handler. No further work is needed—simply compile and run. Tidak ada pekerjaan lebih lanjut diperlukan-hanya mengkompilasi dan menjalankan. And, it works backward too. Dan, ia bekerja mundur juga. Remove a method from the code, and the IDE will disconnect it from the designed form. Hapus metode dari kode, dan IDE akan lepaskan dari bentuk yang dirancang.
The IDE even supports connecting two designed forms. IDE bahkan mendukung menghubungkan dua bentuk yang dirancang. That means a component on form1 can access the components on form2. Itu berarti komponen pada Form1 dapat mengakses komponen pada Form2. No extra source code is required for this, just some mouse clicks. Tidak ada kode sumber tambahan diperlukan untuk ini, hanya beberapa klik mouse.
The designer also allows you to inherit forms visually. Desainer juga memungkinkan Anda untuk mewarisi bentuk visual. For example, a base form can be created for all of an application's dialogs. Misalnya, bentuk dasar dapat dibuat untuk semua dialog aplikasi. Descendants can be created visually that inherit from this dialog. Keturunan dapat dibuat visual yang mewarisi dari dialog ini. No extra source code is required. Tidak ada kode sumber tambahan diperlukan. Even embedding a form into another form as a subcomponent can be done visually. Bahkan menanamkan suatu bentuk menjadi bentuk yang lain sebagai subkomponen dapat dilakukan secara visual.
Of course, everything done in the designer can be done via source code at runtime too. Tentu saja, semuanya dilakukan pada designer dapat dilakukan melalui source code pada saat runtime juga. The form data is stored in .lfm files, which are simple text files, so they are cross-platform also. Data disimpan dalam bentuk. LFM file, yang adalah file teks sederhana, sehingga mereka adalah cross-platform juga.
Lazarus memberikan solusi kode yang luar biasa asli. The compiler and most libraries are written with cross-platform in mind. Compiler dan perpustakaan sebagian besar ditulis dengan cross-platform dalam pikiran. That is why programs written in Free Pascal do not need to run a configure script before compilation. Itu sebabnya program yang ditulis dalam Free Pascal tidak perlu menjalankan script configure sebelum kompilasi. The base types, like char, byte, integer and string, work the same on all platforms. Jenis dasar, seperti char, byte bilangan bulat, dan string, bekerja sama pada semua platform. An integer always is a signed 32-bit value. Integer selalu adalah sebuah nilai 32-bit ditandatangani. The 64-bit integer is called int64. Integer 64-bit disebut Int64. The native integer for a processor is called PtrInt for signed and PtrUInt for unsigned values. Integer asli untuk prosesor disebut PtrInt untuk ditandatangani dan PtrUInt untuk nilai unsigned. Lazarus itself can be compiled with a simple make or graphically in the IDE itself. Lazarus sendiri dapat dikompilasi dengan membuat sederhana atau grafis dalam IDE itu sendiri. And, of course, Lazarus is developed with Lazarus. Dan, tentu saja, Lazarus dikembangkan dengan Lazarus.
FPC's runtime library does not use libc; rather, it uses kernel functions, which change less often. Perpustakaan runtime FPC yang tidak menggunakan libc, melainkan menggunakan fungsi kernel, yang berubah lebih sering. Therefore, the created executables normally work on various Linux distributions and do not need to be recompiled for each new glibc version. Oleh karena itu, dibuat executable biasanya bekerja pada berbagai distribusi Linux dan tidak perlu dikompilasi ulang untuk setiap versi glibc baru.
With Lazarus, you can write and debug the biggest part under Linux. Dengan Lazarus, Anda dapat menulis dan debug bagian terbesar di Linux. But eventually, you'll need to test it on the other targets. Tapi akhirnya, Anda harus mengujinya pada target lain. However, you do not need to install Lazarus and all the development tools on all your target platforms. Namun, Anda tidak perlu menginstal Lazarus dan semua alat pengembangan pada semua platform target Anda. Cross compiling can be used to develop under Linux and target another operating system or processor. Palang kompilasi dapat digunakan untuk mengembangkan di Linux dan target sistem operasi lain atau prosesor. For example, you could develop under Linux and create Windows executables, and then test them with Wine or in a virtual machine running Windows, or on an actual Windows system. Misalnya, Anda dapat mengembangkan di Linux dan membuat executable Windows, dan kemudian menguji mereka dengan Wine atau dalam mesin virtual yang menjalankan Windows, atau pada sistem Windows yang sebenarnya. Cross compiling is a big time-saver, because it allows you to test on several platforms quickly and to use your favorite programs while developing. Palang kompilasi adalah besar penghemat waktu, karena memungkinkan Anda untuk menguji pada beberapa platform cepat dan menggunakan program favorit Anda saat berkembang.
Note, however, that cross compiling does require you to install the cross-compile tools and libraries, which can be tricky. Catatan, bagaimanapun, bahwa kompilasi silang tidak memerlukan Anda untuk menginstal cross-compile alat dan perpustakaan, yang bisa rumit. Precompiled versions do not yet exist for all possible hosts and targets. Versi dikompilasi belum ada untuk semua host mungkin dan target. Easy directions are provided for Linux to Windows, because of Wine, and for Windows to Windows CE, because there are installers with all needed tools. Mudah arah disediakan untuk Linux ke Windows, karena Anggur, dan Windows untuk Windows CE, karena ada installer dengan semua peralatan yang diperlukan.
Setting Up Cross Compiling Menyiapkan Palang Kompilasi
First, you need to cross compile and install the GNU binutils. Pertama, Anda perlu menyeberang mengkompilasi dan menginstal GNU binutils. This is well documented on several sites, including the Lazarus Wiki (see Resources). Hal ini didokumentasikan dengan baik di beberapa situs, termasuk Wiki Lazarus (lihat Sumber). For many targets, this is as simple as downloading a single tar.gz and running a script with some parameters. Bagi banyak target, ini adalah yang sederhana seperti men-download tar.gz tunggal dan menjalankan script dengan beberapa parameter.
The next step is to cross compile the Free Pascal libraries. Langkah berikutnya adalah untuk mengkompilasi silang Pascal perpustakaan gratis. If you want to cross compile to another processor type, you need to cross compile the compiler too. Jika Anda ingin menyeberang mengkompilasi ke jenis lain prosesor, Anda perlu menyeberang mengkompilasi compiler juga. Again, for many targets, complete scripts are available. Sekali lagi, untuk target banyak, script yang lengkap tersedia.
If your program requires third-party libraries, these must be cross compiled too. Jika program Anda membutuhkan pihak ketiga perpustakaan, ini harus lintas dikompilasi juga. If they are written completely in Object Pascal, normally you can just compile them. Jika mereka ditulis sepenuhnya dalam Object Pascal, biasanya Anda hanya dapat mengkompilasi mereka. Lazarus will do that automatically for you. Lazarus akan melakukannya secara otomatis untuk Anda. If they use system libraries, it can become difficult. Jika mereka menggunakan sistem perpustakaan, dapat menjadi sulit. The problems are then the same as for C/C++ compilers. Masalah kemudian sama untuk C / C + + compiler.
Once you've installed the cross compiler and libraries, cross compiling becomes easy in Lazarus. Setelah Anda menginstal cross compiler dan perpustakaan, lintas kompilasi menjadi mudah di Lazarus. Simply pass the -T option to the compiler. Cukup berikan opsi-T ke compiler. For example, pass -Twin32 to compile a 32-bit Windows executable instead of a Linux binary. Misalnya, lulus-Twin32 untuk mengkompilasi dieksekusi 32-bit Windows bukan biner Linux. The -P option defines the target processor. Opsi-P mendefinisikan prosesor target. Normally, you don't even need to pass special search paths, because of the path scheme used. Biasanya, Anda bahkan tidak perlu untuk melewati jalur pencarian khusus, karena skema jalur yang digunakan. For instance, the Pascal units for the fpc 2.3.1 compiler, for the processor type i386, and for target operating system Linux are installed under /usr/lib/fpc/2.3.1/units/i386-linux/. Misalnya, unit untuk compiler Pascal FPC 2.3.1, untuk prosesor i386 jenis, dan untuk target sistem operasi Linux diinstal di / usr/lib/fpc/2.3.1/units/i386-linux /. All filenames and search paths of the compiler and the IDE support macros, which greatly reduces the amount of command-line parameters and configuration settings. Semua nama file dan path pencarian dari kompiler dan macro dukungan IDE, yang sangat mengurangi jumlah parameter baris perintah dan pengaturan konfigurasi.
Lazarus reduces the amount of platform-specific settings even further. Lazarus mengurangi jumlah platform pengaturan spesifik lebih jauh. The IDE allows you to combine several source directories into a Lazarus package. IDE memungkinkan Anda untuk menggabungkan beberapa direktori sumber ke dalam suatu paket Lazarus. A Lazarus package can be a library or just a logical module of a big project. Paket Lazarus dapat menjadi perpustakaan atau hanya sebuah modul logis dari proyek besar. A package has its own search paths, its own compiler settings and its own macros. Sebuah paket memiliki jalur pencarian sendiri, pengaturan sendiri compiler dan macro sendiri. All filenames and search paths are stored relative to the configuration file (.lpk file). Semua nama file dan path pencarian disimpan relatif ke file konfigurasi (. LPK file). A package can use other packages and inherit search paths and compiler settings. Sebuah paket dapat menggunakan paket-paket lain dan mewarisi path pencarian dan pengaturan compiler. You can store a package anywhere on the disk. Anda dapat menyimpan paket mana saja pada disk. All search paths are adapted automatically on the fly. Semua path pencarian yang disesuaikan otomatis on the fly. And, because every source has its own namespace, there is seldom a name conflict. Dan, karena sumber setiap namespace sendiri, jarang ada konflik nama. You can switch to another version simply by opening the .lpk file. Anda dapat beralih ke versi lain hanya dengan membuka file. LPK. Each package also has its own output directories, normally one for each platform, which are created automatically. Masing-masing paket juga memiliki direktori output sendiri, biasanya satu untuk setiap platform, yang dibuat secara otomatis.
When a package's source file is changed, the IDE automatically compiles the package and all packages in the current project that depend on it. Ketika file sumber paket tersebut akan berubah, IDE secara otomatis mengkompilasi paket dan semua paket dalam proyek saat ini yang bergantung padanya. You can fine-tune this automation for each package. Anda dapat menyempurnakan otomatisasi ini untuk setiap paket.
When you switch the target platform in the IDE, all packages' output directories are switched. Bila Anda beralih platform target dalam IDE, direktori keluaran semua paket 'yang diaktifkan. The compiler options dialog is shown in Figure 2. Compiler pilihan dialog yang ditunjukkan pada Gambar 2.

Figure 2. Gambar 2. Lazarus Compiler Options Lazarus Compiler Pilihan
Lazarus mungkin cross-platform yang paling asli lingkungan pengembangan yang berjalan di Linux, Windows dan Mac OS X. Gunakan untuk membuat aplikasi asli dengan platform-independen kode.
Code Completion and Cross-Editing Kode Penyelesaian dan Cross-Mengedit
Most modern IDEs have some code-completion features. IDE paling modern memiliki beberapa kode-fitur selesai. The IDE uses Codetools to parse the sources. IDE menggunakan Codetools untuk mengurai sumber. Codetools is a library of parsers, search and refactoring tools and is independent of a specific compiler version. Codetools adalah library parser, pencarian dan alat refactoring dan independen dari versi compiler spesifik. This allows the IDE to handle several versions of the compiler and to switch between them easily. Hal ini memungkinkan IDE untuk menangani beberapa versi compiler dan untuk beralih di antara mereka dengan mudah.
It also supports cross-editing. Ini juga mendukung lintas-editing. For example, it's possible to develop under Linux and write code for Windows. Sebagai contoh, mungkin untuk mengembangkan di Linux dan menulis kode untuk Windows. When a cross-platform compiler is installed, simply set the target OS to Windows in the IDE. Ketika sebuah cross compiler-platform diinstal, cukup menetapkan target OS ke Windows dalam IDE. The IDE code navigation and code-completion features now will work as if you were working under Windows. IDE navigasi kode dan kode-fitur selesai sekarang akan bekerja sebagai jika Anda bekerja di bawah Windows. The following example illustrates this: Contoh berikut menggambarkan hal ini:
{$IFDEF Linux} {$ Ifdef Linux}
// write code for Linux here / / Menulis kode untuk Linux di sini
{$ENDIF} {$ ENDIF}
The curly brackets are compiler directives and work the same as C preprocessor directives. Tanda kurung kurawal adalah petunjuk compiler dan bekerja sama dengan arahan C preprocessor. The code between the directives will be skipped by the compiler except when compiling for Linux. Kode antara arahan akan dilewati oleh kompilator kecuali saat kompilasi untuk Linux. The IDE is a little bit smarter. IDE ini sedikit lebih cerdas. When a different target operating system is active, the enclosed code will in most instances act like a comment. Ketika sistem target yang berbeda operasi aktif, kode tertutup akan dalam kebanyakan kasus bertindak seperti komentar. However, tools such as find declaration still will work within this code so that you don't have to switch the target too often. Namun, alat-alat seperti menemukan deklarasi akan tetap bekerja dalam kode ini sehingga Anda tidak perlu beralih target terlalu sering. Some other macros that may be of use are: Beberapa macro lain yang mungkin digunakan adalah:
{$IFDEF MSWindows} {$ Ifdef MSWindows}
// code for all kinds of windows / / Kode untuk semua jenis jendela
{$ENDIF} {$ ENDIF}
{$IFDEF LCLGTK2} {$ Ifdef LCLGTK2}
// code when using GTK2 as widget set / / Kode saat menggunakan GTK2 sebagaimana widget
{$ENDIF} {$ ENDIF}
{$IFDEF big_endian} {$ Ifdef big_endian}
// code for big endian processors like the powerpc / / Kode untuk prosesor endian besar seperti powerpc
{$ENDIF} {$ ENDIF}
{$IFDEF CPU64} {$ Ifdef CPU64}
// code for 64 bit processors / / Kode untuk 64 bit prosesor
{$ENDIF} {$ ENDIF}
Generally though, high-level code doesn't need these macros, because the FPC system libraries provide most of the cross-platform functions and constants that you'll need. Umumnya meskipun, kode tingkat tinggi tidak perlu macro ini, karena sistem perpustakaan FPC menyediakan sebagian besar cross-platform fungsi dan konstanta yang Anda butuhkan. For example, the Lazarus IDE, with about 200,000 lines of code, uses them in less than 100 places. Misalnya, Lazarus IDE, dengan sekitar 200.000 baris kode, menggunakan mereka dalam waktu kurang dari 100 tempat.
Cross-Platform File Handling Cross-Platform Penanganan Berkas
There are numerous functions for cross-platform file handling that automatically use the correct path delimiter, case and other system specials. Ada berbagai fungsi untuk cross-platform penanganan file yang secara otomatis menggunakan pembatas jalan yang benar, kasus dan spesial sistem lainnya. Instead of using the slash to separate directories, you should use the constant PathDelim. Alih-alih menggunakan garis miring untuk direktori terpisah, Anda harus menggunakan PathDelim konstan. Under Linux, double path delimiters are treated as one, so you can concatenate filenames simply. Di Linux, pembatas jalan ganda diperlakukan sebagai satu, sehingga Anda dapat menggabungkan nama file sederhana. This does not work on MS Windows, where empty directory names are allowed. Ini tidak bekerja pada MS Windows, di mana nama direktori kosong yang diperbolehkan. Therefore, filenames should be normalized with one of the following functions: Oleh karena itu, nama file harus dinormalisasi dengan salah satu fungsi berikut:
• TrimFilename: removes leading and trailing spaces, combines double-path delimiters and does some minor cleanup. TrimFilename: menghilangkan terkemuka dan spasi, menggabungkan dua-jalur pembatas dan melakukan beberapa pembersihan kecil.
• CleanAndExpandFilename: expands the ~ for the home directory under Linux, trims the file as above and chomps any trailing path delimiter. CleanAndExpandFilename: memperluas ~ untuk direktori home di Linux, trim file seperti di atas dan chomps setiap pembatas jalan trailing.
• CleanAndExpandDirectory: works the same as CleanAndExpandFilename, but appends a delimiter if missing. CleanAndExpandDirectory: bekerja sama dengan CleanAndExpandFilename, tetapi menambahkan pembatas jika hilang.
A very useful function is CompareFilenames, which compares two strings encoded in UTF-8 in the usual manner for the operating system. Sebuah fungsi yang sangat berguna adalah CompareFilenames, yang membandingkan dua string dikodekan dalam UTF-8 dengan cara biasa untuk sistem operasi. Under Linux, it compares them case-sensitively and distinguishes the various encodings of an a-umlaut. Di Linux, membandingkan mereka kasus-sensitif dan membedakan berbagai pengkodean dari umlaut a-. Under Mac OS X, the filesystem is usually case-insensitive, and all a-umlauts are normalized and treated the same. Dalam Mac OS X, filesystem biasanya case-insensitive, dan semua a-umlauts dinormalisasi dan diperlakukan sama. CompareFilenames does not check the actual filesystem, which might be case-insensitive. CompareFilenames tidak memeriksa filesystem yang sebenarnya, yang mungkin case-insensitive. It is a quick compare function for sorting filenames. Ini adalah fungsi membandingkan cepat untuk menyortir nama file.
When your application needs to store some configuration files, use the function GetAppConfigFile to get the standard directory. Bila aplikasi Anda perlu untuk menyimpan beberapa file konfigurasi, gunakan GetAppConfigFile fungsi untuk mendapatkan direktori standar. Under Linux, this is /home/username/.config/projectname/. Di Linux, ini adalah / home / username / .config / ProjectName /. For configuration files, standard formats like XML or INI files are recommended, which can be created by the easy-to-use classes TXMLConfig in the unit xmlcfg and TIniFile in the unit INI files. Untuk file konfigurasi, format standar seperti XML atau file INI yang direkomendasikan, yang dapat diciptakan oleh-mudah-digunakan di kelas TXMLConfig xmlcfg unit dan TIniFile dalam file Unit INI.
Every operating system has its own idea of an application. Setiap sistem operasi memiliki ide sendiri aplikasi. Windows embeds the Explorer icon and version information in the binary. Jendela embeds ikon Explorer dan informasi versi dalam biner. Since Windows XP, a manifest file can be added to enable theme support. Sejak Windows XP, file manifest dapat ditambahkan untuk mengaktifkan mendukung tema. Under Mac OS X, an application is called an application bundle and is a directory with several XML and resource files. Dalam Mac OS X, sebuah aplikasi disebut bundel aplikasi dan direktori dengan XML dan file beberapa sumber daya. In the OS X Finder, the directory is shown as executable program, and the real files are hidden. Dalam OS X Finder, direktori ditampilkan sebagai program dieksekusi, dan file-file yang sebenarnya tersembunyi. A graphical application without this bundle file can be started but does not receive any input. Sebuah aplikasi grafis tanpa bundel file ini dapat dimulai, tetapi tidak menerima masukan apapun. The IDE automatically creates and updates these special files and structures for you. IDE secara otomatis membuat dan update file-file ini khusus dan struktur untuk Anda.
Extending the IDE Memperluas IDE
Many packages extend the IDE with useful tools and graphical editors. Banyak paket memperpanjang IDE dengan alat yang berguna dan editor grafis. Some examples follow. Beberapa contoh berikut.
For cross-platform OpenGL development, Lazarus provides a simple component named TOpenGLControl, which can be used on any LCL dialog. Untuk cross-platform pengembangan OpenGL, Lazarus menyediakan komponen sederhana bernama TOpenGLControl, yang dapat digunakan pada setiap dialog LCL. There are more-advanced third-party packages, like GLScene and Asmoday, that provide an object-oriented API for OpenGL. Ada lebih-maju pihak ketiga paket, seperti GLScene dan Asmoday, yang menyediakan API berorientasi obyek untuk OpenGL.
You can write cross-platform dæmons that run under Linux as dæmons and under MS Windows as services with the lazdaemon package. Anda dapat menulis lintas platform daemon yang berjalan di Linux sebagai daemon dan di bawah MS Windows sebagai layanan dengan paket lazdaemon.
There are several cross-platform packages for databases. Ada beberapa paket cross-platform untuk database. For example, the sqldblaz package provides cross-platform access and cross-database access to many common database systems. Misalnya, paket sqldblaz menyediakan cross-platform akses dan cross-database akses ke banyak sistem database umum.
Kesimpulan
This article gives a brief overview of how Lazarus and FPC make cross-platform development easy with a fast native compiler. Artikel ini memberikan gambaran singkat tentang bagaimana Lazarus dan FPC membuat cross-platform pengembangan yang mudah dengan compiler asli cepat. Developers have the choice to optimize as far as they want, even down to assembly level or by accessing system libraries directly. Pengembang memiliki pilihan untuk mengoptimalkan sejauh yang mereka inginkan, bahkan hingga ke tingkat perakitan atau dengan mengakses sistem perpustakaan secara langsung. The visual editors allow you to design dialogs and database applications quickly. Para editor visual yang memungkinkan Anda untuk merancang dialog dan aplikasi database dengan cepat. The package system greatly simplifies the structuring of large projects and porting and distributing code to other platforms. Sistem paket sangat menyederhanakan penataan proyek-proyek besar dan kode port dan mendistribusikan ke platform lainnya. The IDE cross-editing features allow developers to work under Linux and code for another target. IDE lintas-fitur editing memungkinkan pengembang untuk bekerja di bawah Linux dan kode untuk target lain.

Kembali Ke Atas Go down
https://fajarnugraha.indonesianforum.net
 
ABOUT LAZARUS
Kembali Ke Atas 
Halaman 1 dari 1

Permissions in this forum:Anda tidak dapat menjawab topik
Fajar Nugraha Wahyu :: My Kategori :: Deretan Tugas Sekolah-
Navigasi: