Recent

Author Topic: How to back-up a project?  (Read 6434 times)

BertH

  • New Member
  • *
  • Posts: 28
How to back-up a project?
« on: July 27, 2010, 11:47:54 am »
I am wondering how I can back-up a project. I am experimenting with Lazarus and have made a number of small example projects. I noticed that after copying these examples to an other directory they can no longer be compiled. Is there a way to move finished projects to a back-up location so that they can still be used and updated if needed?
I looked through this forum but could not find an answer.
Thanks for your help.
Bert

Leledumbo

  • Hero Member
  • *****
  • Posts: 8799
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to back-up a project?
« Reply #1 on: July 27, 2010, 02:06:06 pm »
Quote
I noticed that after copying these examples to an other directory they can no longer be compiled
This shouldn't happen unless you have hardcoded path that's required.

BertH

  • New Member
  • *
  • Posts: 28
Re: How to back-up a project?
« Reply #2 on: July 27, 2010, 03:33:17 pm »
There are no hard coded paths. I get during compilation all kind of errors about unknown items and information that cannot be found. That is the same reason why I made my examples in the Lazarus directory because starting a project outside that directory cannot be compiled also.
I assume that I have to set some parameters but have been unable to find instructions about that in the documentation.

Bert

Leledumbo

  • Hero Member
  • *****
  • Posts: 8799
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to back-up a project?
« Reply #3 on: July 28, 2010, 11:00:31 am »
Quote
I get during compilation all kind of errors about unknown items and information that cannot be found
Post them here.

BertH

  • New Member
  • *
  • Posts: 28
Re: How to back-up a project?
« Reply #4 on: July 28, 2010, 03:04:56 pm »
I got different messages when I copied projects to another disc so I assumed there was something missing. In response to your question I copied a complete project to another location and to my surprise the compilation went along without errors. I guess I did something wrong in the other occasions. Sorry for my original question it appears I was the cause of my problem.
Thanks for your help.

Bert

Alex Cones

  • Jr. Member
  • **
  • Posts: 73
    • FLSoft
Re: How to back-up a project?
« Reply #5 on: July 29, 2010, 07:14:33 pm »
May be it will useful:

In 'D:\Programs\7-Zip\Arc.bat':
Code: [Select]
7z.exe a %DATE%.7z D:\Finder
Move %DATE%.7z D:\Copy\Finder\
Cd D:\Copy\Finder
Renamer %DATE%.7z

In D:\Copy\Finder I have a Renamer.exe. Source:
Code: [Select]
Program Renamer;

Uses
  Windows, SysUtils;

Var
 Name1, Name2,S : String;
 I : Integer;
Begin
 Name1 := ParamStr(1);
 S := Name1;
 Name2 := '';
 While Pos('\',S)<>0 Do
  Begin
   Name2 := Name2 + S[1];
   Delete(S,1,1);
  End;
 For I := 1 to Length(S) - 2 Do
 Name2 := Name2 + S[I];
 Name2 := Name2 + TimeToStr(Time) + S[Length(S)-2] + S[Length(S)-1] + S[Length(S)];
 For I := 1 To Length(Name2) Do
  If Name2[I] = ':' Then Name2[I] := '.';
 RenameFile(Name1, Name2);
end.

And I have Watcher.exe in AutoRun of Windows. Source:
Code: [Select]
program Watcher;

uses
  ShellAPI, {SysUtils,} Windows;

Var
 Look   : Boolean = FALSE;
 Gotcha : Boolean = FALSE;
 Hand   : Integer;
Begin
 While True Do
  Begin
   (* Search for Lazarus *)
   Hand := 0;
   Hand := FindWindow('Window','Lazarus IDE v0.9.28.2 beta - Finder.lpi');
   Gotcha := (Hand <> 0);
   If (Look) And Not(Gotcha) Then
    Begin
     ShellExecute(0,'Open','D:\Programs\7-Zip\Arc.bat', Nil, Nil, SW_HIDE);
     Look := FALSE;
    End
   Else
    If Not(Look) And (Gotcha) Then
     Begin
      Look := TRUE;
     End;
   Sleep(10 * 1000);
  End;
End.

It make a copy of my project, when I close a Lazarus.
To beer or not to beer?
_____________________
I`m terribly sorry for my Anglish. :)

 

TinyPortal © 2005-2018