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!
|
||||
|
||||
[Setup]
|
||||
AppName=LazEyes
|
||||
AppVerName=LazEyes v2.0
|
||||
AppPublisherURL=http://wiki.lazarus.freepascal.org/LazEyes
|
||||
AppSupportURL=http://wiki.lazarus.freepascal.org/LazEyes
|
||||
AppUpdatesURL=http://wiki.lazarus.freepascal.org/LazEyes
|
||||
DefaultDirName={pf}\LazEyes
|
||||
AppName=LazEdit
|
||||
AppVerName=LazEdit v1.9
|
||||
AppPublisherURL=http://wiki.lazarus.freepascal.org/LazEdit
|
||||
AppSupportURL=http://wiki.lazarus.freepascal.org/LazEdit
|
||||
AppUpdatesURL=http://wiki.lazarus.freepascal.org/LazEdit
|
||||
DefaultDirName={pf}\LazEdit
|
||||
DefaultGroupName=Free Pascal Applications Suite
|
||||
; LicenseFile=..\license.txt
|
||||
OutputDir=.\
|
||||
OutputBaseFilename=LazEyes2.0_install
|
||||
OutputBaseFilename=LazEdit1.9_install
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
VersionInfoVersion=2.0
|
||||
VersionInfoVersion=1.9
|
||||
AllowNoIcons=yes
|
||||
|
||||
[Languages]
|
||||
@ -33,20 +33,25 @@ Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl"
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||
|
||||
[Files]
|
||||
Source: "..\lazeyes2.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\lazedit.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
; Source: "..\Images\*.png"; DestDir: "{app}\Images"; Flags: ignoreversion
|
||||
; Source: "..\libraries\pas_overlays\pas_overlays.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
|
||||
|
||||
[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]
|
||||
Name: "{group}\LazEyes"; Filename: "{app}\lazeyes2.exe"
|
||||
Name: "{group}\{cm:ProgramOnTheWeb,LazEyes}"; Filename: "http://wiki.lazarus.freepascal.org/LazEyes"
|
||||
Name: "{group}\{cm:UninstallProgram,LazEyes}"; Filename: "{uninstallexe}"
|
||||
Name: "{commondesktop}\LazEyes"; Filename: "{app}\lazeyes2.exe"; Tasks: desktopicon
|
||||
Name: "{group}\LazEdit"; Filename: "{app}\lazedit.exe"
|
||||
Name: "{group}\{cm:ProgramOnTheWeb,LazEdit}"; Filename: "http://wiki.lazarus.freepascal.org/LazEdit"
|
||||
Name: "{group}\{cm:UninstallProgram,LazEdit}"; Filename: "{uninstallexe}"
|
||||
Name: "{commondesktop}\LazEdit"; Filename: "{app}\lazedit.exe"; Tasks: desktopicon
|
||||
|
||||
[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"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="eplus"/>
|
||||
<Filename Value="lazedit"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
@ -84,7 +84,7 @@
|
||||
<Unit1>
|
||||
<Filename Value="main.pp"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="EPlusForm"/>
|
||||
<ComponentName Value="LazEditMainForm"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="main"/>
|
||||
</Unit1>
|
||||
|
@ -7,16 +7,33 @@ uses
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, main, lazedit_translations, EditorPageControl, HtmlCode {,newtableform, test_ed, eplus_commons, CopyLeft, eplus_config, HtmlCharMap,
|
||||
HtmlDialogs, NewHtmlDlgForm, AnchorDlgForm, PictureDlgForm}
|
||||
{ you can add units after this };
|
||||
Forms, main,
|
||||
lazedit_translations,
|
||||
EditorPageControl,
|
||||
HtmlCode,
|
||||
lazedit_constants;
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource := True;
|
||||
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;
|
||||
end.
|
||||
|
||||
|
@ -44,7 +44,7 @@ uses
|
||||
|
||||
type
|
||||
//globale type for all configurable options
|
||||
TEPlusOptions = record
|
||||
TLazEditOptions = record
|
||||
EditorOptions: TEditorOptions;
|
||||
MainForm: record
|
||||
Position: TRect; //used as Left, Top, Widht, Height
|
||||
@ -75,8 +75,8 @@ type
|
||||
Translation: Integer;
|
||||
end;
|
||||
|
||||
function LoadOptions(var Options: TEPlusOptions; FileName: String): Boolean;
|
||||
function SaveOptions(const Options: TEPlusOptions; FileName: String): Boolean;
|
||||
function LoadOptions(var Options: TLazEditOptions; FileName: String): Boolean;
|
||||
function SaveOptions(const Options: TLazEditOptions; FileName: String): Boolean;
|
||||
function GetDefaultIniNameOnly: String;
|
||||
function GetDefaultIniDir: String;
|
||||
|
||||
@ -107,7 +107,7 @@ const
|
||||
idFilePrefix = 'File_%d';
|
||||
|
||||
|
||||
function LoadOptions(var Options: TEPlusOptions; FileName: String): Boolean;
|
||||
function LoadOptions(var Options: TLazEditOptions; FileName: String): Boolean;
|
||||
var
|
||||
Ini: TIniFile;
|
||||
ftIndex: TEditorFileType;
|
||||
@ -165,7 +165,7 @@ begin
|
||||
if (S <> '') then Options.FileTypeMaskList[ftIndex] := S;
|
||||
end;
|
||||
|
||||
// Translation
|
||||
// Translation and other general
|
||||
Options.Translation := Ini.ReadInteger(scGeneral, idTranslation, 0);
|
||||
|
||||
finally
|
||||
@ -183,7 +183,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function SaveOptions(const Options: TEPlusOptions; FileName: String): Boolean;
|
||||
function SaveOptions(const Options: TLazEditOptions; FileName: String): Boolean;
|
||||
var
|
||||
Ini: TIniFile;
|
||||
ftIndex: TEditorFileType;
|
||||
@ -238,7 +238,7 @@ begin
|
||||
Ini.WriteString(scFileTypes, eftNames[ftIndex], Options.FileTypeMaskList[ftIndex]);
|
||||
end;
|
||||
|
||||
// Translation
|
||||
// Translation and other general
|
||||
Ini.WriteInteger(scGeneral, idTranslation, Options.Translation);
|
||||
|
||||
try
|
||||
|
@ -1,4 +1,4 @@
|
||||
object EPlusForm: TEPlusForm
|
||||
object LazEditMainForm: TLazEditMainForm
|
||||
Left = 286
|
||||
Height = 418
|
||||
Top = 121
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user