From 99415e3982dd197e5344d11f4490cd5036e1706f Mon Sep 17 00:00:00 2001 From: tombo Date: Tue, 29 Jan 2008 13:16:44 +0000 Subject: [PATCH] IDE carbon: added option for creating Application Bundle to project Options git-svn-id: trunk@13908 - --- .gitattributes | 1 + ide/applicationbundle.pas | 197 ++++++++++++++++++++++++++++++++ ide/debugmanager.pas | 16 ++- ide/lazarusidestrconsts.pas | 12 +- ide/projectopts.lfm | 187 +++++++++++++++--------------- ide/projectopts.lrs | 222 ++++++++++++++++++------------------ ide/projectopts.pp | 35 +++++- 7 files changed, 458 insertions(+), 212 deletions(-) create mode 100644 ide/applicationbundle.pas diff --git a/.gitattributes b/.gitattributes index 5388c5041e..9e9b022350 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1854,6 +1854,7 @@ ide/abstractsmethodsdlg.pas svneol=native#text/plain ide/addtoprojectdlg.lfm svneol=native#text/plain ide/addtoprojectdlg.lrs svneol=native#text/plain ide/addtoprojectdlg.pas svneol=native#text/pascal +ide/applicationbundle.pas svneol=native#text/plain ide/basebuildmanager.pas svneol=native#text/plain ide/basedebugmanager.pas svneol=native#text/pascal ide/bigidemake.cfg svneol=native#text/plain diff --git a/ide/applicationbundle.pas b/ide/applicationbundle.pas new file mode 100644 index 0000000000..b2bb33d13c --- /dev/null +++ b/ide/applicationbundle.pas @@ -0,0 +1,197 @@ +{ /*************************************************************************** + ApplicationBundle.pas - Lazarus IDE unit + ------------------------------------------ + + ***************************************************************************/ + + *************************************************************************** + * * + * This source is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This code is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * General Public License for more details. * + * * + * A copy of the GNU General Public License is available on the World * + * Wide Web at . You can also * + * obtain it by writing to the Free Software Foundation, * + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * * + *************************************************************************** + + Abstract: + Application Bundle utilities + +} +unit ApplicationBundle; + +{$mode objfpc}{$H+} + +interface + +uses +{$IFDEF UNIX} + BaseUnix, +{$ENDIF} + Classes, SysUtils, FileUtil; + +type + EApplicationBundleException = Exception; + + { TApplicationPropertyList } + + TApplicationPropertyList = class(TStringList) + public + constructor Create(const ExeName: String; Title: String = ''; const Version: String = '0.1'); + end; + +procedure CreateApplicationBundle(const Filename: String; Title: String = ''); +procedure CreateSymbolicLink(const Filename: String); + +const + ApplicationBundleExt = '.app'; + ContentsDirName = 'Contents'; + MacOSDirName = 'MacOS'; + ResourcesDirName = 'Resources'; + PropertyListFileName = 'Info.plist'; + PackageInfoFileName = 'PkgInfo'; + PackageInfoHeader = 'APPL????'; + +resourcestring + rsCreatingDirFailed = 'Creating directory "%s" failed!'; + rsCreatingSymLinkFailed = 'Creating symbolic link "%s" failed!'; + rsCreatingSymLinkNotSupported = 'Creating symbolic link is not supported on this platform!'; + +implementation + +{ TApplicationPropertyList } + +constructor TApplicationPropertyList.Create(const ExeName: String; Title: String; const Version: String = '0.1'); +begin + inherited Create; + + if Title = '' then Title := ExeName; + + Add(''); + Add(''); + Add(''); + Add(''); + Add(' CFBundleDevelopmentRegion'); + Add(' English'); + Add(' CFBundleExecutable'); + Add(' ' + ExeName + ''); + Add(' CFBundleName'); + Add(' ' + Title + ''); + Add(' CFBundleIdentifier'); + Add(' com.company.' + ExeName + ''); + Add(' CFBundleInfoDictionaryVersion'); + Add(' 6.0'); + Add(' CFBundlePackageType'); + Add(' APPL'); + Add(' CFBundleSignature'); + Add(' ' + Copy(ExeName + '????', 1, 4) + ''); + Add(' CFBundleShortVersionString'); + Add(' ' + Version + ''); + Add(' CFBundleVersion'); + Add(' 1'); + Add(' CSResourcesFileMapped'); + Add(' '); + // for accepting files dropped on the dock icon: + Add(' CFBundleDocumentTypes'); + Add(' '); + Add(' '); + Add(' CFBundleTypeRole'); + Add(' Viewer'); + Add(' CFBundleTypeExtension'); + Add(' *'); + Add(' CFBundleTypeOSTypes'); + Add(' '); + Add(' fold'); + Add(' disk'); + Add(' ****'); + Add(' '); + Add(' '); + Add(' '); + Add(''); + Add(''); +end; + +procedure CreateDirectoryInteractive(const Directory: String); +begin + if not CreateDir(Directory) then + EApplicationBundleException.CreateFmt(rsCreatingDirFailed, [Directory]); +end; + +procedure CreateApplicationBundle(const Filename: String; Title: String); +var + AppBundleDir: String; + ContentsDir: String; + MacOSDir: String; + ResourcesDir: String; + + procedure CreatePackageInfoFile(const Path: String); + var + S: TStringList; + begin + S := TStringList.Create; + try + S.Add(PackageInfoHeader); + S.SaveToFile(Path + PackageInfoFileName); + finally + S.Free; + end; + end; + +begin + AppBundleDir := ExtractFileNameWithoutExt(Filename) + ApplicationBundleExt + PathDelim; + // create 'applicationname.app/' directory + CreateDirectoryInteractive(AppBundleDir); + begin + // create 'applicationname.app/Contents/' directory + ContentsDir := AppBundleDir + ContentsDirName + PathDelim; + CreateDirectoryInteractive(ContentsDir); + begin + // create 'applicationname.app/Contents/MacOS/' directory + MacOSDir := ContentsDir + MacOSDirName + PathDelim; + CreateDirectoryInteractive(MacOSDir); + + // create Info.plist file + with TApplicationPropertyList.Create(ExtractFileNameOnly(Filename), Title) do + SaveToFile(ContentsDir + PropertyListFileName); + + // create PkgInfo file + CreatePackageInfoFile(ContentsDir); + + // create 'applicationname.app/Contents/Resources/' directory + ResourcesDir:=ContentsDir + ResourcesDirName + PathDelim; + CreateDirectoryInteractive(ResourcesDir); + end; + end; +end; + +procedure CreateSymbolicLink(const Filename: String); +{$IFDEF UNIX} +var + ShortExeName: String; + LinkFilename: String; +{$ENDIF} +begin + {$IFDEF UNIX} + ShortExeName := ExtractFileNameOnly(Filename); + LinkFilename := ExtractFileNameWithoutExt(Filename) + ApplicationBundleExt + PathDelim + + ContentsDirName + PathDelim + MacOSDirName + PathDelim + ShortExeName; + if FPSymLink(PChar('..' + PathDelim + '..' + PathDelim + '..' + PathDelim + ShortExeName), + PChar(LinkFilename)) <> 0 then + raise EApplicationBundleException.CreateFmt(rsCreatingSymLinkFailed, [LinkFilename]); + {$ELSE} + raise EApplicationBundleException.Create(rsCreatingSymLinkNotSupported); + {$ENDIF} +end; + + + +end. diff --git a/ide/debugmanager.pas b/ide/debugmanager.pas index a4e70b06ab..8df9202f3b 100644 --- a/ide/debugmanager.pas +++ b/ide/debugmanager.pas @@ -46,7 +46,7 @@ uses SynEdit, CodeCache, CodeToolManager, MenuIntf, IDECommands, LazIDEIntf, ProjectIntf, LazConf, DebugOptionsFrm, - CompilerOptions, EditorOptions, EnvironmentOpts, KeyMapping, UnitEditor, + CompilerOptions, EditorOptions, EnvironmentOpts, ProjectOpts, KeyMapping, UnitEditor, ProjectDefs, Project, IDEProcs, InputHistory, Debugger, IDEOptionDefs, LazarusIDEStrConsts, MainBar, MainIntf, MainBase, BaseBuildManager, @@ -1710,11 +1710,15 @@ begin if not DirectoryExists(LaunchingApplication) then begin - MessageDlg(lisLaunchingApplicationInvalid, - Format(lisTheLaunchingApplicationBundleDoesNotExists, ['"', - LaunchingCmdLine, '"', #13, #13, #13]), - mtError, [mbOK],0); - Exit; + if MessageDlg(lisLaunchingApplicationInvalid, + Format(lisTheLaunchingApplicationBundleDoesNotExists, + [LaunchingCmdLine, #13, #13, #13, #13]), + mtError, [mbYes, mbNo, mbCancel], 0) = mrYes then + begin + if not CreateProjectApplicationBundle(Project1) then Exit; + end + else + Exit; end; if DebuggerClass = TProcessDebugger then diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index c5b50a108f..3d36aab3d3 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -1421,6 +1421,7 @@ resourcestring dlgPOOutputSettings = 'Output Settings'; dlgPOTargetFileName = 'Target file name:'; dlgPOUseAppBundle = 'Use Application Bundle for running and debugging (darwin only)'; + dlgPOCreateAppBundle = 'Create Application Bundle'; dlgPOUseManifest = 'Use manifest file to enable themes (windows only)'; dlgAutoCreateForms = 'Auto-create forms:'; dlgAvailableForms = 'Available forms:'; @@ -2582,10 +2583,9 @@ resourcestring +'application %s%s%' +'s%sdoes not exist or is not executable.%s%sSee Run -> Run parameters -> ' +'Local'; - lisTheLaunchingApplicationBundleDoesNotExists = 'The launching ' - +'Application Bundle %s%s%' - +'s%sdoes not exist or is not executable.%s%sSee Project -> Project options -> ' - +'Application.'; + lisTheLaunchingApplicationBundleDoesNotExists = 'The Application Bundle %s' + +'%sneeded for execution does not exist or is not executable.%sDo you want to create one?' + +'%s%sSee Project -> Project Options -> Application for settings.'; lisDebuggerInvalid = 'Debugger invalid'; lisTheDebuggerDoesNotExistsOrIsNotExecutableSeeEnviro = 'The debugger %s%s%' @@ -3624,6 +3624,10 @@ resourcestring lisVSRResetResultList = 'Reset Result List'; lisTDDInsertToDo = 'Insert ToDo'; + // Application Bundle + lisABCreationFailed = 'Error occured during Application Bundle creation: '; + + implementation end. diff --git a/ide/projectopts.lfm b/ide/projectopts.lfm index f8d42e59da..d83389f1ec 100644 --- a/ide/projectopts.lfm +++ b/ide/projectopts.lfm @@ -16,7 +16,7 @@ object ProjectOptionsDialog: TProjectOptionsDialog Position = poScreenCenter object Notebook: TNotebook AnchorSideBottom.Control = PODBtnPanel - Height = 377 + Height = 379 Width = 474 Align = alTop Anchors = [akTop, akLeft, akRight, akBottom] @@ -24,24 +24,24 @@ object ProjectOptionsDialog: TProjectOptionsDialog TabOrder = 0 object ApplicationPage: TPage Caption = 'ApplicationPage' - ClientWidth = 470 - ClientHeight = 347 + ClientWidth = 466 + ClientHeight = 353 object AppSettingsGroupBox: TGroupBox Left = 6 - Height = 124 + Height = 166 Top = 6 - Width = 458 + Width = 454 Align = alTop BorderSpacing.Around = 6 Caption = 'AppSettingsGroupBox' - ClientHeight = 107 - ClientWidth = 454 + ClientHeight = 148 + ClientWidth = 450 TabOrder = 0 object TitleLabel: TLabel Left = 6 - Height = 13 + Height = 14 Top = 6 - Width = 442 + Width = 438 Align = alTop BorderSpacing.Left = 6 BorderSpacing.Top = 6 @@ -52,8 +52,8 @@ object ProjectOptionsDialog: TProjectOptionsDialog object TitleEdit: TEdit Left = 6 Height = 23 - Top = 19 - Width = 442 + Top = 20 + Width = 438 Align = alTop BorderSpacing.Left = 6 BorderSpacing.Right = 6 @@ -64,7 +64,7 @@ object ProjectOptionsDialog: TProjectOptionsDialog Left = 6 Height = 24 Top = 52 - Width = 442 + Width = 438 Anchors = [akTop, akLeft, akRight] AutoSize = False Caption = 'UseAppBundleCheckBox' @@ -73,31 +73,41 @@ object ProjectOptionsDialog: TProjectOptionsDialog object UseXPManifestCheckBox: TCheckBox Left = 6 Height = 24 - Top = 76 - Width = 442 + Top = 118 + Width = 438 Anchors = [akTop, akLeft, akRight] AutoSize = False Caption = 'UseXPManifestCheckBox' TabOrder = 2 end + object CreateAppBundleButton: TButton + Left = 6 + Height = 23 + Top = 82 + Width = 140 + AutoSize = True + Caption = 'CreateAppBundleButton' + OnClick = CreateAppBundleButtonClick + TabOrder = 3 + end end object OutputSettingsGroupBox: TGroupBox Left = 6 - Height = 65 - Top = 136 - Width = 458 + Height = 67 + Top = 178 + Width = 454 Align = alTop AutoSize = True BorderSpacing.Around = 6 Caption = 'OutputSettingsGroupBox' - ClientHeight = 48 - ClientWidth = 454 + ClientHeight = 49 + ClientWidth = 450 TabOrder = 1 object TargetFileLabel: TLabel Left = 6 - Height = 13 + Height = 14 Top = 6 - Width = 442 + Width = 438 Align = alTop BorderSpacing.Left = 6 BorderSpacing.Top = 6 @@ -108,8 +118,8 @@ object ProjectOptionsDialog: TProjectOptionsDialog object TargetFileEdit: TEdit Left = 6 Height = 23 - Top = 19 - Width = 442 + Top = 20 + Width = 438 Align = alTop BorderSpacing.Left = 6 BorderSpacing.Right = 6 @@ -121,24 +131,24 @@ object ProjectOptionsDialog: TProjectOptionsDialog end object FormsPage: TPage Caption = 'FormsPage' - ClientWidth = 470 - ClientHeight = 347 + ClientWidth = 466 + ClientHeight = 353 OnContextPopup = FormsPageContextPopup OnResize = FormsPageResize object FormsAutoCreatedLabel: TLabel Left = 36 - Height = 13 + Height = 14 Top = 10 - Width = 136 + Width = 117 Caption = 'FormsAutoCreatedLabel' ParentColor = False end object FormsAvailFormsLabel: TLabel AnchorSideLeft.Control = FormsAvailFormsListBox Left = 266 - Height = 13 + Height = 14 Top = 10 - Width = 129 + Width = 107 Caption = 'FormsAvailFormsLabel' ParentColor = False end @@ -147,14 +157,13 @@ object ProjectOptionsDialog: TProjectOptionsDialog AnchorSideLeft.Side = asrBottom AnchorSideBottom.Control = FormsAutoCreateNewFormsCheckBox Left = 36 - Height = 283 + Height = 290 Top = 32 Width = 194 Anchors = [akTop, akLeft, akBottom] BorderSpacing.Around = 6 MultiSelect = True TabOrder = 0 - TopIndex = -1 end object FormsAvailFormsListBox: TListBox AnchorSideLeft.Control = FormsAddToAutoCreatedFormsBtn @@ -163,14 +172,13 @@ object ProjectOptionsDialog: TProjectOptionsDialog AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = FormsAutoCreateNewFormsCheckBox Left = 266 - Height = 283 + Height = 290 Top = 32 - Width = 198 + Width = 194 Anchors = [akTop, akLeft, akRight, akBottom] BorderSpacing.Around = 6 MultiSelect = True TabOrder = 1 - TopIndex = -1 end object FormsMoveAutoCreatedFormUpBtn: TArrow Left = 6 @@ -209,9 +217,9 @@ object ProjectOptionsDialog: TProjectOptionsDialog end object FormsAutoCreateNewFormsCheckBox: TCheckBox Left = 6 - Height = 20 - Top = 321 - Width = 458 + Height = 19 + Top = 328 + Width = 454 Align = alBottom BorderSpacing.Around = 6 Caption = 'FormsAutoCreateNewFormsCheckBox' @@ -220,15 +228,15 @@ object ProjectOptionsDialog: TProjectOptionsDialog end object MiscPage: TPage Caption = 'MiscPage' - ClientWidth = 474 - ClientHeight = 379 + ClientWidth = 466 + ClientHeight = 353 object MainUnitHasUsesSectionForAllUnitsCheckBox: TCheckBox AnchorSideTop.Control = MainUnitIsPascalSourceCheckBox AnchorSideTop.Side = asrBottom Left = 6 - Height = 22 - Top = 34 - Width = 462 + Height = 19 + Top = 31 + Width = 454 Align = alTop BorderSpacing.Around = 6 Caption = 'MainUnitHasUsesSectionForAllUnitsCheckBox' @@ -238,9 +246,9 @@ object ProjectOptionsDialog: TProjectOptionsDialog AnchorSideTop.Control = MainUnitHasUsesSectionForAllUnitsCheckBox AnchorSideTop.Side = asrBottom Left = 6 - Height = 22 - Top = 62 - Width = 462 + Height = 19 + Top = 56 + Width = 454 Align = alTop BorderSpacing.Around = 6 Caption = 'MainUnitHasCreateFormStatementsCheckBox' @@ -248,9 +256,9 @@ object ProjectOptionsDialog: TProjectOptionsDialog end object MainUnitIsPascalSourceCheckBox: TCheckBox Left = 6 - Height = 22 + Height = 19 Top = 6 - Width = 462 + Width = 454 Align = alTop BorderSpacing.Around = 6 Caption = 'MainUnitIsPascalSourceCheckBox' @@ -260,9 +268,9 @@ object ProjectOptionsDialog: TProjectOptionsDialog AnchorSideTop.Control = MainUnitHasCreateFormStatementsCheckBox AnchorSideTop.Side = asrBottom Left = 6 - Height = 22 - Top = 90 - Width = 462 + Height = 19 + Top = 81 + Width = 454 Align = alTop BorderSpacing.Around = 6 Caption = 'MainUnitHasTitleStatementCheckBox' @@ -272,9 +280,9 @@ object ProjectOptionsDialog: TProjectOptionsDialog AnchorSideTop.Control = MainUnitHasTitleStatementCheckBox AnchorSideTop.Side = asrBottom Left = 6 - Height = 22 - Top = 124 - Width = 462 + Height = 19 + Top = 112 + Width = 454 Align = alTop BorderSpacing.Top = 6 BorderSpacing.Around = 6 @@ -285,9 +293,9 @@ object ProjectOptionsDialog: TProjectOptionsDialog AnchorSideTop.Control = RunnableCheckBox AnchorSideTop.Side = asrBottom Left = 6 - Height = 22 - Top = 152 - Width = 462 + Height = 19 + Top = 137 + Width = 454 Align = alTop BorderSpacing.Around = 6 Caption = 'AlwaysBuildCheckBox' @@ -296,39 +304,38 @@ object ProjectOptionsDialog: TProjectOptionsDialog end object LazDocPage: TPage Caption = 'LazDocPage' - ClientWidth = 474 - ClientHeight = 379 + ClientWidth = 466 + ClientHeight = 353 object LazDocPathsGroupBox: TGroupBox Left = 6 - Height = 205 + Height = 196 Top = 6 - Width = 462 + Width = 454 Align = alTop AutoSize = True BorderSpacing.Around = 6 Caption = 'LazDocPathsGroupBox' - ClientHeight = 188 - ClientWidth = 458 + ClientHeight = 196 + ClientWidth = 454 TabOrder = 0 object LazDocListBox: TListBox AnchorSideRight.Side = asrBottom Left = 6 Height = 108 Top = 6 - Width = 446 + Width = 438 Align = alTop BorderSpacing.Around = 6 TabOrder = 0 - TopIndex = -1 end object LazDocAddPathButton: TButton AnchorSideLeft.Control = LazDocPathsGroupBox AnchorSideTop.Control = LazDocListBox AnchorSideTop.Side = asrBottom Left = 6 - Height = 31 + Height = 23 Top = 120 - Width = 163 + Width = 135 AutoSize = True BorderSpacing.Around = 6 Caption = 'LazDocAddPathButton' @@ -340,10 +347,10 @@ object ProjectOptionsDialog: TProjectOptionsDialog AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = LazDocListBox AnchorSideTop.Side = asrBottom - Left = 175 - Height = 31 + Left = 147 + Height = 23 Top = 120 - Width = 180 + Width = 147 AutoSize = True BorderSpacing.Around = 6 Caption = 'LazDocDeletePathButton' @@ -357,8 +364,8 @@ object ProjectOptionsDialog: TProjectOptionsDialog AnchorSideRight.Control = LazDocBrowseButton Left = 6 Height = 23 - Top = 157 - Width = 416 + Top = 149 + Width = 408 Anchors = [akTop, akLeft, akRight] BorderSpacing.Around = 6 TabOrder = 3 @@ -369,9 +376,9 @@ object ProjectOptionsDialog: TProjectOptionsDialog AnchorSideTop.Side = asrBottom AnchorSideRight.Control = LazDocPathsGroupBox AnchorSideRight.Side = asrBottom - Left = 428 + Left = 420 Height = 23 - Top = 157 + Top = 149 Width = 24 Anchors = [akTop, akRight] BorderSpacing.Around = 6 @@ -448,8 +455,8 @@ object ProjectOptionsDialog: TProjectOptionsDialog AutoSize = True BorderSpacing.Around = 6 Caption = 'Version Numbering' - ClientHeight = 83 - ClientWidth = 454 + ClientHeight = 100 + ClientWidth = 458 TabOrder = 0 object VersionLabel: TLabel AnchorSideLeft.Control = VersionInfoGroupBox @@ -578,8 +585,8 @@ object ProjectOptionsDialog: TProjectOptionsDialog AutoSize = True BorderSpacing.Around = 6 Caption = 'Language Options' - ClientHeight = 52 - ClientWidth = 454 + ClientHeight = 69 + ClientWidth = 458 TabOrder = 2 object LanguageSelectionLabel: TLabel AnchorSideLeft.Control = LanguageSettingsGroupBox @@ -648,8 +655,8 @@ object ProjectOptionsDialog: TProjectOptionsDialog AutoSize = True BorderSpacing.Around = 6 Caption = 'Other Info' - ClientHeight = 86 - ClientWidth = 454 + ClientHeight = 103 + ClientWidth = 458 TabOrder = 3 object DescriptionLabel: TLabel AnchorSideTop.Control = DescriptionEdit @@ -738,8 +745,8 @@ object ProjectOptionsDialog: TProjectOptionsDialog AutoSize = True BorderSpacing.Around = 6 Caption = 'i18n Options' - ClientHeight = 57 - ClientWidth = 458 + ClientHeight = 74 + ClientWidth = 462 TabOrder = 0 object PoOutDirLabel: TLabel Height = 20 @@ -793,19 +800,19 @@ object ProjectOptionsDialog: TProjectOptionsDialog end end object PODBtnPanel: TPanel - Height = 40 - Top = 377 + Height = 38 + Top = 379 Width = 474 Align = alBottom AutoSize = True BevelOuter = bvNone - ClientHeight = 40 + ClientHeight = 38 ClientWidth = 474 TabOrder = 1 object OKButton: TBitBtn AnchorSideBottom.Side = asrBottom - Left = 312 - Height = 28 + Left = 309 + Height = 26 Top = 6 Width = 75 Align = alRight @@ -823,10 +830,10 @@ object ProjectOptionsDialog: TProjectOptionsDialog object CancelButton: TBitBtn AnchorSideRight.Side = asrBottom AnchorSideBottom.Side = asrBottom - Left = 393 - Height = 28 + Left = 390 + Height = 26 Top = 6 - Width = 75 + Width = 78 Align = alRight AutoSize = True BorderSpacing.Around = 6 @@ -842,7 +849,7 @@ object ProjectOptionsDialog: TProjectOptionsDialog object HelpButton: TBitBtn AnchorSideBottom.Side = asrBottom Left = 6 - Height = 28 + Height = 26 Top = 6 Width = 75 Align = alLeft diff --git a/ide/projectopts.lrs b/ide/projectopts.lrs index 67f1383625..9d26312503 100644 --- a/ide/projectopts.lrs +++ b/ide/projectopts.lrs @@ -8,128 +8,130 @@ LazarusResources.Add('TProjectOptionsDialog','FORMDATA',[ +'ight'#3#161#1#11'ClientWidth'#3#218#1#21'Constraints.MinHeight'#3#144#1#20 +'Constraints.MinWidth'#3#144#1#7'OnClose'#7#19'ProjectOptionsClose'#8'Positi' +'on'#7#14'poScreenCenter'#0#9'TNotebook'#8'Notebook'#24'AnchorSideBottom.Con' - +'trol'#7#11'PODBtnPanel'#6'Height'#3'y'#1#5'Width'#3#218#1#5'Align'#7#5'alTo' + +'trol'#7#11'PODBtnPanel'#6'Height'#3'{'#1#5'Width'#3#218#1#5'Align'#7#5'alTo' +'p'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#9'PageIndex'#2 +#0#8'TabOrder'#2#0#0#5'TPage'#15'ApplicationPage'#7'Caption'#6#15'Applicatio' - +'nPage'#11'ClientWidth'#3#214#1#12'ClientHeight'#3'['#1#0#9'TGroupBox'#19'Ap' - +'pSettingsGroupBox'#4'Left'#2#6#6'Height'#2'|'#3'Top'#2#6#5'Width'#3#202#1#5 - +'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6#19'AppSettingsG' - +'roupBox'#12'ClientHeight'#2'k'#11'ClientWidth'#3#198#1#8'TabOrder'#2#0#0#6 - +'TLabel'#10'TitleLabel'#4'Left'#2#6#6'Height'#2#13#3'Top'#2#6#5'Width'#3#186 - +#1#5'Align'#7#5'alTop'#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6 - +#19'BorderSpacing.Right'#2#6#7'Caption'#6#10'TitleLabel'#11'ParentColor'#8#0 - +#0#5'TEdit'#9'TitleEdit'#4'Left'#2#6#6'Height'#2#23#3'Top'#2#19#5'Width'#3 - +#186#1#5'Align'#7#5'alTop'#18'BorderSpacing.Left'#2#6#19'BorderSpacing.Right' + +'nPage'#11'ClientWidth'#3#210#1#12'ClientHeight'#3'a'#1#0#9'TGroupBox'#19'Ap' + +'pSettingsGroupBox'#4'Left'#2#6#6'Height'#3#166#0#3'Top'#2#6#5'Width'#3#198#1 + +#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6#19'AppSetting' + +'sGroupBox'#12'ClientHeight'#3#148#0#11'ClientWidth'#3#194#1#8'TabOrder'#2#0 + +#0#6'TLabel'#10'TitleLabel'#4'Left'#2#6#6'Height'#2#14#3'Top'#2#6#5'Width'#3 + +#182#1#5'Align'#7#5'alTop'#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2 + +#6#19'BorderSpacing.Right'#2#6#7'Caption'#6#10'TitleLabel'#11'ParentColor'#8 + +#0#0#5'TEdit'#9'TitleEdit'#4'Left'#2#6#6'Height'#2#23#3'Top'#2#20#5'Width'#3 + +#182#1#5'Align'#7#5'alTop'#18'BorderSpacing.Left'#2#6#19'BorderSpacing.Right' +#2#6#8'TabOrder'#2#0#4'Text'#6#9'TitleEdit'#0#0#9'TCheckBox'#20'UseAppBundle' - +'CheckBox'#4'Left'#2#6#6'Height'#2#24#3'Top'#2'4'#5'Width'#3#186#1#7'Anchors' + +'CheckBox'#4'Left'#2#6#6'Height'#2#24#3'Top'#2'4'#5'Width'#3#182#1#7'Anchors' +#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize'#8#7'Caption'#6#20'UseAppBund' +'leCheckBox'#8'TabOrder'#2#1#0#0#9'TCheckBox'#21'UseXPManifestCheckBox'#4'Le' - +'ft'#2#6#6'Height'#2#24#3'Top'#2'L'#5'Width'#3#186#1#7'Anchors'#11#5'akTop'#6 + +'ft'#2#6#6'Height'#2#24#3'Top'#2'v'#5'Width'#3#182#1#7'Anchors'#11#5'akTop'#6 +'akLeft'#7'akRight'#0#8'AutoSize'#8#7'Caption'#6#21'UseXPManifestCheckBox'#8 - +'TabOrder'#2#2#0#0#0#9'TGroupBox'#22'OutputSettingsGroupBox'#4'Left'#2#6#6'H' - +'eight'#2'A'#3'Top'#3#136#0#5'Width'#3#202#1#5'Align'#7#5'alTop'#8'AutoSize' - +#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#22'OutputSettingsGroupBox'#12'C' - +'lientHeight'#2'0'#11'ClientWidth'#3#198#1#8'TabOrder'#2#1#0#6'TLabel'#15'Ta' - +'rgetFileLabel'#4'Left'#2#6#6'Height'#2#13#3'Top'#2#6#5'Width'#3#186#1#5'Ali' - +'gn'#7#5'alTop'#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#19'Bord' - +'erSpacing.Right'#2#6#7'Caption'#6#15'TargetFileLabel'#11'ParentColor'#8#0#0 - +#5'TEdit'#14'TargetFileEdit'#4'Left'#2#6#6'Height'#2#23#3'Top'#2#19#5'Width' - +#3#186#1#5'Align'#7#5'alTop'#18'BorderSpacing.Left'#2#6#19'BorderSpacing.Rig' - +'ht'#2#6#20'BorderSpacing.Bottom'#2#6#8'TabOrder'#2#0#4'Text'#6#14'TargetFil' - +'eEdit'#0#0#0#0#5'TPage'#9'FormsPage'#7'Caption'#6#9'FormsPage'#11'ClientWid' - +'th'#3#214#1#12'ClientHeight'#3'['#1#14'OnContextPopup'#7#21'FormsPageContex' - +'tPopup'#8'OnResize'#7#15'FormsPageResize'#0#6'TLabel'#21'FormsAutoCreatedLa' - +'bel'#4'Left'#2'$'#6'Height'#2#13#3'Top'#2#10#5'Width'#3#136#0#7'Caption'#6 - +#21'FormsAutoCreatedLabel'#11'ParentColor'#8#0#0#6'TLabel'#20'FormsAvailForm' - +'sLabel'#22'AnchorSideLeft.Control'#7#22'FormsAvailFormsListBox'#4'Left'#3#10 - +#1#6'Height'#2#13#3'Top'#2#10#5'Width'#3#129#0#7'Caption'#6#20'FormsAvailFor' - +'msLabel'#11'ParentColor'#8#0#0#8'TListBox'#23'FormsAutoCreatedListBox'#22'A' - +'nchorSideLeft.Control'#7#29'FormsMoveAutoCreatedFormUpBtn'#19'AnchorSideLef' - +'t.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#31'FormsAutoCreateNew' - +'FormsCheckBox'#4'Left'#2'$'#6'Height'#3#27#1#3'Top'#2' '#5'Width'#3#194#0#7 - +'Anchors'#11#5'akTop'#6'akLeft'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#11 - +'MultiSelect'#9#8'TabOrder'#2#0#8'TopIndex'#2#255#0#0#8'TListBox'#22'FormsAv' - +'ailFormsListBox'#22'AnchorSideLeft.Control'#7#29'FormsAddToAutoCreatedForms' - +'Btn'#19'AnchorSideLeft.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9 - +'FormsPage'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Cont' - +'rol'#7#31'FormsAutoCreateNewFormsCheckBox'#4'Left'#3#10#1#6'Height'#3#27#1#3 - +'Top'#2' '#5'Width'#3#198#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'ak' - +'Bottom'#0#20'BorderSpacing.Around'#2#6#11'MultiSelect'#9#8'TabOrder'#2#1#8 - +'TopIndex'#2#255#0#0#6'TArrow'#29'FormsMoveAutoCreatedFormUpBtn'#4'Left'#2#6 - +#6'Height'#2#24#3'Top'#2' '#5'Width'#2#24#9'ArrowType'#7#4'atUp'#7'OnClick'#7 - +'"FormsMoveAutoCreatedFormUpBtnClick'#0#0#6'TArrow FormsMoveAutoCreatedForms' - +'DownBtn'#4'Left'#2#6#6'Height'#2#24#3'Top'#2'<'#5'Width'#2#24#9'ArrowType'#7 - +#6'atDown'#7'OnClick'#7'$FormsMoveAutoCreatedFormDownBtnClick'#0#0#6'TArrow"' - +'FormsRemoveFromAutoCreatedFormsBtn'#22'AnchorSideLeft.Control'#7#23'FormsAu' - +'toCreatedListBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#236#0#6 - +'Height'#2#24#3'Top'#2' '#5'Width'#2#24#9'ArrowType'#7#7'atRight'#20'BorderS' - +'pacing.Around'#2#6#7'OnClick'#7'''FormsRemoveFromAutoCreatedFormsBtnClick'#0 - +#0#6'TArrow'#29'FormsAddToAutoCreatedFormsBtn'#22'AnchorSideLeft.Control'#7 - ,'"FormsRemoveFromAutoCreatedFormsBtn'#4'Left'#3#236#0#6'Height'#2#24#3'Top'#2 - +'<'#5'Width'#2#24#7'OnClick'#7'"FormsAddToAutoCreatedFormsBtnClick'#0#0#9'TC' - +'heckBox'#31'FormsAutoCreateNewFormsCheckBox'#4'Left'#2#6#6'Height'#2#20#3'T' - +'op'#3'A'#1#5'Width'#3#202#1#5'Align'#7#8'alBottom'#20'BorderSpacing.Around' - +#2#6#7'Caption'#6#31'FormsAutoCreateNewFormsCheckBox'#8'TabOrder'#2#2#0#0#0#5 - +'TPage'#8'MiscPage'#7'Caption'#6#8'MiscPage'#11'ClientWidth'#3#218#1#12'Clie' - +'ntHeight'#3'{'#1#0#9'TCheckBox)MainUnitHasUsesSectionForAllUnitsCheckBox'#21 - +'AnchorSideTop.Control'#7#30'MainUnitIsPascalSourceCheckBox'#18'AnchorSideTo' - +'p.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#22#3'Top'#2'"'#5'Width'#3#206 - +#1#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6')MainUnitHa' - +'sUsesSectionForAllUnitsCheckBox'#8'TabOrder'#2#0#0#0#9'TCheckBox''MainUnitH' - +'asCreateFormStatementsCheckBox'#21'AnchorSideTop.Control'#7')MainUnitHasUse' - +'sSectionForAllUnitsCheckBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2 - +#6#6'Height'#2#22#3'Top'#2'>'#5'Width'#3#206#1#5'Align'#7#5'alTop'#20'Border' - +'Spacing.Around'#2#6#7'Caption'#6'''MainUnitHasCreateFormStatementsCheckBox' - +#8'TabOrder'#2#1#0#0#9'TCheckBox'#30'MainUnitIsPascalSourceCheckBox'#4'Left' - +#2#6#6'Height'#2#22#3'Top'#2#6#5'Width'#3#206#1#5'Align'#7#5'alTop'#20'Borde' - +'rSpacing.Around'#2#6#7'Caption'#6#30'MainUnitIsPascalSourceCheckBox'#8'TabO' - +'rder'#2#2#0#0#9'TCheckBox!MainUnitHasTitleStatementCheckBox'#21'AnchorSideT' - +'op.Control'#7'''MainUnitHasCreateFormStatementsCheckBox'#18'AnchorSideTop.S' - +'ide'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#22#3'Top'#2'Z'#5'Width'#3#206#1 - +#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6'!MainUnitHasT' - +'itleStatementCheckBox'#8'TabOrder'#2#5#0#0#9'TCheckBox'#16'RunnableCheckBox' - +#21'AnchorSideTop.Control'#7'!MainUnitHasTitleStatementCheckBox'#18'AnchorSi' - +'deTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#22#3'Top'#2'|'#5'Width'#3 - +#206#1#5'Align'#7#5'alTop'#17'BorderSpacing.Top'#2#6#20'BorderSpacing.Around' - +#2#6#7'Caption'#6#16'RunnableCheckBox'#8'TabOrder'#2#3#0#0#9'TCheckBox'#19'A' - +'lwaysBuildCheckBox'#21'AnchorSideTop.Control'#7#16'RunnableCheckBox'#18'Anc' - +'horSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#22#3'Top'#3#152#0#5 - +'Width'#3#206#1#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6 - +#19'AlwaysBuildCheckBox'#8'TabOrder'#2#4#0#0#0#5'TPage'#10'LazDocPage'#7'Cap' - +'tion'#6#10'LazDocPage'#11'ClientWidth'#3#218#1#12'ClientHeight'#3'{'#1#0#9 - +'TGroupBox'#19'LazDocPathsGroupBox'#4'Left'#2#6#6'Height'#3#205#0#3'Top'#2#6 - +#5'Width'#3#206#1#5'Align'#7#5'alTop'#8'AutoSize'#9#20'BorderSpacing.Around' - +#2#6#7'Caption'#6#19'LazDocPathsGroupBox'#12'ClientHeight'#3#188#0#11'Client' - +'Width'#3#202#1#8'TabOrder'#2#0#0#8'TListBox'#13'LazDocListBox'#20'AnchorSid' - +'eRight.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2'l'#3'Top'#2#6#5'Width'#3 - +#190#1#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#8'TabOrder'#2#0#8'To' - +'pIndex'#2#255#0#0#7'TButton'#19'LazDocAddPathButton'#22'AnchorSideLeft.Cont' + +'TabOrder'#2#2#0#0#7'TButton'#21'CreateAppBundleButton'#4'Left'#2#6#6'Height' + +#2#23#3'Top'#2'R'#5'Width'#3#140#0#8'AutoSize'#9#7'Caption'#6#21'CreateAppBu' + +'ndleButton'#7'OnClick'#7#26'CreateAppBundleButtonClick'#8'TabOrder'#2#3#0#0 + +#0#9'TGroupBox'#22'OutputSettingsGroupBox'#4'Left'#2#6#6'Height'#2'C'#3'Top' + +#3#178#0#5'Width'#3#198#1#5'Align'#7#5'alTop'#8'AutoSize'#9#20'BorderSpacing' + +'.Around'#2#6#7'Caption'#6#22'OutputSettingsGroupBox'#12'ClientHeight'#2'1' + +#11'ClientWidth'#3#194#1#8'TabOrder'#2#1#0#6'TLabel'#15'TargetFileLabel'#4'L' + +'eft'#2#6#6'Height'#2#14#3'Top'#2#6#5'Width'#3#182#1#5'Align'#7#5'alTop'#18 + +'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#19'BorderSpacing.Right'#2 + +#6#7'Caption'#6#15'TargetFileLabel'#11'ParentColor'#8#0#0#5'TEdit'#14'Target' + +'FileEdit'#4'Left'#2#6#6'Height'#2#23#3'Top'#2#20#5'Width'#3#182#1#5'Align'#7 + +#5'alTop'#18'BorderSpacing.Left'#2#6#19'BorderSpacing.Right'#2#6#20'BorderSp' + +'acing.Bottom'#2#6#8'TabOrder'#2#0#4'Text'#6#14'TargetFileEdit'#0#0#0#0#5'TP' + +'age'#9'FormsPage'#7'Caption'#6#9'FormsPage'#11'ClientWidth'#3#210#1#12'Clie' + +'ntHeight'#3'a'#1#14'OnContextPopup'#7#21'FormsPageContextPopup'#8'OnResize' + +#7#15'FormsPageResize'#0#6'TLabel'#21'FormsAutoCreatedLabel'#4'Left'#2'$'#6 + +'Height'#2#14#3'Top'#2#10#5'Width'#2'u'#7'Caption'#6#21'FormsAutoCreatedLabe' + +'l'#11'ParentColor'#8#0#0#6'TLabel'#20'FormsAvailFormsLabel'#22'AnchorSideLe' + +'ft.Control'#7#22'FormsAvailFormsListBox'#4'Left'#3#10#1#6'Height'#2#14#3'To' + +'p'#2#10#5'Width'#2'k'#7'Caption'#6#20'FormsAvailFormsLabel'#11'ParentColor' + +#8#0#0#8'TListBox'#23'FormsAutoCreatedListBox'#22'AnchorSideLeft.Control'#7 + +#29'FormsMoveAutoCreatedFormUpBtn'#19'AnchorSideLeft.Side'#7#9'asrBottom'#24 + +'AnchorSideBottom.Control'#7#31'FormsAutoCreateNewFormsCheckBox'#4'Left'#2'$' + +#6'Height'#3'"'#1#3'Top'#2' '#5'Width'#3#194#0#7'Anchors'#11#5'akTop'#6'akLe' + +'ft'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#11'MultiSelect'#9#8'TabOrder' + +#2#0#0#0#8'TListBox'#22'FormsAvailFormsListBox'#22'AnchorSideLeft.Control'#7 + +#29'FormsAddToAutoCreatedFormsBtn'#19'AnchorSideLeft.Side'#7#9'asrBottom'#23 + +'AnchorSideRight.Control'#7#9'FormsPage'#20'AnchorSideRight.Side'#7#9'asrBot' + +'tom'#24'AnchorSideBottom.Control'#7#31'FormsAutoCreateNewFormsCheckBox'#4'L' + +'eft'#3#10#1#6'Height'#3'"'#1#3'Top'#2' '#5'Width'#3#194#0#7'Anchors'#11#5'a' + +'kTop'#6'akLeft'#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#11'Mu' + +'ltiSelect'#9#8'TabOrder'#2#1#0#0#6'TArrow'#29'FormsMoveAutoCreatedFormUpBtn' + +#4'Left'#2#6#6'Height'#2#24#3'Top'#2' '#5'Width'#2#24#9'ArrowType'#7#4'atUp' + +#7'OnClick'#7'"FormsMoveAutoCreatedFormUpBtnClick'#0#0#6'TArrow FormsMoveAut' + +'oCreatedFormsDownBtn'#4'Left'#2#6#6'Height'#2#24#3'Top'#2'<'#5'Width'#2#24#9 + +'ArrowType'#7#6'atDown'#7'OnClick'#7'$FormsMoveAutoCreatedFormDownBtnClick'#0 + +#0#6'TArrow"FormsRemoveFromAutoCreatedFormsBtn'#22'AnchorSideLeft.Control'#7 + +#23'FormsAutoCreatedListBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3 + +#236#0#6'Height'#2#24#3'Top'#2' '#5'Width'#2#24#9'ArrowType'#7#7'atRight'#20 + ,'BorderSpacing.Around'#2#6#7'OnClick'#7'''FormsRemoveFromAutoCreatedFormsBtn' + +'Click'#0#0#6'TArrow'#29'FormsAddToAutoCreatedFormsBtn'#22'AnchorSideLeft.Co' + +'ntrol'#7'"FormsRemoveFromAutoCreatedFormsBtn'#4'Left'#3#236#0#6'Height'#2#24 + +#3'Top'#2'<'#5'Width'#2#24#7'OnClick'#7'"FormsAddToAutoCreatedFormsBtnClick' + +#0#0#9'TCheckBox'#31'FormsAutoCreateNewFormsCheckBox'#4'Left'#2#6#6'Height'#2 + +#19#3'Top'#3'H'#1#5'Width'#3#198#1#5'Align'#7#8'alBottom'#20'BorderSpacing.A' + +'round'#2#6#7'Caption'#6#31'FormsAutoCreateNewFormsCheckBox'#8'TabOrder'#2#2 + +#0#0#0#5'TPage'#8'MiscPage'#7'Caption'#6#8'MiscPage'#11'ClientWidth'#3#210#1 + +#12'ClientHeight'#3'a'#1#0#9'TCheckBox)MainUnitHasUsesSectionForAllUnitsChec' + +'kBox'#21'AnchorSideTop.Control'#7#30'MainUnitIsPascalSourceCheckBox'#18'Anc' + +'horSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#19#3'Top'#2#31#5'Wi' + +'dth'#3#198#1#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6 + +')MainUnitHasUsesSectionForAllUnitsCheckBox'#8'TabOrder'#2#0#0#0#9'TCheckBox' + +'''MainUnitHasCreateFormStatementsCheckBox'#21'AnchorSideTop.Control'#7')Mai' + +'nUnitHasUsesSectionForAllUnitsCheckBox'#18'AnchorSideTop.Side'#7#9'asrBotto' + +'m'#4'Left'#2#6#6'Height'#2#19#3'Top'#2'8'#5'Width'#3#198#1#5'Align'#7#5'alT' + +'op'#20'BorderSpacing.Around'#2#6#7'Caption'#6'''MainUnitHasCreateFormStatem' + +'entsCheckBox'#8'TabOrder'#2#1#0#0#9'TCheckBox'#30'MainUnitIsPascalSourceChe' + +'ckBox'#4'Left'#2#6#6'Height'#2#19#3'Top'#2#6#5'Width'#3#198#1#5'Align'#7#5 + +'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6#30'MainUnitIsPascalSourceC' + +'heckBox'#8'TabOrder'#2#2#0#0#9'TCheckBox!MainUnitHasTitleStatementCheckBox' + +#21'AnchorSideTop.Control'#7'''MainUnitHasCreateFormStatementsCheckBox'#18'A' + +'nchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#19#3'Top'#2'Q'#5 + +'Width'#3#198#1#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6 + +'!MainUnitHasTitleStatementCheckBox'#8'TabOrder'#2#5#0#0#9'TCheckBox'#16'Run' + +'nableCheckBox'#21'AnchorSideTop.Control'#7'!MainUnitHasTitleStatementCheckB' + +'ox'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#19#3'Top' + +#2'p'#5'Width'#3#198#1#5'Align'#7#5'alTop'#17'BorderSpacing.Top'#2#6#20'Bord' + +'erSpacing.Around'#2#6#7'Caption'#6#16'RunnableCheckBox'#8'TabOrder'#2#3#0#0 + +#9'TCheckBox'#19'AlwaysBuildCheckBox'#21'AnchorSideTop.Control'#7#16'Runnabl' + +'eCheckBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#19 + +#3'Top'#3#137#0#5'Width'#3#198#1#5'Align'#7#5'alTop'#20'BorderSpacing.Around' + +#2#6#7'Caption'#6#19'AlwaysBuildCheckBox'#8'TabOrder'#2#4#0#0#0#5'TPage'#10 + +'LazDocPage'#7'Caption'#6#10'LazDocPage'#11'ClientWidth'#3#210#1#12'ClientHe' + +'ight'#3'a'#1#0#9'TGroupBox'#19'LazDocPathsGroupBox'#4'Left'#2#6#6'Height'#3 + +#196#0#3'Top'#2#6#5'Width'#3#198#1#5'Align'#7#5'alTop'#8'AutoSize'#9#20'Bord' + +'erSpacing.Around'#2#6#7'Caption'#6#19'LazDocPathsGroupBox'#12'ClientHeight' + +#3#196#0#11'ClientWidth'#3#198#1#8'TabOrder'#2#0#0#8'TListBox'#13'LazDocList' + +'Box'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2'l'#3'T' + +'op'#2#6#5'Width'#3#182#1#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#8 + +'TabOrder'#2#0#0#0#7'TButton'#19'LazDocAddPathButton'#22'AnchorSideLeft.Cont' +'rol'#7#19'LazDocPathsGroupBox'#21'AnchorSideTop.Control'#7#13'LazDocListBox' - +#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#31#3'Top'#2'x' - +#5'Width'#3#163#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#19 + +#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#23#3'Top'#2'x' + +#5'Width'#3#135#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#19 +'LazDocAddPathButton'#7'OnClick'#7#24'LazDocAddPathButtonClick'#8'TabOrder'#2 +#1#0#0#7'TButton'#22'LazDocDeletePathButton'#22'AnchorSideLeft.Control'#7#19 +'LazDocAddPathButton'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTo' +'p.Control'#7#13'LazDocListBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left' - +#3#175#0#6'Height'#2#31#3'Top'#2'x'#5'Width'#3#180#0#8'AutoSize'#9#20'Border' + +#3#147#0#6'Height'#2#23#3'Top'#2'x'#5'Width'#3#147#0#8'AutoSize'#9#20'Border' +'Spacing.Around'#2#6#7'Caption'#6#22'LazDocDeletePathButton'#7'OnClick'#7#27 +'LazDocDeletePathButtonClick'#8'TabOrder'#2#2#0#0#5'TEdit'#14'LazDocPathEdit' +#22'AnchorSideLeft.Control'#7#19'LazDocPathsGroupBox'#21'AnchorSideTop.Contr' +'ol'#7#19'LazDocAddPathButton'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'Anch' +'orSideRight.Control'#7#18'LazDocBrowseButton'#4'Left'#2#6#6'Height'#2#23#3 - +'Top'#3#157#0#5'Width'#3#160#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0 + +'Top'#3#149#0#5'Width'#3#152#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0 +#20'BorderSpacing.Around'#2#6#8'TabOrder'#2#3#4'Text'#6#14'LazDocPathEdit'#0 +#0#7'TButton'#18'LazDocBrowseButton'#21'AnchorSideTop.Control'#7#19'LazDocAd' +'dPathButton'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Contr' +'ol'#7#19'LazDocPathsGroupBox'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Lef' - +'t'#3#172#1#6'Height'#2#23#3'Top'#3#157#0#5'Width'#2#24#7'Anchors'#11#5'akTo' + +'t'#3#164#1#6'Height'#2#23#3'Top'#3#149#0#5'Width'#2#24#7'Anchors'#11#5'akTo' +'p'#7'akRight'#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#3'...'#7'OnClick' +#7#23'LazDocBrowseButtonClick'#8'TabOrder'#2#4#0#0#0#0#5'TPage'#8'SavePage'#7 +'Caption'#6#8'SavePage'#11'ClientWidth'#3#218#1#12'ClientHeight'#3'{'#1#0#9 +'TCheckBox'#26'SaveClosedUnitInfoCheckBox'#4'Left'#2#6#6'Height'#2#22#3'Top' - +#2#6#5'Width'#3#206#1#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Cap' + ,#2#6#5'Width'#3#206#1#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Cap' +'tion'#6#26'SaveClosedUnitInfoCheckBox'#8'TabOrder'#2#0#0#0#9'TCheckBox'#31 - ,'SaveOnlyProjectUnitInfoCheckBox'#21'AnchorSideTop.Control'#7#26'SaveClosedU' + +'SaveOnlyProjectUnitInfoCheckBox'#21'AnchorSideTop.Control'#7#26'SaveClosedU' +'nitInfoCheckBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height' +#2#22#3'Top'#2'"'#5'Width'#3#206#1#5'Align'#7#5'alTop'#20'BorderSpacing.Arou' +'nd'#2#6#7'Caption'#6#31'SaveOnlyProjectUnitInfoCheckBox'#8'TabOrder'#2#1#0#0 @@ -150,7 +152,7 @@ LazarusResources.Add('TProjectOptionsDialog','FORMDATA',[ +#18'AnchorSideTop.Side'#7#9'asrBottom'#20'AnchorSideRight.Side'#7#9'asrBotto' +'m'#4'Left'#2#6#6'Height'#2'd'#3'Top'#2' '#5'Width'#3#202#1#5'Align'#7#5'alT' +'op'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#17'Version Numb' - +'ering'#12'ClientHeight'#2'S'#11'ClientWidth'#3#198#1#8'TabOrder'#2#0#0#6'TL' + +'ering'#12'ClientHeight'#2'd'#11'ClientWidth'#3#202#1#8'TabOrder'#2#0#0#6'TL' +'abel'#12'VersionLabel'#22'AnchorSideLeft.Control'#7#19'VersionInfoGroupBox' +#21'AnchorSideTop.Control'#7#19'VersionInfoGroupBox'#4'Left'#2#6#6'Height'#2 +#13#3'Top'#2#6#5'Width'#2'/'#20'BorderSpacing.Around'#2#6#7'Caption'#6#8'Ver' @@ -191,9 +193,9 @@ LazarusResources.Add('TProjectOptionsDialog','FORMDATA',[ +'nfo in executable'#8'OnChange'#7#28'UseVersionInfoCheckBoxChange'#8'TabOrde' +'r'#2#1#0#0#9'TGroupBox'#24'LanguageSettingsGroupBox'#18'AnchorSideTop.Side' +#7#9'asrBottom'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height' - +#2'E'#3'Top'#3#138#0#5'Width'#3#202#1#5'Align'#7#5'alTop'#8'AutoSize'#9#20'B' + ,#2'E'#3'Top'#3#138#0#5'Width'#3#202#1#5'Align'#7#5'alTop'#8'AutoSize'#9#20'B' +'orderSpacing.Around'#2#6#7'Caption'#6#16'Language Options'#12'ClientHeight' - ,#2'4'#11'ClientWidth'#3#198#1#8'TabOrder'#2#2#0#6'TLabel'#22'LanguageSelecti' + +#2'E'#11'ClientWidth'#3#202#1#8'TabOrder'#2#2#0#6'TLabel'#22'LanguageSelecti' +'onLabel'#22'AnchorSideLeft.Control'#7#24'LanguageSettingsGroupBox'#21'Ancho' +'rSideTop.Control'#7#24'LanguageSettingsGroupBox'#4'Left'#2#6#6'Height'#2#13 +#3'Top'#2#6#5'Width'#2't'#20'BorderSpacing.Around'#2#6#7'Caption'#6#19'Langu' @@ -218,7 +220,7 @@ LazarusResources.Add('TProjectOptionsDialog','FORMDATA',[ +'oupBox'#17'OtherInfoGroupBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#20'Anch' +'orSideRight.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2'g'#3'Top'#3#213#0#5 +'Width'#3#202#1#5'Align'#7#5'alTop'#8'AutoSize'#9#20'BorderSpacing.Around'#2 - +#6#7'Caption'#6#10'Other Info'#12'ClientHeight'#2'V'#11'ClientWidth'#3#198#1 + +#6#7'Caption'#6#10'Other Info'#12'ClientHeight'#2'g'#11'ClientWidth'#3#202#1 +#8'TabOrder'#2#3#0#6'TLabel'#16'DescriptionLabel'#21'AnchorSideTop.Control'#7 +#15'DescriptionEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Hei' +'ght'#2#13#3'Top'#2#4#5'Width'#2'C'#18'BorderSpacing.Left'#2#6#7'Caption'#6 @@ -250,14 +252,14 @@ LazarusResources.Add('TProjectOptionsDialog','FORMDATA',[ +'OtherInfoGroupBox'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#6#6'He' +'ight'#2'J'#3'Top'#2'"'#5'Width'#3#206#1#5'Align'#7#5'alTop'#8'AutoSize'#9#20 +'BorderSpacing.Around'#2#6#7'Caption'#6#12'i18n Options'#12'ClientHeight'#2 - +'9'#11'ClientWidth'#3#202#1#8'TabOrder'#2#0#0#6'TLabel'#13'PoOutDirLabel'#6 + +'J'#11'ClientWidth'#3#206#1#8'TabOrder'#2#0#0#6'TLabel'#13'PoOutDirLabel'#6 +'Height'#2#20#5'Width'#3#132#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#20 +'PO Output Directory:'#11'ParentColor'#8#0#0#5'TEdit'#12'POOutDirEdit'#22'An' +'chorSideLeft.Control'#7#12'I18NGroupBox'#21'AnchorSideTop.Control'#7#13'PoO' +'utDirLabel'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Contro' - +'l'#7#14'POOutDirButton'#4'Left'#2#6#6'Height'#2#23#3'Top'#2#26#5'Width'#3 + ,'l'#7#14'POOutDirButton'#4'Left'#2#6#6'Height'#2#23#3'Top'#2#26#5'Width'#3 +#160#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#20'BorderSpacing.Around' - ,#2#6#8'TabOrder'#2#0#4'Text'#6#12'POOutDirEdit'#0#0#7'TButton'#14'POOutDirBu' + +#2#6#8'TabOrder'#2#0#4'Text'#6#12'POOutDirEdit'#0#0#7'TButton'#14'POOutDirBu' +'tton'#21'AnchorSideTop.Control'#7#13'PoOutDirLabel'#18'AnchorSideTop.Side'#7 +#9'asrBottom'#23'AnchorSideRight.Control'#7#12'I18NGroupBox'#20'AnchorSideRi' +'ght.Side'#7#9'asrBottom'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3 @@ -267,20 +269,20 @@ LazarusResources.Add('TProjectOptionsDialog','FORMDATA',[ +#4'Left'#2#6#6'Height'#2#22#3'Top'#2#6#5'Width'#3#206#1#5'Align'#7#5'alTop' +#20'BorderSpacing.Around'#2#6#7'Caption'#6#11'Enable i18n'#8'OnChange'#7#24 +'EnableI18NCheckBoxChange'#8'TabOrder'#2#1#0#0#0#0#6'TPanel'#11'PODBtnPanel' - +#6'Height'#2'('#3'Top'#3'y'#1#5'Width'#3#218#1#5'Align'#7#8'alBottom'#8'Auto' - +'Size'#9#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#2'('#11'ClientWidth'#3 + +#6'Height'#2'&'#3'Top'#3'{'#1#5'Width'#3#218#1#5'Align'#7#8'alBottom'#8'Auto' + +'Size'#9#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#2'&'#11'ClientWidth'#3 +#218#1#8'TabOrder'#2#1#0#7'TBitBtn'#8'OKButton'#21'AnchorSideBottom.Side'#7#9 - +'asrBottom'#4'Left'#3'8'#1#6'Height'#2#28#3'Top'#2#6#5'Width'#2'K'#5'Align'#7 + +'asrBottom'#4'Left'#3'5'#1#6'Height'#2#26#3'Top'#2#6#5'Width'#2'K'#5'Align'#7 +#7'alRight'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#3'&OK'#21 +'Constraints.MinHeight'#2#25#20'Constraints.MinWidth'#2'K'#7'Default'#9#4'Ki' +'nd'#7#4'bkOK'#11'ModalResult'#2#1#9'NumGlyphs'#2#0#8'TabOrder'#2#0#0#0#7'TB' +'itBtn'#12'CancelButton'#20'AnchorSideRight.Side'#7#9'asrBottom'#21'AnchorSi' - +'deBottom.Side'#7#9'asrBottom'#4'Left'#3#137#1#6'Height'#2#28#3'Top'#2#6#5'W' - +'idth'#2'K'#5'Align'#7#7'alRight'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6 + +'deBottom.Side'#7#9'asrBottom'#4'Left'#3#134#1#6'Height'#2#26#3'Top'#2#6#5'W' + +'idth'#2'N'#5'Align'#7#7'alRight'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6 +#6'Cancel'#9#7'Caption'#6#6'Cancel'#21'Constraints.MinHeight'#2#25#20'Constr' +'aints.MinWidth'#2'K'#4'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#9'NumGlyphs' +#2#0#8'TabOrder'#2#1#0#0#7'TBitBtn'#10'HelpButton'#21'AnchorSideBottom.Side' - +#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#28#3'Top'#2#6#5'Width'#2'K'#5'Align' + +#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#26#3'Top'#2#6#5'Width'#2'K'#5'Align' +#7#6'alLeft'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#5'&Help' +#21'Constraints.MinHeight'#2#25#20'Constraints.MinWidth'#2'K'#4'Kind'#7#6'bk' +'Help'#9'NumGlyphs'#2#0#7'OnClick'#7#15'HelpButtonClick'#8'TabOrder'#2#2#0#0 diff --git a/ide/projectopts.pp b/ide/projectopts.pp index f5533df321..41acea1ea0 100644 --- a/ide/projectopts.pp +++ b/ide/projectopts.pp @@ -38,16 +38,17 @@ interface uses Arrow, Buttons, StdCtrls, SysUtils, LCLProc, Classes, CodeToolManager, Controls, Dialogs, LCLIntf, LResources, ExtCtrls, Forms, Graphics, Spin, - FileUtil, IDEContextHelpEdit, + FileUtil, IDEContextHelpEdit, EnvironmentOpts, IDEWindowIntf, ProjectIntf, IDEDialogs, IDEOptionDefs, LazarusIDEStrConsts, Project, IDEProcs, W32VersionInfo, - VersionInfoAdditionalInfo, W32Manifest; + VersionInfoAdditionalInfo, W32Manifest, ApplicationBundle; type { TProjectOptionsDialog } TProjectOptionsDialog = class(TForm) + CreateAppBundleButton: TButton; EnableI18NCheckBox: TCheckBox; I18NGroupBox: TGroupBox; PODBtnPanel: TPanel; @@ -138,6 +139,7 @@ type OKButton: TBitBtn; procedure AdditionalInfoButtonClick(Sender: TObject); + procedure CreateAppBundleButtonClick(Sender: TObject); procedure EnableI18NCheckBoxChange(Sender: TObject); procedure FormsPageContextPopup(Sender: TObject; MousePos: TPoint; var Handled: Boolean); procedure FormsPageResize(Sender: TObject); @@ -182,6 +184,8 @@ type function ShowProjectOptionsDialog(AProject: TProject): TModalResult; +function CreateProjectApplicationBundle(AProject: TProject): Boolean; + function ProjectSessionStorageToLocalizedName(s: TProjectSessionStorage): string; function LocalizedNameToProjectSessionStorage( const s: string): TProjectSessionStorage; @@ -200,6 +204,27 @@ begin end; end; +function CreateProjectApplicationBundle(AProject: TProject): Boolean; +var + TargetExeName: String; +begin + Result := False; + if AProject.MainUnitInfo = nil then Exit; + try + if AProject.IsVirtual then + TargetExeName := EnvironmentOptions.GetTestBuildDirectory + ExtractFilename(AProject.MainUnitInfo.Filename) + else + TargetExeName := AProject.CompilerOptions.CreateTargetFilename(AProject.MainFilename); + + CreateApplicationBundle(TargetExeName, AProject.Title); + CreateSymbolicLink(TargetExeName); + Result := True; + except + on E: Exception do + MessageDlg(lisABCreationFailed + E.Message, mtError, [mbCancel], 0); + end; +end; + function ProjectSessionStorageToLocalizedName(s: TProjectSessionStorage ): string; begin @@ -260,6 +285,7 @@ begin UseAppBundleCheckBox.Checked := False; UseXPManifestCheckBox.Caption := dlgPOUseManifest; UseXPManifestCheckBox.Checked := False; + CreateAppBundleButton.Caption := dlgPOCreateAppBundle; end; procedure TProjectOptionsDialog.SetupLazDocPage(PageIndex: Integer); @@ -529,6 +555,11 @@ begin Project.Modified:=true; end; +procedure TProjectOptionsDialog.CreateAppBundleButtonClick(Sender: TObject); +begin + CreateProjectApplicationBundle(Project); +end; + procedure TProjectOptionsDialog.EnableI18NCheckBoxChange(Sender: TObject); begin Enablei18nInfo(EnableI18NCheckBox.Checked);