Fix problem regenerating DBC

This commit is contained in:
Lutz
2023-11-19 16:57:23 +01:00
parent 7aa98bdab1
commit 0363d644af
31 changed files with 1094 additions and 315 deletions

View File

@@ -0,0 +1,45 @@
lparameters;
toUpdateObject
local;
lcRepositoryURL as string, ;
lcDownloadsBranch as string, ;
lcDownloadsURL as string, ;
lcVersionFileURL as string, ;
lcZIPFileURL as string, ;
lcRegisterWithThor as string
* Get the URL for the version and ZIP files.
lcRepositoryURL = 'https://github.com/fdbozzo/foxbin2prg'
&& the URL for the project's repository
* Note: If you use a more recent version of git, your default branch may not be "master".
lcDownloadsBranch = 'master'
lcDownloadsURL = strtran(m.lcRepositoryURL, 'github.com', ;
'raw.githubusercontent.com') + '/' + m.lcDownloadsBranch + '/ThorUpdater/'
lcVersionFileURL = m.lcDownloadsURL + 'FoxBin2PRGVersion.txt' &&'FoxBin2PRGVersion.txt'
&& the URL for the file containing code to get the available version number
lcZIPFileURL = m.lcDownloadsURL + 'FoxBin2PRG.zip'
&& the URL for the zip file containing the project
text to lcRegisterWithThor noshow textmerge
messagebox('From the Thor menu, choose "More -> Open Folder -> Components" to see the folder where FoxBin2PRG was installed', 0, 'FoxBin2PRG Installed', 5000)
endtext
* Set the properties of the passed updater object.
with m.toUpdateObject
.ApplicationName = 'FoxBin2PRG'
.VersionLocalFilename = 'FoxBin2PRGVersionFile.txt'
.VersionFileURL = m.lcVersionFileURL
.SourceFileUrl = m.lcZIPFileURL
.Component = 'Yes'
.Link = m.lcRepositoryURL
.LinkPrompt = 'FoxBin2PRG Home Page'
.ProjectCreationDate = date(2023, 8, 6)
.RegisterWithThor = m.lcRegisterWithThor
endwith
return m.toUpdateObject
*created by VFPX Deployment, 06.08.2023 15:23:02

View File

@@ -0,0 +1,14 @@
* This program should can tasks like
* - FoxBin2Prg, if the automatic way was not used
* - git processing like add, commit or push
* - set debug info On in pjx or include file
*
* The program runs after
* - FoxBin2Prg is, if enabled, run
* - Thor files are created and zipped
* - git is, if enabled, run
*
* This program can use the public
* variables discussed in the documentation as necessary.
return

76
BuildProcess/buildme.prg Normal file
View File

@@ -0,0 +1,76 @@
*BuildMe.prg for [add your application]
*
* This program should perform any build tasks necessary for the project, such
* as updating version numbers in code or include files. This program can use the public
* variables discussed in the documentation as necessary.
LOCAL;
lcVerno as String,;
lnProject as Integer,;
llFound as Boolean,;
loProject as Project
*Get FoxBin2Prg verno from FoxBin2Prg.prg
lcVerno = "VERNO"
DO foxbin2prg.prg WITH lcVerno
*Set Thor verno
pcVersion = m.lcVerno
pcFullVersion = m.lcVerno
pcPJXFile = pcPJXFile &&"foxbin2prg.pjx"
*Set FoxBin2Prg.exe verno
For lnProject = 1 To _vfp.Projects.Count
If Upper(Fullpath(m.pcPJXFile))==Upper(_vfp.Projects(m.lnProject).Name) Then
_vfp.Projects(m.lnProject).VersionNumber = m.lcVerno
llFound = .T.
Exit
Endif &&Upper(Fullpath(m.pcPJXFile))==Upper(_vfp.Projects(m.lnProject).Name)
Endfor &&lnProject
If !m.llFound
If _Vfp.Projects.Count>0
loProject = _vfp.ActiveProject
Endif &&_Vfp.Projects.Count>0
MODIFY PROJECT (Fullpath(m.pcPJXFile)) Noshow Nowait Noprojecthook
_vfp.ActiveProject.VersionNumber = m.lcVerno
_vfp.ActiveProject.Close
If _Vfp.Projects.Count>0
_vfp.ActiveProject = m.loProject
Endif &&_Vfp.Projects.Count>0
Endif &&!m.llFound
* ToDo
llFound = FILE(Fullpath("FOXBIN2PRG.CFG"))
If m.llFound
rename FOXBIN2PRG.CFG to FOXBIN2PRG.CFG.tmp
Endif &&m.llFound
strtofile("Language: EN","FOXBIN2PRG.CFG")
DO foxbin2prg.prg WITH "-c", "foxbin2prg.cfg.txt"
DO foxbin2prg.prg WITH "-t", "foxbin2prg.dbf.cfg.txt"
delete file FOXBIN2PRG.CFG
If m.llFound
rename FOXBIN2PRG.CFG.tmp to FOXBIN2PRG.CFG
Endif &&m.llFound
*set english on
*export foxbin2prg.cfg.txt and foxbin2prg.dbf.cfg.txt
*set english off
return
*Stuff we can do:
* - get version number (pcVersion) from an include file
* - set version number (pcVersion) to an include file
* - set version number to pjx used
* - set debug info off in pjx or include file
* - If FoxBin2Prg internal to VFPXDeployment is not fitting, run own way
* - create pcFullVersion like you use in the .VersionNumber of Version*.txt file for use in README.md
* (else it will use pcVersion)
* like the example in the Version text template:
pcFullVersion = pcVersion+' - ' + pcJulian
* - copy files to ../InstalledFiles subfolder
* - modify documentation