Skip to content

Commit

Permalink
1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriychunikhin committed Oct 1, 2024
1 parent 5d27d34 commit e9f38af
Show file tree
Hide file tree
Showing 86 changed files with 9,249 additions and 372 deletions.
1 change: 1 addition & 0 deletions .github/Tests/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .github/Tests/out.coverage-summary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"coverage": 34}
777 changes: 777 additions & 0 deletions .github/Tests/out.jacoco.xml

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ desktop.ini
# code ref files
*_ref.*

Source/*.app
Source/*.exe
bin2txt.*
.vscode/
buildlog.txt
!/build.fxp
!/build_i18n.fxp
3 changes: 3 additions & 0 deletions Build/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
buildlog.txt
!build.fxp
!build_i18n.fxp
Binary file added Build/build.FXP
Binary file not shown.
20 changes: 15 additions & 5 deletions build.prg → Build/build.prg
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
* Builds VFP binaries from source code (Source/pdfiumreport.app, Sample/sample.exe)
* Builds VFP binaries from source code (../Release/pdfiumreport.app, ../Sample/sample.exe)
* Runs build_i18n.prg

_SCREEN.WindowState = 2
SET SAFETY OFF
SET TALK OFF
SET TEXTMERGE NOSHOW
RELEASE WINDOW Properties,Command,View,Document

LOCAL lcPath
Expand All @@ -19,16 +21,19 @@ glBuildError = .F.

DO build_i18n.prg

buildProject(lcPath+"/Source/PdfiumReport.pjx", "app")
buildProject(lcPath+"/Sample/sample.pjx", "exe")
buildProject(lcPath+"/../Source/PdfiumReport.pjx", "app", lcPath+"/../Release/PdfiumReport.app")
buildProject(lcPath+"/../Sample/sample.pjx", "exe")

COPY FILE lcPath+"/../Source/pdfium-vfp.vcx" TO lcPath+"/../Release/pdfium-vfp.vcx"
COPY FILE lcPath+"/../Source/pdfium-vfp.vct" TO lcPath+"/../Release/pdfium-vfp.vct"

? TEXTMERGE("Build completed <<IIF(glBuildError, 'with error', 'succesfully')>>")

MESSAGEBOX(TEXTMERGE("pdfium-vfp build completed <<IIF(glBuildError, 'with error', 'succesfully')>>"), 0+IIF(glBuildError,48,64), "Message")
QUIT

PROCEDURE buildProject
LPARAMETERS tcPath, tcBuildType
LPARAMETERS tcPath, tcBuildType, tcTargetPath
IF FILE(m.tcPath)=.F.
RETURN
ENDIF
Expand All @@ -41,7 +46,12 @@ PROCEDURE buildProject
SET DEFAULT TO (JUSTPATH(m.tcPath))
LOCAL lcProject, lcBuild
lcProject = JUSTFNAME(LOWER(m.tcPath))
lcBuild = FORCEEXT(lcProject, lcBuildType)

lcBuild = EVL(m.tcTargetPath, lcProject)

IF LOWER(JUSTEXT(lcBuild)) == LOWER(JUSTEXT(lcProject)) OR EMPTY(JUSTEXT(lcBuild))
lcBuild = FORCEEXT(lcBuild, lcBuildType)
ENDIF

? "Building "+lcProject
TRY
Expand Down
Binary file added Build/build_i18n.FXP
Binary file not shown.
24 changes: 13 additions & 11 deletions build_i18n.prg → Build/build_i18n.prg
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
* Code generation for class pdfium_i18n of Source/pdfium-vfp.vcx
* Code generation for class pdfium_i18n of ../Source/pdfium-vfp.vcx

LOCAL lcCodegenName
lcCodegenName = FORCEEXT(SYS(2014, SYS(16)), 'prg')
LOCAL lcSourcePath
lcSourcePath = "..\Source"

LOCAL lcCodegenName
lcCodegenName = FORCEEXT(SYS(2014, SYS(16), lcSourcePath), 'prg')

MODIFY CLASS pdfium_i18n OF Source\pdfium-vfp.vcx NOWAIT METHOD Init
MODIFY CLASS pdfium_i18n OF &lcSourcePath\pdfium-vfp.vcx NOWAIT METHOD Init

LOCAL laSelObj(1), lnSelObj
lnSelObj = ASELOBJ(laSelObj,1)
Expand Down Expand Up @@ -38,7 +40,7 @@ FOR i = 1 TO loLocales.Count
lnLocaleID = loLocales.Item(i)


TEXT TO lcLocaleCases NOSHOW TEXTMERGE PRETEXT 1
TEXT TO lcLocaleCases NOSHOW TEXTMERGE PRETEXT 1 FLAGS 1
<<lcLocaleCases>>

CASE This.LocaleID = <<lnLocaleID>>
Expand All @@ -47,9 +49,9 @@ FOR i = 1 TO loLocales.Count


SELECT * FROM curTempText WHERE 1=0 INTO CURSOR curTempText READWRITE

LOCAL lcFileName
lcFileName = "Source\i18n\" + lcMethod + ".xml"
lcFileName = lcSourcePath + "\i18n\" + lcMethod + ".xml"

IF FILE(lcFileName)=.T.
LOCAL loXMLAdapter as XMLAdapter
Expand Down Expand Up @@ -107,7 +109,7 @@ FOR i = 1 TO loLocales.Count
LOOP
ENDIF

TEXT TO lcTextCases NOSHOW TEXTMERGE PRETEXT 1
TEXT TO lcTextCases NOSHOW TEXTMERGE PRETEXT 1 FLAGS 1
<<lcTextCases>>

CASE m.tcTxtID == "<<loDS.id>>"
Expand All @@ -120,8 +122,8 @@ FOR i = 1 TO loLocales.Count

LOCAL lcMethodText

TEXT TO lcMethodText NOSHOW TEXTMERGE PRETEXT 1
* This code is generated by <<lcCodegenName>> from <<lcFileName>> for LocaleID = <<lnLocaleID>>
TEXT TO lcMethodText NOSHOW TEXTMERGE PRETEXT 1 FLAGS 1
* This code is generated by <<lcCodegenName>> from <<sys(2014,lcFileName,lcSourcePath)>> for LocaleID = <<lnLocaleID>>

LPARAMETERS tcTxtID

Expand All @@ -146,7 +148,7 @@ USE IN curTempText

LOCAL lcMethodText
lcMethodText = ""
TEXT TO lcMethodText NOSHOW TEXTMERGE PRETEXT 1
TEXT TO lcMethodText NOSHOW TEXTMERGE PRETEXT 1 FLAGS 1
* This code is generated by <<lcCodegenName>>

LPARAMETERS tcTxtID
Expand Down
8 changes: 0 additions & 8 deletions BuildProcess/.gitignore

This file was deleted.

10 changes: 0 additions & 10 deletions BuildProcess/InstalledFiles.txt

This file was deleted.

14 changes: 0 additions & 14 deletions BuildProcess/ProjectSettings.txt

This file was deleted.

5 changes: 0 additions & 5 deletions BuildProcess/README.md

This file was deleted.

14 changes: 0 additions & 14 deletions BuildProcess/afterbuild.prg

This file was deleted.

9 changes: 0 additions & 9 deletions BuildProcess/beforezip.prg

This file was deleted.

22 changes: 0 additions & 22 deletions BuildProcess/buildme.prg

This file was deleted.

89 changes: 0 additions & 89 deletions BuildProcess/versiontemplate.txt

This file was deleted.

5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.13
- Folder structure reorganization
- All binaries were moved to the Release folder
- Added unit tests

1.12
- Added wrappers for dependency API calls (Pdfium, LibHaru, WinApi) to avoid DECLARE-DLL conflicts with other components

Expand Down
34 changes: 19 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<a href="https://vfpx.github.io/projects/"><img alt="VFPX" src="docs/images/vfpxpoweredby_alternative.gif" /></a>
[![VFPX](docs/images/vfpxpoweredby_alternative.gif)](https://vfpx.github.io/projects/)

This and a dozen other components and tools are provided to you by <a href="https://vfpx.github.io/">VFPX community</a>

[![Latest release](https://img.shields.io/github/v/release/dmitriychunikhin/pdfium-vfp?display_name=release&label=release&color=default)](https://github.com/dmitriychunikhin/pdfium-vfp/releases/latest/)
[![Test coverage](.github/Tests/coverage.svg)](.github/Tests/out.jacoco.xml)


# pdfium-vfp
[English](README.md) | [简体中文](README_CN.md)

Expand Down Expand Up @@ -85,11 +89,11 @@ Open sample.pjx project from `pdfium-vfp/Sample` folder or just run Sample/sampl


### Basic usage of PdfiumViewer
1) Copy pdfium-vfp.vcx, pdfium-vfp.vct from Source folder to your project folder
1) Copy pdfium-vfp.vcx, pdfium-vfp.vct from Release folder to your project folder
2) <br/>
<b>VFP:</b> Copy dependency binaries <i>pdfium.dll, pdfium-vfp.dll, system.app</i> from <i>Source</i> folder to your project's folder
<b>VFP:</b> Copy dependency binaries <i>pdfium.dll, pdfium-vfp.dll, system.app</i> from <i>Release</i> folder to your project's folder

<b>VFPA x64:</b> Copy dependency binaries <i>pdfium64.dll, pdfium-vfp64.dll, system.app</i> from <i>Source</i> folder to your project's folder
<b>VFPA x64:</b> Copy dependency binaries <i>pdfium64.dll, pdfium-vfp64.dll, system.app</i> from <i>Release</i> folder to your project's folder

3) Add PdfiumViewer object from pdfium-vfp.vcx on the form

Expand All @@ -115,11 +119,11 @@ Thisform.PdfiumViewer.ClosePdf()


### Basic usage of PdfiumReport
1) Copy PdfiumReport.app from Source folder to your project folder
1) Copy PdfiumReport.app from Release folder to your project folder
2) <br/>
<b>VFP:</b> Copy dependency binaries <i>libhpdf.dll, pdfium.dll, pdfium-vfp.dll, system.app</i> from <i>Source</i> folder to your project's folder
<b>VFP:</b> Copy dependency binaries <i>libhpdf.dll, pdfium.dll, pdfium-vfp.dll, system.app</i> from <i>Release</i> folder to your project's folder

<b>VFPA x64:</b> Copy dependency binaries <i>libhpdf64.dll, pdfium64.dll, pdfium-vfp64.dll, system.app</i> from <i>Source</i> folder to your project's folder
<b>VFPA x64:</b> Copy dependency binaries <i>libhpdf64.dll, pdfium64.dll, pdfium-vfp64.dll, system.app</i> from <i>Release</i> folder to your project's folder

More examples can be found at `pdfium-vfp/Sample/sample.scx`

Expand Down Expand Up @@ -278,16 +282,16 @@ loPdfiumReport.SaveAs_PDFMeta.Permit_Edit = .T. && Allow to make annotations and
### Binaries
What binaries exactly do you need to run all the stuff (or your own latest version of it)
#### VFP
* [pdfium-vfp/Source/pdfium.dll](Source/pdfium.dll)
* [pdfium-vfp/Source/pdfium-vfp.dll](Source/pdfium-vfp.dll)
* [pdfium-vfp/Source/libhpdf.dll](Source/libhpdf.dll) - for PdfiumReport.app only
* [pdfium-vfp/Source/system.app](Source/system.app)
* [pdfium-vfp/Release/pdfium.dll](Release/pdfium.dll)
* [pdfium-vfp/Release/pdfium-vfp.dll](Release/pdfium-vfp.dll)
* [pdfium-vfp/Release/libhpdf.dll](Release/libhpdf.dll) - for PdfiumReport.app only
* [pdfium-vfp/Release/system.app](Release/system.app)

#### VFPA x64
* [pdfium-vfp/Source/pdfium64.dll](Source/pdfium64.dll)
* [pdfium-vfp/Source/pdfium-vfp64.dll](Source/pdfium-vfp64.dll)
* [pdfium-vfp/Source/libhpdf64.dll](Source/libhpdf64.dll) - for PdfiumReport.app only
* [pdfium-vfp/Source/system.app](Source/system.app)
* [pdfium-vfp/Release/pdfium64.dll](Release/pdfium64.dll)
* [pdfium-vfp/Release/pdfium-vfp64.dll](Release/pdfium-vfp64.dll)
* [pdfium-vfp/Release/libhpdf64.dll](Release/libhpdf64.dll) - for PdfiumReport.app only
* [pdfium-vfp/Release/system.app](Release/system.app)

#### Source repositories
* [pdfium.dll](https://github.com/bblanchon/pdfium-binaries)
Expand Down
Loading

0 comments on commit e9f38af

Please sign in to comment.