Skip to content

Commit 9052e2b

Browse files
committed
v80.5
1 parent 6aa6a39 commit 9052e2b

18 files changed

+34178
-523
lines changed

.github/CONTRIBUTING.md

+43-24
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,25 @@ Stuff is a bit scattered, so this is where to look up.
3131
1. Please create a fork at github
3232
- See this [guide](https://www.dataschool.io/how-to-contribute-on-github/) for setting up and using a fork
3333
- If allready forked, pull the recent state, or get most recent version otherwise.
34-
0. On top of _FoxBin2Prg.prg_ there are two version numbers:
34+
2. On top of _FoxBin2Prg.prg_ there are two version numbers:
3535
`#DEFINE DN_FB2PRG_VERSION 1.19`
3636
`#DEFINE DC_FB2PRG_VERSION_REAL '1.19.60'`
37-
1. Please set the **minor** part of _DC_FB2PRG_VERSION_REAL_ to a new number.
37+
3. Please set the **minor** part of _DC_FB2PRG_VERSION_REAL_ to a new number.
3838
**Do not** alter the **1.19** part. This is written to the text files.
3939
Alteration might force that the files must be newly commited, what is not everybodies taste.
40-
3. Add a meaningfull description of the change in the changes list on top of _FoxBin2Prg.prg_.
40+
4. Add a meaningfull description of the change in the changes list on top of _FoxBin2Prg.prg_.
4141
The most recent entries for changes in the middle of this section around _* </HISTORIAL DE CAMBIOS Y NOTAS IMPORTANTES>_,
4242
The most recent bugs are listed above _* </TESTEO Y REPORTE DE BUGS (AGRADECIMIENTOS)>_
43-
4. Alter version in _README.md_
44-
4. Add a description to _docs\ChangeLog.md_
45-
6. Please alter the footer of *.md files touched to recent date.
46-
4. If a change to the config files is made please add the description to the various properties (multi lang)
43+
5. Alter version in _README.md_
44+
6. Add a description to _docs\ChangeLog.md_
45+
7. If a change to the config files is made please add the description to the various properties (multi lang)
4746
- _C_FOXBIN2PRG_SYNTAX_INFO_EXAMPLE_LOC_cfg:_ for general settings
4847
- _C_FOXBIN2PRG_SYNTAX_INFO_EXAMPLE_LOC_tab_cfg:_ for settings per table
49-
4. Create a template _foxbin2prg.cfg.txt_ for general settings or _foxbin2prg.dbf.cfg.txt_ for the settings per table.
48+
8. If a change to the parameters is made, change _C_FOXBIN2PRG_SYNTAX_INFO_EXAMPLE_LOC_ properties.
49+
9. For changed functionality, add descriptive text on the appropriate _.md_ file in _docs_ folder.
50+
10. Please alter the footer of \*.md files touched to recent date.
51+
11. **The follwing steps are not neccesary, if you use *VPXDeployment* to create a new version that is applicable for Thor use.**
52+
12. Create a template _foxbin2prg.cfg.txt_ for general settings or _foxbin2prg.dbf.cfg.txt_ for the settings per table.
5053
- Do this even if no change to the setting to change the version number inside this files.
5154
- Or change version number in those files manually
5255
- **Note**. If you are not on an English comp, set the value _Language: EN_ in your local _foxbin2prg.cfg_ to create English files.
@@ -56,30 +59,46 @@ Stuff is a bit scattered, so this is where to look up.
5659
DO FoxBin2Prg.prg WITH "-c","foxbin2prg.cfg.txt"
5760
DO FoxBin2Prg.prg WITH "-t","foxbin2prg.dbc.txt"
5861
```
59-
5. If a change to the parameters is made, change _C_FOXBIN2PRG_SYNTAX_INFO_EXAMPLE_LOC_ properties.
60-
4. For changed functionality, add descriptive text on the appropriate _.md_ file in _docs_ folder.
61-
2. Alter the version number for the EXE to the version used above.
62-
0. Compile to EXE **in VFP9 SP2**
63-
8. Change Thor ([see below](#thor-conventions))
64-
8. commit
65-
9. push to your fork
66-
0. create a pull request
67-
1.
62+
13. Alter the version number for the EXE to the version used above.
63+
14. Compile to EXE **in VFP9 SP2**
64+
15. Change Thor ([see below](#thor-conventions))
65+
16. commit
66+
17. push to your fork
67+
18. create a pull request
6868

6969
## Thor conventions
7070
This project is part of [VFPX](https://vfpx.github.io/) and published via [Thor](https://github.com/VFPX/Thor).
71+
Some steps must be done to create the information for Thor
72+
### Using VFPXDeployment
73+
The standard procedure to create the Thor files is runing VFPXDeployment via Thor.
74+
1. If you add or remove files to FoxBin2Prg, that you need in the release:
75+
- alter *BuildProcess/installedfiles.txt*, see [here](https://github.com/VFPX/VFPXDeployment/blob/main/docs/Documentation.md#installedfilestxt)
76+
- open the *Helper/Clean_ThorFolder.prg* file
77+
- navigate to *Get_CompareFiles procedure*
78+
- alter the TEXT .. ENDTEXT section to remove all files deleted and add new files, check the block for examples.
79+
- There is a programm *Helper/GetRevisions.prg* to create the list, but this need to run VFPXDeployment one time to create the INSTALLEDFILES directory before.
80+
2. Run VFPXDeployment. It will set version number to EXE, compile, set several documentation and create the files for Thor.
81+
3. commit
82+
4. push to your fork
83+
5. create a pull request
84+
85+
### Without VFPXDeployment
86+
If you do not use VFPXDeployment
7187
There are some considerations to make to add a new version to Thor.
7288
Please check [Supporting Thor Updater](https://vfpx.github.io/thorupdate/)
7389
In special:
7490
- Update _Project.txt_, in special the version number
75-
- and run the script included, or
76-
- add files to _FoxBin2Prg.zip_, namely
77-
- FoxBin2Prg.prg,
78-
- FoxBin2Prg.exe,
79-
- the config files templates
80-
- Update the version number in _FoxBin2PrgVersion.txt_
91+
- update the *Helper/Clean_ThorFolder.prg* file, see above
92+
- add files to _FoxBin2Prg.zip_, namely
93+
- FoxBin2Prg.prg,
94+
- FoxBin2Prg.exe,
95+
- the config files templates
96+
- Clean_ThorFolder.prg
97+
- Update the version number in _FoxBin2PrgVersion.txt_
98+
- Update the changelog in _FoxBin2PrgVersion.txt_
99+
- the use of CreateThorUpdate.ps1 is not longer recommended.
81100

82101
Thanks
83102

84103
----
85-
Last changed: _2023/08/06_ ![Picture](../docs/pictures/vfpxpoweredby_alternative.gif)
104+
Last changed: _2023/08/08_ ![Picture](../docs/pictures/vfpxpoweredby_alternative.gif)

BuildProcess/Substitute.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#List of additional files that will be substituded when running VFPXDeployment for FoxBin2PRG
2+
docs\ChangeLog.md

BuildProcess/VersionTemplate.txt

+18-1
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,27 @@ with toUpdateObject
2020
.VersionNumber = '{VERSION} - {VERSIONDATE}'
2121
.AvailableVersion = '{APPNAME}-{VERSION}-update-{VERSIONDATE}'
2222
.Notes = GetNotes()
23-
<<iif('{COMPONENT}' = 'No', '', '*')>> .RegisterWithThor = GetRegisterWithThor()
23+
.RegisterWithThor = GetRegisterWithThor()
2424
endwith
2525
return toUpdateObject
2626

27+
28+
procedure GetRegisterWithThor
29+
local lcCommand
30+
text to lcCommand noshow
31+
lcBase = EXECSCRIPT(_SCREEN.cThorDispatcher, 'Thor_Proc_GetFoxBin2PrgFolder')
32+
IF FILE(m.lcBase+"clean_copied_memo.prg") THEN
33+
*remove old crap
34+
DO m.lcBase+"clean_thorfolder.prg" WITH lcBase
35+
ENDIF &&FILE(m.lcBase+"clean_copied_memo.prg")
36+
37+
DELETE FILE (m.lcBase+"clean_thorfolder.*")
38+
39+
endtext
40+
41+
return lcCommand
42+
endproc &&GetRegisterWithThor
43+
2744
* Get the notes for the project.@@@ Edit this code as necessary. If you specify
2845
* the name of a change log file as the ChangeLog setting in ProjectSettings.txt,
2946
* the contents of that file are substituted for the CHANGELOG placeholder so

BuildProcess/buildme.prg

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ DO foxbin2prg.prg WITH lcVerno
1515

1616
*Set Thor verno
1717
pcVersion = m.lcVerno
18-
pcPJXFile = "foxbin2prg.pjx"
18+
pcFullVersion = m.lcVerno
19+
pcPJXFile = pcPJXFile &&"foxbin2prg.pjx"
1920
*Set FoxBin2Prg.exe verno
2021
For lnProject = 1 To _vfp.Projects.Count
2122
If Upper(Fullpath(m.pcPJXFile))==Upper(_vfp.Projects(m.lnProject).Name) Then

BuildProcess/projectsettings.txt

+3
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ AppFile = FoxBin2Prg.exe
6565
*Remove all files from InstalledFiles folder if InstalledFiles.txt is given
6666
*Clear_InstalledFiles = No
6767

68+
*add a gitignore to InstalledFiles directory to not add this directory to git repository
69+
gitIgnore_InstalledFiles = Yes
70+
6871
*A different name for version file used to publish info on the remote server.
6972
*A help with old projects using a different name for the version file
7073
*VersionFile_Remote = {AppID}Version.txt

Helper/Read_InstallFiles.prg

+153
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
LPARAMETERS;
2+
tcDirectory
3+
4+
*set step on
5+
tcDirectory = EXECSCRIPT(_SCREEN.cThorDispatcher, 'Thor_Proc_GetFoxBin2PrgFolder')
6+
DO CASE
7+
CASE VARTYPE(tcDirectory)#'C'
8+
CASE !INLIST(UPPER(tcDirectory),'?','/?','-?','/Help','-Help')
9+
OTHERWISE
10+
tcDirectory = JUSTFNAME(SYS(16))
11+
InfoScreen(tcDirectory)
12+
RETURN
13+
ENDCASE
14+
15+
ADDPROPERTY(_SCREEN,'gvX1',tcDirectory)
16+
17+
CLEAR ALL
18+
19+
LOCAL;
20+
lcDir,;
21+
lcExt,;
22+
lcErr,;
23+
lcOldPath,;
24+
lcDirectory,;
25+
llNewGUID,;
26+
lcResult
27+
28+
29+
lcDirectory = _SCREEN.gvX1
30+
REMOVEPROPERTY(_SCREEN,'gvX1')
31+
32+
lcOldPath = FULLPATH(CURDIR())
33+
34+
DO CASE
35+
CASE EMPTY(lcDirectory)
36+
lcDir = ''
37+
CASE !DIRECTORY(lcDirectory) AND !FILE(lcDirectory)
38+
lcDir = ''
39+
CASE DIRECTORY(lcDirectory)
40+
lcDir = ADDBS(lcDirectory)
41+
OTHERWISE
42+
MESSAGEBOX('Nicht unterstützter Dateityp.')
43+
RETURN
44+
ENDCASE
45+
46+
IF EMPTY(lcDir) THEN
47+
CLEAR
48+
lcDir = GETDIR('','','',64)
49+
IF ALLTRIM(lcDir)=='' THEN
50+
RETURN
51+
ENDIF &&ALLTRIM(lcDir)==''
52+
ENDIF &&EMPTY(lcDir)
53+
54+
PUBLIC;
55+
poRegExp
56+
57+
*!* poRegExp = CREATEOBJECT('VBScript.RegExp')
58+
*!* WITH poRegExp
59+
*!* .IgnoreCase = .T.
60+
*!* .GLOBAL = .T.
61+
*!* .MultiLine = .T.
62+
*!* ENDWITH &&poRegExp
63+
64+
lcErr = ''
65+
lcResult = ''
66+
ScanDir(lcDir,@lcErr,lcDir,@lcResult)
67+
_CLIPTEXT = lcResult
68+
69+
IF !EMPTY(lcErr) THEN
70+
MESSAGEBOX('Fehler in der Zwischenablage gespeichert',0+48)
71+
_CLIPTEXT = SUBSTR(lcErr,3)
72+
ENDIF &&!EMPTY(lcErr)
73+
poRegExp = .NULL.
74+
RELEASE;
75+
poRegExp
76+
77+
CD (lcOldPath)
78+
79+
RETURN lcResult
80+
81+
PROCEDURE InfoScreen
82+
LPARAMETERS;
83+
tcProgram
84+
85+
LOCAL;
86+
lcTemp AS CHARACTER,;
87+
lnOldMemoW AS INTEGER
88+
89+
TEXT TO lcTEMP NOSHOW textmerge
90+
<<tcProgram>>
91+
Creates a list of files in a given subdirectory with subdirectories.
92+
Usage:
93+
<<tcProgram>> [/?] [cDirectory]
94+
/? Displays this text
95+
cDirectory optional directory to start from, subdirectories will be included
96+
Return is in clipboard
97+
ENDTEXT
98+
99+
lnOldMemoW = SET("Memowidth")
100+
SET MEMOWIDTH TO 100
101+
?lcTemp FONT 'Courier',6
102+
SET MEMOWIDTH TO lnOldMemoW
103+
ENDPROC &&InfoScreen
104+
105+
PROCEDURE ScanDir
106+
LPARAMETERS;
107+
tcDir,;
108+
tcErr,;
109+
tcDir2,;
110+
tcResult
111+
112+
LOCAL;
113+
lnLoop1,;
114+
lcOldDir
115+
116+
LOCAL ARRAY;
117+
laDir(1)
118+
119+
* SET STEP ON
120+
lcOldDir = FULLPATH(CURDIR())
121+
CD (tcDir)
122+
FOR lnLoop1 = 1 TO ADIR(laDir,'','D')
123+
IF INLIST(laDir(lnLoop1,1),'.','..') THEN
124+
LOOP
125+
ENDIF &&INLIST(laDir(lnLoop1,1),'.','..')
126+
ScanDir(ADDBS(tcDir+laDir(lnLoop1,1)),@tcErr,tcDir2,@tcResult)
127+
ENDFOR &&lnLoop1
128+
Dir_Action(tcDir,@tcErr,tcDir2,@tcResult)
129+
130+
CD (lcOldDir)
131+
ENDPROC &&ScanDir
132+
133+
PROCEDURE Dir_Action
134+
LPARAMETERS;
135+
tcDir,;
136+
tcErr,;
137+
tcDir2,;
138+
tcResult
139+
140+
LOCAL;
141+
lnStart AS INTEGER
142+
143+
LOCAL ARRAY;
144+
laDir(1)
145+
146+
tcDir2 = STRTRAN(tcDir,tcDir2,'')
147+
148+
FOR lnStart = 1 TO ADIR(laDir,'*.*')
149+
tcResult = tcResult+0h0d0a+laDir(lnStart,1)
150+
ENDFOR &&lnStart
151+
152+
RETURN
153+
ENDPROC &&Dir_Action

0 commit comments

Comments
 (0)