Skip to content

Commit be58fc1

Browse files
committed
FabZip components and Test Applications
1 parent a3f48e1 commit be58fc1

File tree

135 files changed

+14464
-699
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+14464
-699
lines changed

FabTools/FabTools/DIBSupport.prg

Lines changed: 207 additions & 206 deletions
Large diffs are not rendered by default.

FabTools/FabTools/IniFile.prg

Lines changed: 492 additions & 492 deletions
Large diffs are not rendered by default.

FabTools/FabTools/Misc.prg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,7 @@ FUNCTION FabWinExecPause( progname AS PSZ, cmdshow AS SHORTINT ) AS LOGIC
13741374
thAttr.nLength := _sizeOf(_WINSECURITY_ATTRIBUTES)
13751375
sInfo.cb := _sizeOf(_WINSTARTUPINFO)
13761376
sInfo.dwFlags := (DWORD)STARTF_USESHOWWINDOW
1377-
sInfo.wShowWindow := word(cmdshow)
1377+
sInfo.wShowWindow := (WORD)cmdshow
13781378
//
13791379
lSuccess := CreateProcess( progname, NULL_PSZ , @procAttr, @thAttr, FALSE , 0, null_ptr, null_ptr, @sInfo, @sResult )
13801380
//

FabTools/FabZip.sln

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio 14
3+
VisualStudioVersion = 14.0.25420.1
4+
MinimumVisualStudioVersion = 10.0.40219.1
5+
Project("{AA6C8D78-22FF-423A-9C7C-5F2393824E04}") = "FabZip", "FabZip\FabZip.xsproj", "{BF4092DE-CA8D-4EBE-B4E2-8FA9660845AA}"
6+
EndProject
7+
Project("{AA6C8D78-22FF-423A-9C7C-5F2393824E04}") = "FabZip_Test", "FabZip_Test\FabZip_Test.xsproj", "{C8C7C8DE-AF0D-4F43-8A52-069356949907}"
8+
ProjectSection(ProjectDependencies) = postProject
9+
{BF4092DE-CA8D-4EBE-B4E2-8FA9660845AA} = {BF4092DE-CA8D-4EBE-B4E2-8FA9660845AA}
10+
EndProjectSection
11+
EndProject
12+
Project("{AA6C8D78-22FF-423A-9C7C-5F2393824E04}") = "Fab_Zip_1_52j_Test", "Fab_Zip_1_52j_Test\Fab_Zip_1_52j_Test.xsproj", "{B8945F86-E5C7-4883-8EFE-5EDA496F0187}"
13+
EndProject
14+
Project("{AA6C8D78-22FF-423A-9C7C-5F2393824E04}") = "FabTools", "FabTools\FabTools.xsproj", "{D2A10849-0553-4AD0-9B7F-CEC2A03B79D5}"
15+
EndProject
16+
Project("{AA6C8D78-22FF-423A-9C7C-5F2393824E04}") = "NewZipApp", "NewZipApp\NewZipApp.xsproj", "{3B02267C-DEAA-419E-9E43-F8BFD6E3334B}"
17+
EndProject
18+
Project("{AA6C8D78-22FF-423A-9C7C-5F2393824E04}") = "FabZipVo", "FabZipVo\FabZipVo.xsproj", "{4DD08A41-2945-4DDD-9821-4BF8A301FA9B}"
19+
EndProject
20+
Global
21+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
22+
Debug|Any CPU = Debug|Any CPU
23+
Release|Any CPU = Release|Any CPU
24+
EndGlobalSection
25+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
26+
{BF4092DE-CA8D-4EBE-B4E2-8FA9660845AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27+
{BF4092DE-CA8D-4EBE-B4E2-8FA9660845AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
28+
{BF4092DE-CA8D-4EBE-B4E2-8FA9660845AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
29+
{BF4092DE-CA8D-4EBE-B4E2-8FA9660845AA}.Release|Any CPU.Build.0 = Release|Any CPU
30+
{C8C7C8DE-AF0D-4F43-8A52-069356949907}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31+
{C8C7C8DE-AF0D-4F43-8A52-069356949907}.Debug|Any CPU.Build.0 = Debug|Any CPU
32+
{C8C7C8DE-AF0D-4F43-8A52-069356949907}.Release|Any CPU.ActiveCfg = Release|Any CPU
33+
{C8C7C8DE-AF0D-4F43-8A52-069356949907}.Release|Any CPU.Build.0 = Release|Any CPU
34+
{B8945F86-E5C7-4883-8EFE-5EDA496F0187}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35+
{B8945F86-E5C7-4883-8EFE-5EDA496F0187}.Debug|Any CPU.Build.0 = Debug|Any CPU
36+
{B8945F86-E5C7-4883-8EFE-5EDA496F0187}.Release|Any CPU.ActiveCfg = Release|Any CPU
37+
{B8945F86-E5C7-4883-8EFE-5EDA496F0187}.Release|Any CPU.Build.0 = Release|Any CPU
38+
{D2A10849-0553-4AD0-9B7F-CEC2A03B79D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39+
{D2A10849-0553-4AD0-9B7F-CEC2A03B79D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
40+
{D2A10849-0553-4AD0-9B7F-CEC2A03B79D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
41+
{D2A10849-0553-4AD0-9B7F-CEC2A03B79D5}.Release|Any CPU.Build.0 = Release|Any CPU
42+
{3B02267C-DEAA-419E-9E43-F8BFD6E3334B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43+
{3B02267C-DEAA-419E-9E43-F8BFD6E3334B}.Debug|Any CPU.Build.0 = Debug|Any CPU
44+
{3B02267C-DEAA-419E-9E43-F8BFD6E3334B}.Release|Any CPU.ActiveCfg = Release|Any CPU
45+
{3B02267C-DEAA-419E-9E43-F8BFD6E3334B}.Release|Any CPU.Build.0 = Release|Any CPU
46+
{4DD08A41-2945-4DDD-9821-4BF8A301FA9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47+
{4DD08A41-2945-4DDD-9821-4BF8A301FA9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
48+
{4DD08A41-2945-4DDD-9821-4BF8A301FA9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
49+
{4DD08A41-2945-4DDD-9821-4BF8A301FA9B}.Release|Any CPU.Build.0 = Release|Any CPU
50+
EndGlobalSection
51+
GlobalSection(SolutionProperties) = preSolution
52+
HideSolutionNode = FALSE
53+
EndGlobalSection
54+
EndGlobal

FabTools/FabZip/FabZip.xsproj

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\XSharp\XSharp.Default.props" />
4+
<PropertyGroup>
5+
<Dialect>Vulcan</Dialect>
6+
<PlatformTarget>x86</PlatformTarget>
7+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8+
<Name>FabZip</Name>
9+
<ProjectGuid>{BF4092DE-CA8D-4EBE-B4E2-8FA9660845AA}</ProjectGuid>
10+
<OutputType>Library</OutputType>
11+
<Nologo>true</Nologo>
12+
<GenerateFullPaths>false</GenerateFullPaths>
13+
<RootNamespace>FabZip</RootNamespace>
14+
<AssemblyName>FabZip</AssemblyName>
15+
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
16+
<XSharpProjectversion>2.3.0.0</XSharpProjectversion>
17+
<StartupObject />
18+
<ApplicationIcon />
19+
<VulcanCompatibleResources>False</VulcanCompatibleResources>
20+
<NoWin32Manifest>False</NoWin32Manifest>
21+
<TargetFrameworkProfile />
22+
</PropertyGroup>
23+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
24+
<EmitDebugInformation>true</EmitDebugInformation>
25+
<DefineConstants>DEBUG;TRACE</DefineConstants>
26+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
27+
<OutputPath>$(Configuration)\</OutputPath>
28+
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
29+
</PropertyGroup>
30+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
31+
<EmitDebugInformation>false</EmitDebugInformation>
32+
<DefineConstants>NDEBUG;TRACE</DefineConstants>
33+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
34+
<OutputPath>$(Configuration)\</OutputPath>
35+
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
36+
</PropertyGroup>
37+
<ItemGroup>
38+
<Reference Include="DotNetZip, Version=1.13.6.0, Culture=neutral, PublicKeyToken=6583c7c814667745">
39+
<Name>DotNetZip</Name>
40+
<AssemblyName>DotNetZip.dll</AssemblyName>
41+
<SpecificVersion>False</SpecificVersion>
42+
<Private>True</Private>
43+
<HintPath>..\packages\DotNetZip.1.13.6\lib\net40\DotNetZip.dll</HintPath>
44+
</Reference>
45+
<Reference Include="System" />
46+
<Reference Include="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
47+
<Name>System.Windows.Forms</Name>
48+
<AssemblyName>System.Windows.Forms.dll</AssemblyName>
49+
<SpecificVersion>False</SpecificVersion>
50+
</Reference>
51+
<Reference Include="VOGUIClasses, Version=2.1.0.0, Culture=neutral, PublicKeyToken=a967d8055360a7b9">
52+
<Name>VOGUIClasses</Name>
53+
<AssemblyName>VOGUIClasses.dll</AssemblyName>
54+
<SpecificVersion>False</SpecificVersion>
55+
<Private>True</Private>
56+
<HintPath>C:\Program Files (x86)\XSharp\Redist\VOGUIClasses.dll</HintPath>
57+
</Reference>
58+
<Reference Include="XSharp.Core, Version=2.1.0.0, Culture=neutral, PublicKeyToken=ed555a0467764586">
59+
<Name>XSharp.Core</Name>
60+
<AssemblyName>XSharp.Core.dll</AssemblyName>
61+
<SpecificVersion>False</SpecificVersion>
62+
<Private>True</Private>
63+
<HintPath>C:\Program Files (x86)\XSharp\Assemblies\XSharp.Core.dll</HintPath>
64+
</Reference>
65+
<Reference Include="XSharp.RT, Version=2.1.0.0, Culture=neutral, PublicKeyToken=ed555a0467764586">
66+
<Name>XSharp.RT</Name>
67+
<AssemblyName>XSharp.RT.dll</AssemblyName>
68+
<SpecificVersion>False</SpecificVersion>
69+
<Private>True</Private>
70+
<HintPath>C:\Program Files (x86)\XSharp\Assemblies\XSharp.RT.dll</HintPath>
71+
</Reference>
72+
<Reference Include="XSharp.VO, Version=2.1.0.0, Culture=neutral, PublicKeyToken=ed555a0467764586">
73+
<Name>XSharp.VO</Name>
74+
<AssemblyName>XSharp.VO.dll</AssemblyName>
75+
<SpecificVersion>False</SpecificVersion>
76+
<Private>True</Private>
77+
<HintPath>C:\Program Files (x86)\XSharp\Assemblies\XSharp.VO.dll</HintPath>
78+
</Reference>
79+
</ItemGroup>
80+
<ItemGroup>
81+
<Compile Include="FabZipDirEntry.prg" />
82+
<Compile Include="FabZipFile.prg" />
83+
<Compile Include="FabZipFileCtrl.prg" />
84+
<Compile Include="Functions.prg" />
85+
<Compile Include="Options Classes.prg" />
86+
<Compile Include="Properties\AssemblyInfo.prg">
87+
<SubType>Code</SubType>
88+
</Compile>
89+
<Compile Include="ReflectionLib.prg" />
90+
</ItemGroup>
91+
<ItemGroup>
92+
<Folder Include="Properties\" />
93+
</ItemGroup>
94+
<ItemGroup>
95+
<ProjectReference Include="..\FabTools\FabTools.xsproj">
96+
<Name>FabTools</Name>
97+
<Project>{d2a10849-0553-4ad0-9b7f-cec2a03b79d5}</Project>
98+
<Private>True</Private>
99+
</ProjectReference>
100+
</ItemGroup>
101+
<ItemGroup>
102+
<None Include="packages.config" />
103+
</ItemGroup>
104+
<Import Project="$(MSBuildExtensionsPath)\XSharp\XSharp.targets" />
105+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
106+
<PreBuildEvent>
107+
</PreBuildEvent>
108+
<PostBuildEvent>
109+
</PostBuildEvent>
110+
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
111+
</PropertyGroup>
112+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
113+
<PreBuildEvent>
114+
</PreBuildEvent>
115+
<PostBuildEvent>
116+
</PostBuildEvent>
117+
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
118+
</PropertyGroup>
119+
<ProjectExtensions>
120+
<ProjectCapabilities>
121+
<ProjectConfigurationsDeclaredAsItems />
122+
</ProjectCapabilities>
123+
</ProjectExtensions>
124+
</Project>

FabTools/FabZip/FabZipDirEntry.prg

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
// FabZipDirEntry.prg
2+
#using Ionic.zip
3+
4+
BEGIN NAMESPACE FabZip
5+
6+
CLASS FabZipDirEntry
7+
8+
Protect ZipEntryData as ZipEntry
9+
10+
CONSTRUCTOR( InternalData as ZipEntry )
11+
Self:ZipEntryData := InternalData
12+
RETURN
13+
14+
15+
Access @@DateTime as Int64
16+
return ZipEntryData:LastModified:ToFileTimeUTC()
17+
18+
Access Attributes as String
19+
//
20+
local cAttr as string
21+
cAttr := ""
22+
//
23+
if ( Self:ZipEntryData:Attributes == System.IO.FileAttributes.ReadOnly )
24+
cAttr += "R"
25+
endif
26+
if ( Self:ZipEntryData:Attributes == System.IO.FileAttributes.Hidden)
27+
cAttr += "H"
28+
endif
29+
if ( Self:ZipEntryData:Attributes == System.IO.FileAttributes.System)
30+
cAttr += "S"
31+
endif
32+
if ( Self:ZipEntryData:Attributes == System.IO.FileAttributes.Archive)
33+
cAttr += "A"
34+
endif
35+
return cAttr
36+
37+
Access CompressedSize as Int64
38+
Return ZipEntryData:CompressedSize
39+
40+
Access CompressionMethod as Short
41+
Local cm as CompressionMethod
42+
Local value as Short
43+
//
44+
cm := ZipEntryData:CompressionMethod
45+
If ( cm == CompressionMethod.Deflate )
46+
value := 8
47+
Else
48+
value := 0
49+
EndIf
50+
Return value
51+
52+
Access Crc32 as int
53+
return ZipEntryData:Crc
54+
55+
Access Crypted as logic
56+
return ZipEntryData:UsesEncryption
57+
58+
ACCESS ExtraFieldLength as word
59+
// TODO Dummy ExtraFieldLength as word
60+
return 0
61+
62+
Access FileNameLength as int
63+
Return ZipEntryData:FileName:Length
64+
65+
ACCESS Flag as word
66+
// TODO Dummy Flag as word
67+
return 0
68+
69+
Access FileName as String
70+
return ZipEntryData:FileName
71+
72+
Access FileComment as String
73+
return ZipEntryData:Comment
74+
75+
Access FileTime as String
76+
Local Tmp as DateTime
77+
//
78+
Tmp := ZipEntryData:LastModified
79+
return Tmp:TimeOfDay:ToString()
80+
81+
Access FileDate as Date
82+
Local Tmp as DateTime
83+
local VoDate as Date
84+
//
85+
Tmp := ZipEntryData:LastModified
86+
VoDate := CToD( Tmp:@@Date:ToString() )
87+
return VoDate
88+
89+
ACCESS IntFileAttrib as word
90+
// TODO Dummy IntFileAttrib as word
91+
RETURN 0
92+
93+
ACCESS ExtFileAttrib as dword
94+
// TODO Dummy ExtFileAttrib as dword
95+
RETURN 0
96+
97+
98+
ACCESS Version as word
99+
//TODO This should be the DotNetZip version
100+
return 1
101+
102+
103+
ACCESS Ratio as int
104+
//r An INT with the Compression Ratio for this file.
105+
RETURN Integer( ( 1 - ( SELF:CompressedSize / Max( SELF:UnCompressedSize,1 ) ) ) * 100 )
106+
107+
ACCESS UncompressedSize as Int64
108+
Return ZipEntryData:UnCompressedSize
109+
110+
ACCESS StartOnDisk as word
111+
//TODO No MultiDisk support currently
112+
return 0
113+
114+
115+
116+
END CLASS
117+
118+
END NAMESPACE // FabZip

0 commit comments

Comments
 (0)