Re: [fpc-pascal] [OT] which editor - emacs?
David Emerson schreef: on multiple projects at once. Especially, e.g., if I want to test some feature or idea in a new little project, I tend to just do that in a separate editor rather than opening another group of lazarus windows or closing the big project I'm working on. For such use case, there is the build file and run file functionality. See also: http://wiki.lazarus.freepascal.org/Lazarus_Tutorial#The_Run_sub-menu http://wiki.lazarus.freepascal.org/IDE_Window:_Configure_Build_file Vincent ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] [OT] which editor - emacs?
It took me a couple years to take that plunge (of course a couple years ago Lazarus was not as robust as it is today) but I will never go back! Lazarus does have the distinct disadvantage that it's cumbersome to work on multiple projects at once. Especially, e.g., if I want to test some feature or idea in a new little project, I tend to just do that in a separate editor rather than opening another group of lazarus windows or closing the big project I'm working on. Some of the most valuable hotkeys for me are ctrl-click on an identifier to jump to declaration; and the same can be done with ctrl-shift-up. To go down to implementation, ctrl-shift-down (codetools commands - find procedure method). I've also customized other hotkeys, e.g. moving from tab to tab, which make the source editor feel more like other editors. The customizability coupled with the great codetools features are unmatched. ~D. On Sun 10 Jan 2010, Hans-Peter Suter wrote: > 2010/1/10 dmitry boyarintsev : > > I use Lazarus as my primary IDE (i have to use Delphi in windows sometimes). > > Lazarus is the only IDE i'm using on Mac OS X. > > Just installed Lazarus and it's much better than I expected. Simple > things like 'navigating around' are great. Didn't (yet) debug and > still call the make script from the terminal though. > > What I miss, is the TextMate ability to drag a folder containing > subfolders with .pas code files into the (libray) project. > > Cheers, > Hans-Peter > > PS: thanks also to the other suggestions! And if somebody uses Emacs I > am still interested to hear about how it goes. Thanks again! > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re[2]: [fpc-pascal] creating a standalone executable (eg: application installation file)
Hello FPC-Pascal, Tuesday, January 12, 2010, 5:16:20 PM, you wrote: GG> Interesting, I never thought of trying that, or that that would work. GG> I'll try and create proof of concept tonight to see how it works. This works at least in Windows, in fact I'm using it in a self contained EXE/Data where the EXE and all the data files are in the same EXE with an attached "virtual file system" at the end. Of course the write procedure in the EXE raises many antivirus alarms but for that application is convenient (no antivirus, no internet, no nothing). Other "mini-project" is the same but with a ZIP attached at the end where the application read its internal data structures and some graphics. -- Best regards, JoshyFun ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] I have some qustions about free pascal
On Tue, January 12, 2010 15:12, Felipe Monteiro de Carvalho wrote: > Hello å½, Could you please subscribe to the list when asking questions > and also please send plain text instead of html? > >>  First, I want to use some Turbo Pascal's Uint in Free Pascal (I >> learnt pascal in TP7.0) >>  but it seems I can't use TP's unit file. > > Why can't you use the unit? Could you show the unit, explain how you > are trying to use it and why it doesn't work? Do you refer to using the unit source file (*.pas) or the compiled files (*.tpu/*.tpp/*.tpw)? The compiled unit files cannot be used with FPC for various reasons. >> Can you send me the help files of Free pascal? > > There are here for download or consulting the html version: > > http://www.freepascal.org/docs.var > >>  Third,I can't input Chinese in my program compiled by Free pascal. >>  Can you give me some advices ? > > Could you explain what kind of user interface you are developing and > in which operating system? > > I think chinese input should work in Lazarus programs: > http://www.lazarus.freepascal.org/ Considering the references to TP 7.0, I'd suspect that the poster referred to console programs. Information about the target platform is obviously still very important, of course, and a sample program showing which particular functions/units are used for data entry together with description of the observed behaviour / problem is important. Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] creating a standalone executable (eg: application installation file)
Hi Graeme, On Tue, Jan 12, 2010 at 6:07 PM, Graeme Geldenhuys wrote: > Hi, > > I have seen a few Linux application that have standalone executables > that are installation programs. Once run, it installs the application > in the appropriate directory location, can run as root or normal user > and creates a desktop and Application menu icon. Similar to Windows's > setup.exe idea. An example of such a Linux application is > 'installpixel32' from the Pixel32 project, or Kylix 3 installation. > > * How does one create such a standalone application? > * How do you include the application executable and other resources > (text, image, sound files etc) inside such an installation executable? > InstallerJammer is a nice free install builder for building cross-platform installers from a single specification. If you are willing to shell money then I'd recommend BitRock install builder. BitRock also gives away licenses for opensource projects. Cheers, --Krishna -- I long to accomplish a great and noble task, but it is my chief duty to accomplish small tasks as if they were great and noble ! -- Helen Keller ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] creating a standalone executable (eg: application installation file)
On 12/01/2010, Andreas Schneider wrote: > read all you need from there. So essentially your file looks like: > Interesting, I never thought of trying that, or that that would work. I'll try and create proof of concept tonight to see how it works. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] creating a standalone executable (eg: application installation file)
On 12/01/2010, ik wrote: > > That's not how it's been done in Linux (and unix). > In linux you have files that starts as bash (or any other format) and tools > that adds after the script the binary information to extract it. I believe the tool is called 'makeself', but I don't like the bash part in the front, I would prefer a 100% binary, so nobody would be tempted to try and edit it with a text editor. 100% binary would help the idea of simply double clicking on the executable to install the app - otherwise Gnome (and probably other DE and WM too) would prompt the user first: "Run in Terminal, Edit, Cancel" because they think it's a standard script. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] I have some qustions about free pascal
Hello 彘, Could you please subscribe to the list when asking questions and also please send plain text instead of html? > First, I want to use some Turbo Pascal's Uint in Free Pascal (I learnt > pascal in TP7.0) > but it seems I can't use TP's unit file. Why can't you use the unit? Could you show the unit, explain how you are trying to use it and why it doesn't work? > Can you send me the help files of Free pascal? There are here for download or consulting the html version: http://www.freepascal.org/docs.var > Third,I can't input Chinese in my program compiled by Free pascal. > Can you give me some advices ? Could you explain what kind of user interface you are developing and in which operating system? I think chinese input should work in Lazarus programs: http://www.lazarus.freepascal.org/ -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] I have some qustions about free pascal
When answering, please note that his person is not subscribed to the list. 彘, please mention this fact if you send mails to the list in the future, so that people know they have to cc you when replying. On 12 Jan 2010, at 06:45, 彘 wrote: Dear Free Pascal, I am a senior high school student from China, when I use Free pascal I have some qustions: First, I want to use some Turbo Pascal's Uint in Free Pascal (I learnt pascal in TP7.0) but it seems I can't use TP's unit file. Can you tell me some solutions? Second, I can't find help files when I use free pascal Can you send me the help files of Free pascal? Third,I can't input Chinese in my program compiled by Free pascal. Can you give me some advices ? Forth, I also intrested in using Assemble language in Free pascal but I don't know Assemble , and there is some differences between the assemble in turbo pascal and free pascal I also interested in that. Can you tell me how to learn asmmemble ? Best wishes to you . Andy Andy Scout 2010-1-12___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] I have some qustions about free pascal
Dear Free Pascal, I am a senior high school student from China, when I use Free pascal I have some qustions: First, I want to use some Turbo Pascal's Uint in Free Pascal (I learnt pascal in TP7.0) but it seems I can't use TP's unit file. Can you tell me some solutions? Second, I can't find help files when I use free pascal Can you send me the help files of Free pascal? Third,I can't input Chinese in my program compiled by Free pascal. Can you give me some advices ? Forth, I also intrested in using Assemble language in Free pascal but I don't know Assemble , and there is some differences between the assemble in turbo pascal and free pascal I also interested in that. Can you tell me how to learn asmmemble ? Best wishes to you . AndyAndy Scout 2010-1-12___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] creating a standalone executable (eg: application installation file)
Am Tuesday 12 January 2010 13:37:26 schrieb Graeme Geldenhuys: > Hi, > > I have seen a few Linux application that have standalone executables > that are installation programs. Once run, it installs the application > in the appropriate directory location, can run as root or normal user > and creates a desktop and Application menu icon. Similar to Windows's > setup.exe idea. An example of such a Linux application is > 'installpixel32' from the Pixel32 project, or Kylix 3 installation. > > * How does one create such a standalone application? > * How do you include the application executable and other resources > (text, image, sound files etc) inside such an installation executable? > A similar question I posted already (23.03.2009 15:37) The simplest way would be like this: // include binary data of the file 'myfile.dat' to the var mydata {$incdata myfile.dat mydata} // fpc compiler makes this const mydata : array[ 0 .. filesizeof( myfile.dat ) - 1 ] of byte = ( d1, d2, d3, d4, d5, ... , dn ); Easy, and userfriendly. Rainer ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: creating a standalone executable (eg: application installation file)
I think if digital signing is required, using Windows Resources would be the better way. Now that I think about it, with FPC 2.4 that should even be possible on Linux (and other platforms). Many roads lead to rome :D Am Dienstag 12 Januar 2010 14:17:21 schrieb Milan Marusinec: > Andreas Schneider wrote: > > Hi, > > > > that works the same as in Windows and can probably be done with every > > executable format. Simply append the data to the end of the file and > > store the offset or length of that data at the end. All you have to do > > then is to let the program open "itself" (ParamStr(0)), seek to the end - > > SizeOf(Integer), read that integer to know the offset of the data, seek > > to that position, and read all you need from there. So essentially your > > file looks like: > > Andreas, > > Will this method work when the exe is digitally > signed afterwards (or before) ? > > (tough, for linux it doesn't matter) > > Milan > > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Re: creating a standalone executable (eg: application installation file)
Andreas Schneider wrote: Hi, that works the same as in Windows and can probably be done with every executable format. Simply append the data to the end of the file and store the offset or length of that data at the end. All you have to do then is to let the program open "itself" (ParamStr(0)), seek to the end - SizeOf(Integer), read that integer to know the offset of the data, seek to that position, and read all you need from there. So essentially your file looks like: Andreas, Will this method work when the exe is digitally signed afterwards (or before) ? (tough, for linux it doesn't matter) Milan ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] creating a standalone executable (eg: application installation file)
Graeme, That's not how it's been done in Linux (and unix). In linux you have files that starts as bash (or any other format) and tools that adds after the script the binary information to extract it. I do not remember at the moment the names of the tools, but you should take a look at it. I knows how to add more then one binary content to such file, and it generate the bash script on it's own. Ido On Tue, Jan 12, 2010 at 14:37, Graeme Geldenhuys wrote: > Hi, > > I have seen a few Linux application that have standalone executables > that are installation programs. Once run, it installs the application > in the appropriate directory location, can run as root or normal user > and creates a desktop and Application menu icon. Similar to Windows's > setup.exe idea. An example of such a Linux application is > 'installpixel32' from the Pixel32 project, or Kylix 3 installation. > > * How does one create such a standalone application? > * How do you include the application executable and other resources > (text, image, sound files etc) inside such an installation executable? > > > I'm trying to create (mainly for our company, but probably open-source > in the end) such a standalone setup creation for our projects. This > way it will be Linux distro independent. I also don't want to go the > route of projects like AutoPackage that first requires a setup runtime > to be installed. I want a installation file like what Pixel32 did. One > installation executable without any installation runtime etc. and > after the installation, I can simply click on 'uninstall' or run > 'setup -u' and a graphical uninstaller is launched. > > I'm going to look at Loki Games's setup program to see if I can port > it to fpGUI Toolkit, or at least get some ideas of how to create such > a setup application. Basically I'm trying to create a "InstallShield > Lite" but for Linux. :-) The nice thing of Loki Games is that it run > run as a console installation or a GUI installation - again, no idea > how they managed that, but it was possible (Kylix 3 installation did > that). > > Anybody have pointers or internet links I can read up on the subject? > > -- > Regards, > - Graeme - > > > ___ > fpGUI - a cross-platform Free Pascal GUI toolkit > http://opensoft.homeip.net/fpgui/ > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Re: creating a standalone executable (eg: application installation file)
Graeme Geldenhuys wrote: * How does one create such a standalone application? * How do you include the application executable and other resources (text, image, sound files etc) inside such an installation executable? Hello Graeme, I did this on Windows in Delphi, but the principle is pretty the same for linux app. 1. Create your own file structure archive format or pack all installation files inside one .zip (later you should be able to extract files in memory from that .zip or own format file). 2. Use bin2obj.exe utility, to convert that .zip (or own) archive file into the pascal source code "Const statement". (eg. Const inst_arch : Array[0..xx] of byte = (0,1,2,...);). 3. Embed converted inst_arch constant into your app source code. (If you use is as {$I my_istall_file.inc}, you can rebuild installation data file from outside the installer app src code). 4. On RunTime, map inst_arch (you know its size) to TStream and use it as the source memory file with all your installation stuff inside (text, image, sound files etc). The whole installer is in fact just an ordinary app with embedded data block through const statement. If you want to see this kind of installer (on windows), have a look at: http://www.crossgl.com/CrossGL-SnapDraw-Installer.exe Milan ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] creating a standalone executable (eg: application installation file)
Hi, that works the same as in Windows and can probably be done with every executable format. Simply append the data to the end of the file and store the offset or length of that data at the end. All you have to do then is to let the program open "itself" (ParamStr(0)), seek to the end - SizeOf(Integer), read that integer to know the offset of the data, seek to that position, and read all you need from there. So essentially your file looks like: (Of course you can also include the data offset "hardcoded" into the executable, but that's a bit harder to manage ... first compile to know the exe size, then change the constant storing that size, and recompile again ...) Best regards, Andreas. Am Dienstag 12 Januar 2010 13:37:26 schrieb Graeme Geldenhuys: > Hi, > > I have seen a few Linux application that have standalone executables > that are installation programs. Once run, it installs the application > in the appropriate directory location, can run as root or normal user > and creates a desktop and Application menu icon. Similar to Windows's > setup.exe idea. An example of such a Linux application is > 'installpixel32' from the Pixel32 project, or Kylix 3 installation. > > * How does one create such a standalone application? > * How do you include the application executable and other resources > (text, image, sound files etc) inside such an installation executable? > > > I'm trying to create (mainly for our company, but probably open-source > in the end) such a standalone setup creation for our projects. This > way it will be Linux distro independent. I also don't want to go the > route of projects like AutoPackage that first requires a setup runtime > to be installed. I want a installation file like what Pixel32 did. One > installation executable without any installation runtime etc. and > after the installation, I can simply click on 'uninstall' or run > 'setup -u' and a graphical uninstaller is launched. > > I'm going to look at Loki Games's setup program to see if I can port > it to fpGUI Toolkit, or at least get some ideas of how to create such > a setup application. Basically I'm trying to create a "InstallShield > Lite" but for Linux. :-) The nice thing of Loki Games is that it run > run as a console installation or a GUI installation - again, no idea > how they managed that, but it was possible (Kylix 3 installation did > that). > > Anybody have pointers or internet links I can read up on the subject? > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] creating a standalone executable (eg: application installation file)
Hi, I have seen a few Linux application that have standalone executables that are installation programs. Once run, it installs the application in the appropriate directory location, can run as root or normal user and creates a desktop and Application menu icon. Similar to Windows's setup.exe idea. An example of such a Linux application is 'installpixel32' from the Pixel32 project, or Kylix 3 installation. * How does one create such a standalone application? * How do you include the application executable and other resources (text, image, sound files etc) inside such an installation executable? I'm trying to create (mainly for our company, but probably open-source in the end) such a standalone setup creation for our projects. This way it will be Linux distro independent. I also don't want to go the route of projects like AutoPackage that first requires a setup runtime to be installed. I want a installation file like what Pixel32 did. One installation executable without any installation runtime etc. and after the installation, I can simply click on 'uninstall' or run 'setup -u' and a graphical uninstaller is launched. I'm going to look at Loki Games's setup program to see if I can port it to fpGUI Toolkit, or at least get some ideas of how to create such a setup application. Basically I'm trying to create a "InstallShield Lite" but for Linux. :-) The nice thing of Loki Games is that it run run as a console installation or a GUI installation - again, no idea how they managed that, but it was possible (Kylix 3 installation did that). Anybody have pointers or internet links I can read up on the subject? -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal