Skip to content

Commit 57ad20f

Browse files
committed
Work for VFPXDeployment
1 parent bfe3207 commit 57ad20f

34 files changed

+1313
-669
lines changed

.github/CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Stuff is a bit scattered, so this is where to look up.
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)>_
4343
4. Alter version in _README.md_
44-
4. Add a description to _docs\FoxBin2Prg_Changes.md_
44+
4. Add a description to _docs\ChangeLog.md_
4545
6. Please alter the footer of *.md files touched to recent date.
4646
4. If a change to the config files is made please add the description to the various properties (multi lang)
4747
- _C_FOXBIN2PRG_SYNTAX_INFO_EXAMPLE_LOC_cfg:_ for general settings
@@ -82,4 +82,4 @@ In special:
8282
Thanks
8383

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

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
*.pui
66
*.orig
77
*.err
8+
*.fxp
89
/*.dbf
910
/*.CDX
10-
/*.fxp
1111
/*.fpt
1212

1313
TESTS/DATOS_READONLY/*.FXP
@@ -19,3 +19,6 @@ foxbin2prg.cfg
1919
default/
2020
temp/
2121
tmp/
22+
23+
*re-include
24+
!foxbin2prg_keywords.*
+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
lparameters;
2+
toUpdateObject
3+
local;
4+
lcRepositoryURL as string, ;
5+
lcDownloadsBranch as string, ;
6+
lcDownloadsURL as string, ;
7+
lcVersionFileURL as string, ;
8+
lcZIPFileURL as string, ;
9+
lcRegisterWithThor as string
10+
11+
* Get the URL for the version and ZIP files.
12+
13+
lcRepositoryURL = 'https://github.com/fdbozzo/foxbin2prg'
14+
&& the URL for the project's repository
15+
* Note: If you use a more recent version of git, your default branch may not be "master".
16+
lcDownloadsBranch = 'master'
17+
lcDownloadsURL = strtran(m.lcRepositoryURL, 'github.com', ;
18+
'raw.githubusercontent.com') + '/' + m.lcDownloadsBranch + '/ThorUpdater/'
19+
lcVersionFileURL = m.lcDownloadsURL + 'FoxBin2PRGVersion.txt' &&'FoxBin2PRGVersion.txt'
20+
&& the URL for the file containing code to get the available version number
21+
lcZIPFileURL = m.lcDownloadsURL + 'FoxBin2PRG.zip'
22+
&& the URL for the zip file containing the project
23+
24+
25+
text to lcRegisterWithThor noshow textmerge
26+
messagebox('From the Thor menu, choose "More -> Open Folder -> Components" to see the folder where FoxBin2PRG was installed', 0, 'FoxBin2PRG Installed', 5000)
27+
endtext
28+
29+
* Set the properties of the passed updater object.
30+
31+
with m.toUpdateObject
32+
.ApplicationName = 'FoxBin2PRG'
33+
.VersionLocalFilename = 'FoxBin2PRGVersionFile.txt'
34+
.VersionFileURL = m.lcVersionFileURL
35+
.SourceFileUrl = m.lcZIPFileURL
36+
.Component = 'Yes'
37+
.Link = m.lcRepositoryURL
38+
.LinkPrompt = 'FoxBin2PRG Home Page'
39+
.ProjectCreationDate = date(2023, 8, 6)
40+
.RegisterWithThor = m.lcRegisterWithThor
41+
endwith
42+
43+
return m.toUpdateObject
44+
45+
*created by VFPX Deployment, 06.08.2023 15:23:02

BuildProcess/VersionTemplate.txt

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
@@@ Edit this template if necessary. Note the use of placeholders such as
2+
{APPNAME} and {APPID}; they are substituted with the correct values when
3+
the deployment process is run, so no need to edit those. Also, this file is
4+
textmerged so some text may not appear in the generated {APPID}Version.txt.
5+
Also, any text between @@@ and \\\ is removed.
6+
7+
\\\lparameters toUpdateObject
8+
9+
* Set the properties of the passed updater object.@@@ You likely won't need to
10+
* edit this code. One possible change is versioning: if you want to use the
11+
* Julian date as a minor version number, edit the AvailableVersion setting to:
12+
*
13+
* .AvailableVersion = '{APPNAME}-{VERSION}.{JULIAN}-update-{VERSIONDATE}'
14+
*
15+
* or possibly:
16+
*
17+
* .AvailableVersion = '{APPNAME}-{VERSION}-{JULIAN}-{VERSIONDATE}'\\\
18+
19+
with toUpdateObject
20+
.VersionNumber = '{VERSION} - {VERSIONDATE}'
21+
.AvailableVersion = '{APPNAME}-{VERSION}-update-{VERSIONDATE}'
22+
.Notes = GetNotes()
23+
<<iif('{COMPONENT}' = 'No', '', '*')>> .RegisterWithThor = GetRegisterWithThor()
24+
endwith
25+
return toUpdateObject
26+
27+
* Get the notes for the project.@@@ Edit this code as necessary. If you specify
28+
* the name of a change log file as the ChangeLog setting in ProjectSettings.txt,
29+
* the contents of that file are substituted for the CHANGELOG placeholder so
30+
* there's no need to edit this.\\\
31+
32+
procedure GetNotes
33+
local lcNotes
34+
text to lcNotes noshow
35+
{CHANGELOG}
36+
endtext
37+
return lcNotes
38+
39+
@@@* Register the tool with Thor. This template code assumes the tool is an APP
40+
* file named {AppID}.app, where AppID is the AppID setting in ProjectSettings.txt.
41+
* If that isn't the case, edit the Code property as necessary.
42+
43+
\\\* Register the tool with Thor. Note: Thor replaces ##InstallFolder## with the
44+
* installation path for the tool when this code is executed.
45+
46+
<<iif('{COMPONENT}' = 'No', '', '@@@')>>
47+
procedure GetRegisterWithThor
48+
local lcCommand
49+
text to lcCommand noshow
50+
* "{APPNAME}" is a tool created by VFPX Deployment:
51+
* Create the tool under Thor Tools.
52+
53+
loThorInfo = Execscript (_Screen.cThorDispatcher, 'Thor Register=')
54+
with loThorInfo
55+
56+
* Required properties.
57+
58+
.PRGName = 'Thor_Tool_{APPID}'
59+
.FolderName = '##InstallFolder##'
60+
.Prompt = '{APPNAME}'
61+
62+
* Optional properties.
63+
64+
.Description = '{APPNAME}'
65+
66+
* These are used to group and sort tools when they are displayed in menus or
67+
* the Thor form.
68+
69+
.Category = '{CATEGORY}'
70+
.CanRunAtStartUp = .F.
71+
72+
* This is the code to execute when the tool is selected.
73+
74+
.Code = "do ('##InstallFolder##{APPID}.app')"
75+
76+
* Register the tool with Thor.
77+
78+
llRegister = .Register()
79+
endwith
80+
endtext
81+
82+
return lcCommand
83+
endproc &&GetRegisterWithThor
84+
<<iif('{COMPONENT}' = 'No', '', '\\\')>><<iif('{COMPONENT}' = 'No', '@@@', '')>>
85+
* "{APPNAME}" is a Component. No procedure GetRegisterWithThor created by VFPX Deployment
86+
<<iif('{COMPONENT}' = 'No', '\\\', '')>>
87+
88+
*created by VFPX Deployment, <<DATETIME()>>

BuildProcess/afterbuild.prg

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
* This program should can tasks like
2+
* - FoxBin2Prg, if the automatic way was not used
3+
* - git processing like add, commit or push
4+
* - set debug info On in pjx or include file
5+
*
6+
* The program runs after
7+
* - FoxBin2Prg is, if enabled, run
8+
* - Thor files are created and zipped
9+
* - git is, if enabled, run
10+
*
11+
* This program can use the public
12+
* variables discussed in the documentation as necessary.
13+
14+
return

BuildProcess/buildme.prg

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
*BuildMe.prg for [add your application]
2+
*
3+
* This program should perform any build tasks necessary for the project, such
4+
* as updating version numbers in code or include files. This program can use the public
5+
* variables discussed in the documentation as necessary.
6+
LOCAL;
7+
lcVerno as String,;
8+
lnProject as Integer,;
9+
llFound as Boolean,;
10+
loProject as Project
11+
12+
*Get FoxBin2Prg verno from FoxBin2Prg.prg
13+
lcVerno = "VERNO"
14+
DO foxbin2prg.prg WITH lcVerno
15+
16+
*Set Thor verno
17+
pcVersion = m.lcVerno
18+
pcPJXFile = "foxbin2prg.pjx"
19+
*Set FoxBin2Prg.exe verno
20+
For lnProject = 1 To _vfp.Projects.Count
21+
If Upper(Fullpath(m.pcPJXFile))==Upper(_vfp.Projects(m.lnProject).Name) Then
22+
_vfp.Projects(m.lnProject).VersionNumber = m.lcVerno
23+
llFound = .T.
24+
Exit
25+
26+
Endif &&Upper(Fullpath(m.pcPJXFile))==Upper(_vfp.Projects(m.lnProject).Name)
27+
Endfor &&lnProject
28+
29+
If !m.llFound
30+
If _Vfp.Projects.Count>0
31+
loProject = _vfp.ActiveProject
32+
Endif &&_Vfp.Projects.Count>0
33+
34+
MODIFY PROJECT (Fullpath(m.pcPJXFile)) Noshow Nowait Noprojecthook
35+
_vfp.ActiveProject.VersionNumber = m.lcVerno
36+
_vfp.ActiveProject.Close
37+
38+
If _Vfp.Projects.Count>0
39+
_vfp.ActiveProject = m.loProject
40+
Endif &&_Vfp.Projects.Count>0
41+
Endif &&!m.llFound
42+
43+
* ToDo
44+
llFound = FILE(Fullpath("FOXBIN2PRG.CFG"))
45+
If m.llFound
46+
rename FOXBIN2PRG.CFG to FOXBIN2PRG.CFG.tmp
47+
Endif &&m.llFound
48+
49+
strtofile("Language: EN","FOXBIN2PRG.CFG")
50+
DO foxbin2prg.prg WITH "-c", "foxbin2prg.cfg.txt"
51+
DO foxbin2prg.prg WITH "-t", "foxbin2prg.dbf.cfg.txt"
52+
delete file FOXBIN2PRG.CFG
53+
54+
If m.llFound
55+
rename FOXBIN2PRG.CFG.tmp to FOXBIN2PRG.CFG
56+
Endif &&m.llFound
57+
58+
*set english on
59+
*export foxbin2prg.cfg.txt and foxbin2prg.dbf.cfg.txt
60+
*set english off
61+
62+
return
63+
64+
*Stuff we can do:
65+
* - get version number (pcVersion) from an include file
66+
* - set version number (pcVersion) to an include file
67+
* - set version number to pjx used
68+
* - set debug info off in pjx or include file
69+
* - If FoxBin2Prg internal to VFPXDeployment is not fitting, run own way
70+
* - create pcFullVersion like you use in the .VersionNumber of Version*.txt file for use in README.md
71+
* (else it will use pcVersion)
72+
* like the example in the Version text template:
73+
pcFullVersion = pcVersion+' - ' + pcJulian
74+
* - copy files to ../InstalledFiles subfolder
75+
* - modify documentation

BuildProcess/installedfiles.txt

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#Folder
2+
#.git/
3+
#.github/
4+
#.gitignore
5+
#BuildProcess/
6+
#CONFIG/
7+
#Documentacion/
8+
#FileName_Caps/
9+
#INSTALLEDFILES/
10+
#TESTS/
11+
#ThorUpdater/
12+
#WinMergePortable/
13+
#data/
14+
#docs/
15+
#tool/
16+
#xThorUpdater/
17+
18+
#to ignore
19+
#.gitattributes
20+
#VFP9RENU.dll*
21+
#vfp9r.dll*
22+
#filetypes.conf
23+
#ignore.conf
24+
25+
#to move
26+
#FoxBin2PRGVersionFile.txt
27+
28+
#----------------------
29+
#Fb2P_Diff
30+
Fb2P_Diff\Fb2P_Diff.exe||\Fb2P_Diff.exe
31+
32+
#FileName_Caps
33+
FileName_Caps\FileName_Caps.exe||\FileName_Caps.exe
34+
FileName_Caps\FileName_Caps.cfg||\FileName_Caps.cfg
35+
36+
37+
#Foxbin2prg
38+
#default
39+
\*.vbs
40+
41+
#config
42+
\FOXBIN2PRG.CFG.TXT
43+
\FOXBIN2PRG.DBF.CFG.TXT
44+
Config\config.fpw
45+
46+
#prg
47+
\foxbin2prg.exe
48+
\foxbin2prg.ico
49+
\foxbin2prg.jpg
50+
#we ignore the pjx for Thor, is somebody needs it, he can clone the repo
51+
#\foxbin2prg.pjt
52+
#\foxbin2prg.pjx
53+
\foxbin2prg.prg
54+
\foxbin2prg_keywords.cdx
55+
\foxbin2prg_keywords.dbf
56+
\props_*.txt
57+
58+
\LICENSE
59+
60+
########
61+
62+
\readme.md
63+
64+
WinMergePortable\

BuildProcess/projectsettings.txt

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
*ProjectSettings.txt to create Thor deployment
2+
*See https://github.com/VFPX/VFPXDeployment/blob/main/docs/Documentation.md for help.
3+
*Paths relative are based on git toplevel folder
4+
5+
*The name to show in Thor. Mandatory
6+
AppName = FoxBin2PRG
7+
8+
*The ID for Thor operation. Mandatory
9+
AppID = FoxBin2PRG
10+
11+
*Version number
12+
*A string, or enter pjx to use _VFP.ActiveProject.VersionNumber or, if defined PJXFile
13+
*SF 20230806: �berdenken, wie das hier und pjx und prg zusammengeht
14+
Version = 1.0
15+
16+
*Component of Thor or Tool. Use No for Tool.
17+
Component = Yes
18+
19+
*Remote repository on a git server. There are two ways for the remote repository.
20+
*- the builder assumes https://github.com/VFPX/{AppId}
21+
*- or enter the URL here (uncomment to use):
22+
Repository = https://github.com/fdbozzo/foxbin2prg
23+
24+
*The changelog file. Might be merged into the {AppID}Version.txt
25+
*The file installed as template (uncomment to use):
26+
ChangeLog = docs\ChangeLog.md
27+
28+
*Create VFPX community folders and files. Will not overwrite existing files.
29+
*Include_VFPX = Yes
30+
31+
*Do not create Thor folders and files (uncomment to use):
32+
*Include_Thor = No
33+
34+
35+
* The remaining lines are options to are not mandatory uncomment the options to use *
36+
37+
*"Yes" to auto run FoxBin2prg (Default), else "No" to not run.
38+
RunBin2Prg = No
39+
40+
*"Yes" to auto run git (Default), else "No" to not run.
41+
RunGit = No
42+
43+
*The release date formatted as YYYY-MM-DD; if omitted, today
44+
*VersionDate = 1973-09-11
45+
46+
*Yes (Default) to prompt for Version if not specified
47+
*Prompt = Yes
48+
49+
*The category to use when adding to the Thor menu. If omitted, "Applications". only when Component is No.
50+
*Category = {My}
51+
52+
*The relative path to the PJX file to compile. Omit this if that isn't required.
53+
PJXFile = FoxBin2Prg.pjx
54+
*The path to the APP or EXE to build from the project, with the extension
55+
AppFile = FoxBin2Prg.exe
56+
*Builds the project specified in PJXFile without the RECOMPILE clause.
57+
*Recompile = No
58+
59+
*A comma-separated list of relative paths to which FoxBin2PRG is to be applied.
60+
*Bin2PRGFolder = {MySource1,MySource1}
61+
62+
*A different name for the staging folder.
63+
*InstalledFilesFolder = {MyInstallFolder}
64+
65+
*Remove all files from InstalledFiles folder if InstalledFiles.txt is given
66+
*Clear_InstalledFiles = No
67+
68+
*A different name for version file used to publish info on the remote server.
69+
*A help with old projects using a different name for the version file
70+
*VersionFile_Remote = {AppID}Version.txt

Fb2P_Diff/config.fpw

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CODEPAGE=1252
File renamed without changes.

Fb2P_Diff/fb2p_diff.exe

80.2 KB
Binary file not shown.
File renamed without changes.
File renamed without changes.
3.17 KB
Binary file not shown.
1.93 KB
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

FileName_Caps/filename_caps.exe

30.4 KB
Binary file not shown.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)