Recent

Author Topic: gpStructureStorage Port  (Read 21411 times)

taazz

  • Hero Member
  • *****
  • Posts: 5365
gpStructureStorage Port
« on: March 08, 2013, 02:30:03 pm »
I have ported this morning the gpStructureStorage components to lazarus/FreePascal. Running the tester application from Win32 it passes all the tests. I have removed all references to windows unit to make it cross platform and removed all windows requirements (I think I got them all).

I'm looking for testers on other operating systems. If interested go to https://sourceforge.net/projects/codelibrarian/ and download it either from the git repository or the Pre_Release folder in the files section.

The idea is to write the CodeLibrary Addin from GExperts as a standalone application for start and later to make it an addin for lazarus. You will find a pre-alpha version of the librarian in the repository as well.

Thank you.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Leledumbo

  • Hero Member
  • *****
  • Posts: 8310
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: gpStructureStorage Port
« Reply #1 on: March 08, 2013, 02:43:17 pm »
Compile test on i386-linux passes, but I can't compile the tester since it uses 2 3rd party components that I don't have...

taazz

  • Hero Member
  • *****
  • Posts: 5365
Re: gpStructureStorage Port
« Reply #2 on: March 08, 2013, 02:52:34 pm »
Τester only has buttons and check boxes no 3rd party controls at all.

Removed all false 3rd party dependencies from the tester application I uploaded the changes to git and the zip file.

Thank you for your input.
« Last Edit: March 08, 2013, 03:06:58 pm by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Leledumbo

  • Hero Member
  • *****
  • Posts: 8310
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: gpStructureStorage Port
« Reply #3 on: March 08, 2013, 03:06:10 pm »
Ehm... see attached screenshot

taazz

  • Hero Member
  • *****
  • Posts: 5365
Re: gpStructureStorage Port
« Reply #4 on: March 08, 2013, 03:09:06 pm »
Yeah sorry about that habits are difficult to break.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

taazz

  • Hero Member
  • *****
  • Posts: 5365
Re: gpStructureStorage Port
« Reply #5 on: March 09, 2013, 04:16:32 am »
The first alpha version is up.

In this version the librarian executable is almost complete, the only thing left to do is the Import and merge of library files. everything should work opening existing libraries deleting folders and snippets creating new folders and snippets everything works so far.

Be careful with the deletion I haven't implement a confirmation dialog and if you select a folder it will delete everything in it regardless of the number of snippets or sub folders.

As always I have updated the repository and uploaded a zip file with the developing environment, this time I have uploaded and a win32 executable.

I'd appreciate if any one can build a linux or mac application and send it to me so I can upload it too.

Regards.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3977
  • I like bugs.
Re: gpStructureStorage Port
« Reply #6 on: March 09, 2013, 09:51:24 am »
I cloned your git repo. It does not compile on Linux.
For example, there is UInt32, should be Cardinal.

If I make it compile, do you want a patch?
You could also install Linux easily on a virtual machine or using dual boot. If a code compiles on Linux then it has a high chance to compile on OS/X, too.

[Edit] I attached a patch. It compiles but does not work well. It crashes when trying to open or create something.
It may be caused by interfaces. What is the recommended compiler version.

Juha
« Last Edit: March 09, 2013, 11:06:58 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

taazz

  • Hero Member
  • *****
  • Posts: 5365
Re: gpStructureStorage Port
« Reply #7 on: March 09, 2013, 01:10:25 pm »
Hi Juha,

I am using laz 1.0.6 fpc 2.6.2 , the components assume COM interfaces, so that has do be declared on all component units I think. Before compilling the librarian try executing the tester, if the tests are completed correctly then librarian should work.

I'll take a closer look on your patch and try it on my end.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

taazz

  • Hero Member
  • *****
  • Posts: 5365
Re: gpStructureStorage Port
« Reply #8 on: March 09, 2013, 02:56:28 pm »
Hmm trying to make heads or tails wit the patch your provided.

I'm new to git so this will take some time any hints on how to apply the patch other than manual?
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

taazz

  • Hero Member
  • *****
  • Posts: 5365
Re: gpStructureStorage Port
« Reply #9 on: March 09, 2013, 06:32:20 pm »
I think I have applied all your code changes except the IFnDEF one which is just a cosmetic choice.
GIT repo has the latest code. Keep in mind that the above works on windows as you can see from the screen shot on the sf.net. The biggest change is that I removed the GpStuff unit completely now it as way to complicated to make it cross platform and on top of that I don't know assembly.

Try to see if the tester application reports problems before building the librarian. From the changes I see nothing that will change the current status.

I'm on a Intel Pentium M 1.6 GHZ with 1 GB of Ram that suffers from over heating any thoughts of VMs on this laptop brings in mind images of uncontrollable fire just below the key on the keyboard, close enough to burn your fingers but not close enough to see it in time. and disk space does not allow a second OS to be dual booted.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

taazz

  • Hero Member
  • *****
  • Posts: 5365
Re: gpStructureStorage Port
« Reply #10 on: March 09, 2013, 10:14:48 pm »
OK I have just downloaded a OpenSuse 11.3 vm and installed the vmware player on my laptop I'm overwhelmed  by the things I have to adapt to for the time being in order to install lazarus and fpc 2.6.2 on that machine although yast seems easy enough to use (web reading for it not used it yet). for this project I think I'm going to install only fpc and its command line IDE and rewrite the tester as a console application and might extended to a unit testing application too if I manage. In any case the first for a linux debugging environment was made. I hope that I can find what is going on in there.

Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3977
  • I like bugs.
Re: gpStructureStorage Port
« Reply #11 on: March 09, 2013, 11:31:54 pm »
Hmm trying to make heads or tails wit the patch your provided.
I'm new to git so this will take some time any hints on how to apply the patch other than manual?

git apply 0001-Make-it-compile-on-Linux.patch

I will check your changes soon.

Juha
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

taazz

  • Hero Member
  • *****
  • Posts: 5365
Re: gpStructureStorage Port
« Reply #12 on: March 10, 2013, 12:13:56 am »
argh!!! Console mode linux managed to remember how to mount and external disk got lost on how to define that disk remembered the /dev folder got lost on all the contents in there found disk and finally managed to mount my external ntfs disk to linux. yeah!!! and that took me only 1 hour of searching

Now where is that linux pocket guide when I need it.......

in any case does the fpc install.sh needs to be started under a specific folder aka should I copy it in the users home directory for instance or it doesn't matter?

now what was the command to make a file executable on an ntfs drive?
off to find that pocket guide of mine.

EDIT:
I'm really impressed with suse 11 and I imagine 12 is even better, type a command and get a helpful push to the right direction  eg that command exists in sbin your need root access or the command not found try cnf <command> etc it wend as far that the cnf proposed to me how to find and install the missing mc in a few minutes no need for my pocket guide now that I found it.

In other news I have fpc installed fp works and I have created my first (again) hello application. Now to copy the components over and start re writing the tester application.

gonna try that cnf on git :D, any idea why shutting down the system hangs the player? it seems that the vm is stuck on an infinite loop or something I have to kill the process. Oh Well that's a small price to pay I guess.
« Last Edit: March 10, 2013, 04:04:29 am by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

taazz

  • Hero Member
  • *****
  • Posts: 5365
Re: gpStructureStorage Port
« Reply #13 on: March 10, 2013, 03:46:48 pm »
Well my test on OpenSuse 11.3 i386 indicate that everything works as expected. At least for the gpStructureStorage component. The only thing that comes to mind is you have a 64bit OS and you build a 64bit executable although I do not know why that would be a problem.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

taazz

  • Hero Member
  • *****
  • Posts: 5365
Re: gpStructureStorage Port
« Reply #14 on: March 10, 2013, 08:41:45 pm »
Uploaded a new version. This one has everything planned for the 1st release except the ability to move snippets and folders around to re arrange them in order you like. That will be the last ability before Version 1 so I'm calling this release a beta.

Now let me try to install lazarus on my linux and see if I can create a linux executable also.

BB.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018