• R/O
  • SSH
  • HTTPS

dprojfilter: Commit


Commit MetaInfo

Revision15 (tree)
Time2018-08-25 20:19:31
Authordummzeuch

Log Message

this was the original tool called dzDprojEdit which for whatever reason never was publicly available

Change Summary

Incremental Difference

--- branches/dzDprojEdit/trunk/src/dzDprojEdit.dpr (nonexistent)
+++ branches/dzDprojEdit/trunk/src/dzDprojEdit.dpr (revision 15)
@@ -0,0 +1,21 @@
1+program dzDprojEdit;
2+
3+{$APPTYPE CONSOLE}
4+
5+uses
6+ SysUtils,
7+ u_dzDefaultMain in '..\libs\dzlib\src\u_dzDefaultMain.pas',
8+ u_DprojEditMain in 'u_DprojEditMain.pas';
9+
10+{$R *_version.res}
11+{$R *_icon.res}
12+{$R *_manifest.res}
13+
14+begin
15+// Application.Initialize;
16+// Application.MainFormOnTaskbar := true; // optional for Delphi >= 2007
17+// Application.Title := '<your application's title here>';
18+ MainClass := TDprojEditMain;
19+ System.ExitCode := Main;
20+end.
21+
--- branches/dzDprojEdit/trunk/src/dzDprojEdit.dproj (nonexistent)
+++ branches/dzDprojEdit/trunk/src/dzDprojEdit.dproj (revision 15)
@@ -0,0 +1,216 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+ <PropertyGroup>
4+ <ProjectGuid>{effe0f98-d4c7-48b8-ad94-a540e9475ab2}</ProjectGuid>
5+ <Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
6+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+ <DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
8+ <DCC_DependencyCheckOutputName>..\dzDprojEdit.exe</DCC_DependencyCheckOutputName>
9+ <MainSource>dzDprojEdit.dpr</MainSource>
10+ </PropertyGroup>
11+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
12+ <Version>7.0</Version>
13+ <DCC_DebugInformation>False</DCC_DebugInformation>
14+ <DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
15+ <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
16+ <DCC_Define>RELEASE;no_translation;no_translation_hint</DCC_Define>
17+ <DCC_Description>$(BDS)\lib\Debug;..\libs\dzlib\src;..\libs\dzlib\templates;..\libs\dzlib\jedi_inc</DCC_Description>
18+ <DCC_ExeOutput>..</DCC_ExeOutput>
19+ <DCC_DcuOutput>..\dcu\win32\release</DCC_DcuOutput>
20+ <DCC_ObjOutput>..\dcu\win32\release</DCC_ObjOutput>
21+ <DCC_HppOutput>..\dcu\win32\release</DCC_HppOutput>
22+ <DCC_UnitSearchPath>..\libs\dzlib\src;..\libs\dzlib\templates;..\libs\dzlib\jedi_inc</DCC_UnitSearchPath>
23+ <DCC_ResourcePath>..\libs\dzlib\src;..\libs\dzlib\templates;..\libs\dzlib\jedi_inc</DCC_ResourcePath>
24+ <DCC_ObjPath>..\libs\dzlib\src;..\libs\dzlib\templates;..\libs\dzlib\jedi_inc</DCC_ObjPath>
25+ <DCC_IncludePath>..\libs\dzlib\src;..\libs\dzlib\templates;..\libs\dzlib\jedi_inc</DCC_IncludePath>
26+ <DCC_MapFile>3</DCC_MapFile>
27+ <DCC_SYMBOL_PLATFORM>False</DCC_SYMBOL_PLATFORM>
28+ <DCC_UNIT_PLATFORM>False</DCC_UNIT_PLATFORM>
29+ <DCC_ConsoleTarget>True</DCC_ConsoleTarget>
30+ </PropertyGroup>
31+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
32+ <Version>7.0</Version>
33+ <DCC_Optimize>False</DCC_Optimize>
34+ <DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;Actions=ActnList</DCC_UnitAlias>
35+ <DCC_MapFile>3</DCC_MapFile>
36+ <DCC_ConsoleTarget>True</DCC_ConsoleTarget>
37+ <DCC_ExeOutput>..</DCC_ExeOutput>
38+ <DCC_DcuOutput>..\dcu\win32\debug</DCC_DcuOutput>
39+ <DCC_ObjOutput>..\dcu\win32\debug</DCC_ObjOutput>
40+ <DCC_HppOutput>..\dcu\win32\debug</DCC_HppOutput>
41+ <DCC_UnitSearchPath>$(BDS)\lib\Debug;..\libs\dzlib\src;..\libs\dzlib\templates;..\libs\dzlib\jedi_inc</DCC_UnitSearchPath>
42+ <DCC_ResourcePath>$(BDS)\lib\Debug;..\libs\dzlib\src;..\libs\dzlib\templates;..\libs\dzlib\jedi_inc</DCC_ResourcePath>
43+ <DCC_ObjPath>$(BDS)\lib\Debug;..\libs\dzlib\src;..\libs\dzlib\templates;..\libs\dzlib\jedi_inc</DCC_ObjPath>
44+ <DCC_IncludePath>$(BDS)\lib\Debug;..\libs\dzlib\src;..\libs\dzlib\templates;..\libs\dzlib\jedi_inc</DCC_IncludePath>
45+ <DCC_SYMBOL_PLATFORM>False</DCC_SYMBOL_PLATFORM>
46+ <DCC_UNIT_PLATFORM>False</DCC_UNIT_PLATFORM>
47+ <DCC_Description>dzDprojEdit</DCC_Description>
48+ <DCC_Define>DEBUG;no_translation;no_translation_hint</DCC_Define>
49+ </PropertyGroup>
50+ <ProjectExtensions>
51+ <Borland.Personality>Delphi.Personality</Borland.Personality>
52+ <Borland.ProjectType />
53+ <BorlandProject>
54+<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters><Parameters Name="RunParams"></Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">False</VersionInfo><VersionInfo Name="AutoIncBuild">True</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">74</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1031</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">www.dummzeuch.de</VersionInfoKeys><VersionInfoKeys Name="FileDescription">Delphi 7 help for BDS expert</VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.74</VersionInfoKeys><VersionInfoKeys Name="InternalName">Delphi 7 help for BDS expert</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright">copyright 2006 Thomas Mueller</VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename">Delphi7HelpForBdsExpert.bpl</VersionInfoKeys><VersionInfoKeys Name="ProductName">Delphi 7 help for BDS</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
55+
56+
57+
58+
59+
60+
61+
62+
63+
64+
65+
66+
67+
68+
69+
70+
71+
72+
73+
74+
75+
76+
77+
78+
79+
80+
81+
82+
83+
84+
85+
86+
87+
88+
89+
90+
91+
92+
93+
94+
95+
96+
97+
98+
99+
100+
101+
102+
103+
104+
105+
106+
107+
108+
109+
110+
111+
112+
113+
114+
115+
116+
117+
118+
119+
120+
121+
122+
123+
124+
125+
126+
127+
128+
129+
130+
131+
132+
133+
134+
135+
136+
137+
138+
139+
140+
141+
142+
143+
144+
145+
146+
147+
148+
149+
150+
151+
152+
153+
154+
155+
156+
157+
158+
159+
160+
161+
162+
163+
164+
165+
166+
167+
168+
169+
170+
171+
172+
173+
174+
175+
176+
177+
178+
179+
180+
181+
182+
183+
184+
185+
186+
187+
188+
189+
190+
191+
192+
193+
194+
195+
196+
197+
198+
199+ <Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
200+ <Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
201+ <Excluded_Packages Name="$(BDS)\bin\dcltee7100.bpl">TeeChart Components</Excluded_Packages>
202+ </Excluded_Packages><Source><Source Name="MainSource">dzDprojEdit.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
203+ </ProjectExtensions>
204+ <Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
205+ <PropertyGroup>
206+ <PreBuildEvent>call ..\buildtools\prebuild.cmd $(PROJECTPATH)</PreBuildEvent>
207+ <PostBuildEvent>call ..\buildtools\postbuild.cmd $(OUTPUTDIR)$(OUTPUTNAME)</PostBuildEvent>
208+ </PropertyGroup>
209+ <ItemGroup>
210+ <DelphiCompile Include="dzDprojEdit.dpr">
211+ <MainSource>MainSource</MainSource>
212+ </DelphiCompile>
213+ <DCCReference Include="..\libs\dzlib\src\u_dzDefaultMain.pas" />
214+ <DCCReference Include="u_DprojEditMain.pas" />
215+ </ItemGroup>
216+</Project>
--- branches/dzDprojEdit/trunk/src/dzDprojEdit.manifest.in (nonexistent)
+++ branches/dzDprojEdit/trunk/src/dzDprojEdit.manifest.in (revision 15)
@@ -0,0 +1,50 @@
1+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+<!--
3+ This manifest tells Windows Vista (and Windows 7/8) not to virtualize any file
4+ or registry access. Also, it disables themes support.
5+ -->
6+ <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
7+ <assemblyIdentity version="1.0.0.0"
8+ processorArchitecture="*"
9+ name="template from dzlib build tools"
10+ type="win32"/>
11+<!-- We do not want themes support
12+ <dependency>
13+ <dependentassembly>
14+ <assemblyidentity type="win32"
15+ name="Microsoft.Windows.Common-Controls"
16+ version="6.0.0.0"
17+ publickeytoken="6595b64144ccf1df"
18+ language="*" processorarchitecture="*">
19+ </assemblyidentity>
20+ </dependentassembly>
21+ <dependency>
22+ -->
23+ <description>This application was built using buildtools from dzlib</description>
24+ <!-- COMPATIBILITY SECTION SPECIFIES IF APP IS COMPLIANT
25+ DISABLES PCA IF SPECIFIED -->
26+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
27+ <application>
28+ <!-- We support Windows Vista -->
29+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
30+ <!-- We support Windows 7 -->
31+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
32+ <!-- We support Windows 8 -->
33+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
34+ <!-- We support Windows 8.1 -->
35+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
36+ </application>
37+ </compatibility>
38+
39+ <!-- TRUSTINFO SECTION SPECIFIES REQUESTED PERMISSIONS AND
40+ UIPI DISABLEMENT (SPECIAL CONDITIONS APPLY TO UIPI DISABLEMENT)-->
41+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
42+ <security>
43+ <requestedPrivileges>
44+ <requestedExecutionLevel
45+ level="asInvoker"
46+ uiAccess="false"/>
47+ </requestedPrivileges>
48+ </security>
49+ </trustInfo>
50+</assembly>
\ No newline at end of file
--- branches/dzDprojEdit/trunk/src/dzDprojEdit_version.ini (nonexistent)
+++ branches/dzDprojEdit/trunk/src/dzDprojEdit_version.ini (revision 15)
@@ -0,0 +1,21 @@
1+[Version Info]
2+AutoIncBuild=0
3+Build=10
4+MajorVer=1
5+MinorVer=0
6+Release=0
7+Revision=0
8+
9+[Version Info Keys]
10+FileVersion=1.0.0.10
11+ProductVersion={today}
12+FileDescription=dzDprojEdit
13+OriginalFilename=dzDprojEdit.exe
14+Comments=
15+CompanyName=dummzeuch.de
16+InternalName=dzDprojEdit
17+LegalCopyright=Thomas Mueller, 2013-{ThisYear}
18+LegalTrademarks=T. Mueller
19+ProductName=dzDprojEdit
20+BuildDateTime={today}
21+
--- branches/dzDprojEdit/trunk/src/u_DprojEditMain.pas (nonexistent)
+++ branches/dzDprojEdit/trunk/src/u_DprojEditMain.pas (revision 15)
@@ -0,0 +1,152 @@
1+unit u_DprojEditMain;
2+
3+interface
4+
5+uses
6+ SysUtils,
7+ Classes,
8+ u_dzTranslator,
9+ u_dzDefaultMain;
10+
11+type
12+ TDprojEditMain = class(TDefaultMain)
13+ private
14+ FDproj: TStringList;
15+ procedure SetDccNamespace(const _DccNamespace: string);
16+ function Find(const _Line: string; out _Idx: Integer): Boolean;
17+ function SameLine(const _Line1, _Line2: string): Boolean;
18+ function StartsLine(const _SubText, _Line2: string): Boolean;
19+ function EndsLine(const _SubText, _Line2: string): Boolean;
20+ procedure SetLine(_Idx: Integer; const _Line: string);
21+ protected
22+ procedure InitCmdLineParser; override;
23+ function doExecute: Integer; override;
24+ end;
25+
26+implementation
27+
28+uses
29+ StrUtils,
30+ u_dzStringUtils,
31+ u_dzFileUtils;
32+
33+{ TDprojEditMain }
34+
35+function TDprojEditMain.StartsLine(const _SubText, _Line2: string): Boolean;
36+begin
37+ Result := StartsText(_SubText, Trim(_Line2));
38+end;
39+
40+function TDprojEditMain.EndsLine(const _SubText, _Line2: string): Boolean;
41+begin
42+ Result := EndsText(_SubText, Trim(_Line2));
43+end;
44+
45+function TDprojEditMain.SameLine(const _Line1, _Line2: string): Boolean;
46+begin
47+ Result := SameText(Trim(_Line1), Trim(_Line2));
48+end;
49+
50+function TDprojEditMain.Find(const _Line: string; out _Idx: Integer): Boolean;
51+var
52+ i: Integer;
53+ Line: string;
54+begin
55+ for i := 0 to FDproj.Count - 1 do begin
56+ Line := FDproj[i];
57+ if SameLine(Line, _Line) then begin
58+ _Idx := i;
59+ Result := True;
60+ Exit;
61+ end;
62+ end;
63+ Result := False;
64+end;
65+
66+function IsWhitespace(_c: Char): Boolean;
67+begin
68+ Result := (_c in [' ', #9]);
69+end;
70+
71+procedure TDprojEditMain.SetLine(_Idx: Integer; const _Line: string);
72+var
73+ Line: string;
74+ i: Integer;
75+begin
76+ Line := FDproj[_Idx];
77+ i := 1;
78+ while (i <= Length(Line)) and IsWhitespace(Line[i]) do
79+ Inc(i);
80+ Line := Copy(Line, 1, i - 1);
81+ FDproj[_Idx] := Line + _Line;
82+end;
83+
84+procedure TDprojEditMain.SetDccNamespace(const _DccNamespace: string);
85+var
86+ idx: Integer;
87+ Line: string;
88+ StartIdx: Integer;
89+begin
90+ if not Find('<PropertyGroup Condition="''$(Base)''!=''''">', StartIdx) then
91+ raise Exception.Create(_('Could not find base configuration.'));
92+
93+ Inc(StartIdx);
94+ idx := StartIdx;
95+ Line := FDproj[idx];
96+ while (idx < FDproj.Count) and not SameLine('</PropertyGroup>', Line) do begin
97+ if StartsLine('<DCC_Namespace>', Line) then begin
98+ if EndsLine('</DCC_Namespace>', Line) then begin
99+ SetLine(idx, '<DCC_Namespace>' + _DccNamespace + '</DCC_Namespace>');
100+ Exit;
101+ end;
102+ end;
103+ Inc(idx);
104+ end;
105+ FDproj.Insert(StartIdx, #9#9#9'<DCC_Namespace>' + _DccNamespace + '</DCC_Namespace>');
106+end;
107+
108+function TDprojEditMain.doExecute: Integer;
109+var
110+ DccNamespace: string;
111+ DprojFile: string;
112+ OutputFile: string;
113+ OutDir: string;
114+begin
115+ WriteLn(FGetOpt.ProgName);
116+ FDproj := TStringList.Create;
117+ try
118+ FGetOpt.ParamPassed('DprojFile', DprojFile);
119+ WriteLn('Reading "', DprojFile, '"');
120+ FDproj.LoadFromFile(DprojFile);
121+
122+ if FGetOpt.OptionPassed('SetDccNamespace', DccNamespace) then begin
123+ WriteLn('Setting DCC_Namespace to: "', DccNamespace, '"');
124+ SetDccNamespace(DccNamespace);
125+ end;
126+
127+ if not FGetOpt.OptionPassed('OutputFile', OutputFile) then
128+ OutputFile := DprojFile;
129+ OutDir := etpd(ExtractFileDir(OutputFile));
130+ if OutDir = '' then begin
131+ OutDir := ExtractFileDir(DprojFile);
132+ if OutDir <> '' then
133+ OutputFile := itpd(OutDir) + OutputFile;
134+ end;
135+ WriteLn('Writing to "', OutputFile, '"');
136+ FDproj.SaveToFile(OutputFile);
137+ finally
138+ FreeAndNil(FDproj);
139+ end;
140+ Result := 0;
141+end;
142+
143+procedure TDprojEditMain.InitCmdLineParser;
144+begin
145+ inherited;
146+ FGetOpt.RegisterParam('DprojFile', _('.DPROJ file to edit'));
147+ FGetOpt.RegisterOption('SetDccNamespace', _('set the DCC_Namespace option'), True);
148+ FGetOpt.RegisterOption('OutputFile', _('Instead of modifying the .DPROJ file, write to OutputFile'), True);
149+end;
150+
151+end.
152+
Show on old repository browser