You've already forked lazarus-ccr
lazedit: Adds support for a parameter to open a file on start up, prepares the installer and adds to it an item to open any kind of file, like Notepad++
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2298 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -2,19 +2,19 @@
|
|||||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
AppName=LazEyes
|
AppName=LazEdit
|
||||||
AppVerName=LazEyes v2.0
|
AppVerName=LazEdit v1.9
|
||||||
AppPublisherURL=http://wiki.lazarus.freepascal.org/LazEyes
|
AppPublisherURL=http://wiki.lazarus.freepascal.org/LazEdit
|
||||||
AppSupportURL=http://wiki.lazarus.freepascal.org/LazEyes
|
AppSupportURL=http://wiki.lazarus.freepascal.org/LazEdit
|
||||||
AppUpdatesURL=http://wiki.lazarus.freepascal.org/LazEyes
|
AppUpdatesURL=http://wiki.lazarus.freepascal.org/LazEdit
|
||||||
DefaultDirName={pf}\LazEyes
|
DefaultDirName={pf}\LazEdit
|
||||||
DefaultGroupName=Free Pascal Applications Suite
|
DefaultGroupName=Free Pascal Applications Suite
|
||||||
; LicenseFile=..\license.txt
|
; LicenseFile=..\license.txt
|
||||||
OutputDir=.\
|
OutputDir=.\
|
||||||
OutputBaseFilename=LazEyes2.0_install
|
OutputBaseFilename=LazEdit1.9_install
|
||||||
Compression=lzma
|
Compression=lzma
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
VersionInfoVersion=2.0
|
VersionInfoVersion=1.9
|
||||||
AllowNoIcons=yes
|
AllowNoIcons=yes
|
||||||
|
|
||||||
[Languages]
|
[Languages]
|
||||||
@ -33,20 +33,25 @@ Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl"
|
|||||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "..\lazeyes2.exe"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "..\lazedit.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
; Source: "..\Images\*.png"; DestDir: "{app}\Images"; Flags: ignoreversion
|
; Source: "..\Images\*.png"; DestDir: "{app}\Images"; Flags: ignoreversion
|
||||||
; Source: "..\libraries\pas_overlays\pas_overlays.dll"; DestDir: "{app}"; Flags: ignoreversion
|
; Source: "..\libraries\pas_overlays\pas_overlays.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
; Source: "..\libraries\videocard_checker\videocard_checker.dll"; DestDir: "{app}"; Flags: ignoreversion
|
; Source: "..\libraries\videocard_checker\videocard_checker.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||||
|
|
||||||
|
[Registry]
|
||||||
|
Root: HKCR; Subkey: "*\shell\LazEdit"; Flags: uninsdeletekeyifempty
|
||||||
|
Root: HKCR; Subkey: "*\shell\LazEdit"; ValueType: string; ValueName: ""; ValueData: "Open with LazEdit"; Flags: uninsdeletekey
|
||||||
|
Root: HKCR; Subkey: "*\shell\LazEdit\command"; ValueType: string; ValueName: ""; ValueData: """{app}\lazedit.exe"" ""%1"""; Flags: uninsdeletekey
|
||||||
|
|
||||||
[Icons]
|
[Icons]
|
||||||
Name: "{group}\LazEyes"; Filename: "{app}\lazeyes2.exe"
|
Name: "{group}\LazEdit"; Filename: "{app}\lazedit.exe"
|
||||||
Name: "{group}\{cm:ProgramOnTheWeb,LazEyes}"; Filename: "http://wiki.lazarus.freepascal.org/LazEyes"
|
Name: "{group}\{cm:ProgramOnTheWeb,LazEdit}"; Filename: "http://wiki.lazarus.freepascal.org/LazEdit"
|
||||||
Name: "{group}\{cm:UninstallProgram,LazEyes}"; Filename: "{uninstallexe}"
|
Name: "{group}\{cm:UninstallProgram,LazEdit}"; Filename: "{uninstallexe}"
|
||||||
Name: "{commondesktop}\LazEyes"; Filename: "{app}\lazeyes2.exe"; Tasks: desktopicon
|
Name: "{commondesktop}\LazEdit"; Filename: "{app}\lazedit.exe"; Tasks: desktopicon
|
||||||
|
|
||||||
[Run]
|
[Run]
|
||||||
Filename: "{app}\lazeyes2.exe"; Description: "{cm:LaunchProgram,LazEyes}"; Flags: nowait postinstall skipifsilent
|
Filename: "{app}\lazedit.exe"; Description: "{cm:LaunchProgram,LazEdit}"; Flags: nowait postinstall skipifsilent
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<Version Value="11"/>
|
<Version Value="11"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<Target>
|
<Target>
|
||||||
<Filename Value="eplus"/>
|
<Filename Value="lazedit"/>
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
@ -84,7 +84,7 @@
|
|||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="main.pp"/>
|
<Filename Value="main.pp"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<ComponentName Value="EPlusForm"/>
|
<ComponentName Value="LazEditMainForm"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="main"/>
|
<UnitName Value="main"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
|
@ -7,16 +7,33 @@ uses
|
|||||||
cthreads,
|
cthreads,
|
||||||
{$ENDIF}{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
Interfaces, // this includes the LCL widgetset
|
Interfaces, // this includes the LCL widgetset
|
||||||
Forms, main, lazedit_translations, EditorPageControl, HtmlCode {,newtableform, test_ed, eplus_commons, CopyLeft, eplus_config, HtmlCharMap,
|
Forms, main,
|
||||||
HtmlDialogs, NewHtmlDlgForm, AnchorDlgForm, PictureDlgForm}
|
lazedit_translations,
|
||||||
{ you can add units after this };
|
EditorPageControl,
|
||||||
|
HtmlCode,
|
||||||
|
lazedit_constants;
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
RequireDerivedFormResource := True;
|
RequireDerivedFormResource := True;
|
||||||
Application.Initialize;
|
Application.Initialize;
|
||||||
Application.CreateForm(TEPlusForm, EPlusForm);
|
Application.CreateForm(TLazEditMainForm, LazEditMainForm);
|
||||||
|
|
||||||
|
{$ifndef Darwin}
|
||||||
|
// Parse the command line options
|
||||||
|
|
||||||
|
// if there are no files to open, then
|
||||||
|
if ParamCount = 0 then
|
||||||
|
begin
|
||||||
|
LazEditMainForm.NoteBook.IsCreating := True;
|
||||||
|
LazEditMainForm.DoFileNewByType(eftNone);
|
||||||
|
LazEditMainForm.NoteBook.IsCreating := False;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
LazEditMainForm.TryFileOpen(ParamStr(1), False);
|
||||||
|
{$endif}
|
||||||
|
|
||||||
Application.Run;
|
Application.Run;
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ uses
|
|||||||
|
|
||||||
type
|
type
|
||||||
//globale type for all configurable options
|
//globale type for all configurable options
|
||||||
TEPlusOptions = record
|
TLazEditOptions = record
|
||||||
EditorOptions: TEditorOptions;
|
EditorOptions: TEditorOptions;
|
||||||
MainForm: record
|
MainForm: record
|
||||||
Position: TRect; //used as Left, Top, Widht, Height
|
Position: TRect; //used as Left, Top, Widht, Height
|
||||||
@ -75,8 +75,8 @@ type
|
|||||||
Translation: Integer;
|
Translation: Integer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function LoadOptions(var Options: TEPlusOptions; FileName: String): Boolean;
|
function LoadOptions(var Options: TLazEditOptions; FileName: String): Boolean;
|
||||||
function SaveOptions(const Options: TEPlusOptions; FileName: String): Boolean;
|
function SaveOptions(const Options: TLazEditOptions; FileName: String): Boolean;
|
||||||
function GetDefaultIniNameOnly: String;
|
function GetDefaultIniNameOnly: String;
|
||||||
function GetDefaultIniDir: String;
|
function GetDefaultIniDir: String;
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ const
|
|||||||
idFilePrefix = 'File_%d';
|
idFilePrefix = 'File_%d';
|
||||||
|
|
||||||
|
|
||||||
function LoadOptions(var Options: TEPlusOptions; FileName: String): Boolean;
|
function LoadOptions(var Options: TLazEditOptions; FileName: String): Boolean;
|
||||||
var
|
var
|
||||||
Ini: TIniFile;
|
Ini: TIniFile;
|
||||||
ftIndex: TEditorFileType;
|
ftIndex: TEditorFileType;
|
||||||
@ -165,7 +165,7 @@ begin
|
|||||||
if (S <> '') then Options.FileTypeMaskList[ftIndex] := S;
|
if (S <> '') then Options.FileTypeMaskList[ftIndex] := S;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Translation
|
// Translation and other general
|
||||||
Options.Translation := Ini.ReadInteger(scGeneral, idTranslation, 0);
|
Options.Translation := Ini.ReadInteger(scGeneral, idTranslation, 0);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
@ -183,7 +183,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function SaveOptions(const Options: TEPlusOptions; FileName: String): Boolean;
|
function SaveOptions(const Options: TLazEditOptions; FileName: String): Boolean;
|
||||||
var
|
var
|
||||||
Ini: TIniFile;
|
Ini: TIniFile;
|
||||||
ftIndex: TEditorFileType;
|
ftIndex: TEditorFileType;
|
||||||
@ -238,7 +238,7 @@ begin
|
|||||||
Ini.WriteString(scFileTypes, eftNames[ftIndex], Options.FileTypeMaskList[ftIndex]);
|
Ini.WriteString(scFileTypes, eftNames[ftIndex], Options.FileTypeMaskList[ftIndex]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Translation
|
// Translation and other general
|
||||||
Ini.WriteInteger(scGeneral, idTranslation, Options.Translation);
|
Ini.WriteInteger(scGeneral, idTranslation, Options.Translation);
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
object EPlusForm: TEPlusForm
|
object LazEditMainForm: TLazEditMainForm
|
||||||
Left = 286
|
Left = 286
|
||||||
Height = 418
|
Height = 418
|
||||||
Top = 121
|
Top = 121
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user