Recent

Author Topic: Lazarus 0.9.27 for PortableApps  (Read 39725 times)

jammiii

  • New member
  • *
  • Posts: 7
    • Eightminds Consulting
Lazarus 0.9.27 for PortableApps
« on: February 23, 2009, 08:26:37 pm »
I'm proud to announce that I've ported Lazarus to the PortableApps format.  This allows you to take Lazarus with you via USB HDD or USB Flash.  It's convenient for the developer on-the-go.  Just plug-in your USB device, and run Lazarus anywhere!  This version is for Windows but I plan to port to Linux too.

You can download Lazarus 0.9.27 Portable at http://www.eightminds.com/archives/24

« Last Edit: February 23, 2009, 08:28:34 pm by jammiii »
Juan Melendez, Eightminds.com

LazaruX

  • Hero Member
  • *****
  • Posts: 597
  • Lazarus original cheetah.The cheetah doesn't cheat
Re: Lazarus 0.9.27 for PortableApps
« Reply #1 on: February 23, 2009, 11:57:50 pm »
That's a good news, however, in the last year I programmed 70% of my codes on my USB stick, I just installed Lazarus on my HHD (Windows platform) then copied C:\Lazarus to my USB stick and changed the environmental paths.
Sooooo,...does your port work with anydrive directly?
You plan to make the Linux portable is good, but I think harder.
 :D

jammiii

  • New member
  • *
  • Posts: 7
    • Eightminds Consulting
Re: Lazarus 0.9.27 for PortableApps
« Reply #2 on: February 24, 2009, 01:23:17 am »
Yes, that's exactly what the PortableApps version does.  It remaps all paths on the fly.  USB drive letters in windows change depending on the machine configuration, and it changes if the machine is on a network.  This too is taken into account.  Their are many settings which are not transferable when you simply copy to USB and change the local XML configuration files (such-as auto loading the last project on startup).  If you only plan to run Lazarus on one machine (or machines with the same drive letter mappings, then copying the folder alone is usually fine but in many cases it's not.

The linux version would have to be limited to specific distros.  Still, it's possible.

With this app, you load your USB drive, and go... no-matter what system your on or how the drives are mapped.  All settings remain intact.
« Last Edit: February 24, 2009, 01:26:20 am by jammiii »
Juan Melendez, Eightminds.com

LazaruX

  • Hero Member
  • *****
  • Posts: 597
  • Lazarus original cheetah.The cheetah doesn't cheat
Re: Lazarus 0.9.27 for PortableApps
« Reply #3 on: February 24, 2009, 01:17:31 pm »
That's a good news then and a good implementation

LazaruX

  • Hero Member
  • *****
  • Posts: 597
  • Lazarus original cheetah.The cheetah doesn't cheat
Re: Lazarus 0.9.27 for PortableApps
« Reply #4 on: February 25, 2009, 11:41:57 am »
This should be easier, maybe this should be default in lazarus.exe  :

Code: [Select]
unit main;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
  ExtCtrls, Buttons,windows;

type

  { TForm1 }

  TForm1 = class(TForm)
    BitBtn1: TBitBtn;
    procedure BitBtn1Click(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1: TForm1;
  dir : string;

 f:text;
implementation

{ TForm1 }

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
 dir := GetCurrentDir;

 assignfile(f,'environmentoptions.xml');
 rewrite(f);

 writeln(f,'<?xml version="1.0"?>');
 writeln(f,'<CONFIG>');
 writeln(f,'  <EnvironmentOptions>');
 writeln(f,'    <Version Value="102"/>');
 writeln(f,'    <LazarusDirectory Value="'+dir+'">');
 writeln(f,'    </LazarusDirectory>');
 writeln(f,'    <CompilerFilename Value="'+dir+'\fpc\2.2.2\bin\i386-win32\\fpc.exe">');
 writeln(f,'    </CompilerFilename>');
 writeln(f,'    <FPCSourceDirectory Value="'+dir+'\fpc\2.2.2\source">');
 writeln(f,'    </FPCSourceDirectory>');
 writeln(f,'    <MakeFilename Value="'+dir+'\fpc\2.2.2\bin\i386-win32\\make.exe">');
 writeln(f,'    </MakeFilename>');
 writeln(f,'    <TestBuildDirectory Value="'+dir+'\Temp\">');
 writeln(f,'    </TestBuildDirectory>');
 writeln(f,'    <Debugger Class="TGDBMIDebugger"/>');
 writeln(f,'    <DebuggerFilename Value="'+dir+'\mingw\bin\gdb.exe">');
 writeln(f,'    </DebuggerFilename>');
 writeln(f,'    <Desktop>');
 writeln(f,'      <MainIDE>');
 writeln(f,'        <WindowPlacement Value="RestoreWindowGeometry"/>');
 writeln(f,'        <CustomPosition Width="720" Height="69"/>');
 writeln(f,'        <WindowState Value="Normal"/>');
 writeln(f,'        <DockMode Value="Default"/>');
 writeln(f,'        <Visible Value="True"/>');
 writeln(f,'      </MainIDE>');
 writeln(f,'    </Desktop>');
 writeln(f,'  </EnvironmentOptions>');
 writeln(f,'</CONFIG>');

  closefile(f);

 WinExec('lazarus.exe',1);

 Close;
end;


initialization
  {$I main.lrs}

end.


jammiii

  • New member
  • *
  • Posts: 7
    • Eightminds Consulting
Re: Lazarus 0.9.27 for PortableApps
« Reply #5 on: February 26, 2009, 04:02:07 am »
Not a bad idea but the question is... Shouldn't the default settings foster cross-platform development habbits?

I will definitely consider it though.  Thanks.
Juan Melendez, Eightminds.com

LazaruX

  • Hero Member
  • *****
  • Posts: 597
  • Lazarus original cheetah.The cheetah doesn't cheat
Re: Lazarus 0.9.27 for PortableApps
« Reply #6 on: February 26, 2009, 09:42:02 am »
Yeah, ok,

instead of Winexec, we could use Tprocess

and we could do something like

If OS=Windows then ......run lazarus.exe
if os=linux then run lazarus,
......

and the problem would be solved

jammiii

  • New member
  • *
  • Posts: 7
    • Eightminds Consulting
Re: Lazarus 0.9.27 for PortableApps
« Reply #7 on: February 26, 2009, 03:19:02 pm »
Thank you so much for your contribution.  I will be able to work on this tomorrow night.
Juan Melendez, Eightminds.com

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: Lazarus 0.9.27 for PortableApps
« Reply #8 on: February 27, 2009, 11:56:48 am »
First I want to thank you for your effort. I love portable apps; on my computer (to save Windows Registry bloat) and on my USB keys, that is how I like to work.

However, I was unable to get LazarusPortable to start on my USB keys & on my computer by clicking on the Lazarus 0.9.27 Portable executable. I could start it by clicking the startlazarus or the lazarus executable & them reseting the environment options but I was unable to compile any project.

I finally realised that the problem was the fpc.cfg file. I opened it & discovered that the paths are absolute (g:\PortableApps\) which prevented it from working.

I changed the 'g' to 'c' & reinstalled the application in "c:\PortableApps" & then voila! The Lazarus 0.9.27 Portable.exe application worked! The environment options in the xml file were properly set & I could compile projects.

I think all that is missing to make it fully portable is to remove the absolute path references.
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

duncanparsons

  • Jr. Member
  • **
  • Posts: 83
Re: Lazarus 0.9.27 for PortableApps
« Reply #9 on: February 27, 2009, 12:41:18 pm »
when your happy with it all, will you be submitting it to portableapps.com for inclusion in their developer tools? :)

LazaruX

  • Hero Member
  • *****
  • Posts: 597
  • Lazarus original cheetah.The cheetah doesn't cheat
Re: Lazarus 0.9.27 for PortableApps
« Reply #10 on: February 27, 2009, 01:40:23 pm »
However, the last STABLE release is the 0.9.26 (AFAIK), so that should be made portable. I will make a small script, like the one I posted, so the problem will be solved.

jammiii

  • New member
  • *
  • Posts: 7
    • Eightminds Consulting
Re: Lazarus 0.9.27 for PortableApps
« Reply #11 on: February 27, 2009, 03:24:04 pm »
Cool JD!  Please download the current version which includes bug fixes for the paths issue. (Thanks for the offer BPSoftware :D but it's already fixed.)

The current version also includes the help files.

download it here...
http://www.eightminds.com/archives/26

Yes Duncanpar, I have submitted to the PortableApps Team here...
http://portableapps.com/node/18088

Good-point BPSoftware... I will aim to release the 0.9.26 version hopefully tonight.

As-for the absolute paths, my launcher automatically sets the correct paths now on startup as needed.

Thanks everyone for the on-going feedback!  :)  It's really helpful.
« Last Edit: February 27, 2009, 04:11:08 pm by jammiii »
Juan Melendez, Eightminds.com

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: Lazarus 0.9.27 for PortableApps
« Reply #12 on: February 28, 2009, 09:22:37 am »
I will aim to release the 0.9.26 version hopefully tonight.
That is a good exercise for the 0.9.26.2 release expected within two weeks. :)

jammiii

  • New member
  • *
  • Posts: 7
    • Eightminds Consulting
Re: Lazarus 0.9.27 for PortableApps
« Reply #13 on: February 28, 2009, 06:13:32 pm »
I've posted Lazarus 0.9.26 for PortableApps with Help Files on my site.  http://www.eightminds.com Please test and provide any feedback you like.

As soon as version 0.9.26.2 is available, I will post it too.

Juan
Juan Melendez, Eightminds.com

jammiii

  • New member
  • *
  • Posts: 7
    • Eightminds Consulting
Re: Lazarus 0.9.27 for PortableApps
« Reply #14 on: March 09, 2009, 03:43:17 pm »
I've just released Beta 5 of Lazarus 0.9.27 for PortableApps (Ms-Windows).  Many improvements and bug-fixes.  visit www.eightminds.com to download source code and the installer.
Juan Melendez, Eightminds.com

 

TinyPortal © 2005-2018