Work for VFPXDeployment
This commit is contained in:
45
BuildProcess/Thor_Update_FoxBin2PRG.prg
Normal file
45
BuildProcess/Thor_Update_FoxBin2PRG.prg
Normal 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
|
||||
88
BuildProcess/VersionTemplate.txt
Normal file
88
BuildProcess/VersionTemplate.txt
Normal file
@@ -0,0 +1,88 @@
|
||||
@@@ Edit this template if necessary. Note the use of placeholders such as
|
||||
{APPNAME} and {APPID}; they are substituted with the correct values when
|
||||
the deployment process is run, so no need to edit those. Also, this file is
|
||||
textmerged so some text may not appear in the generated {APPID}Version.txt.
|
||||
Also, any text between @@@ and \\\ is removed.
|
||||
|
||||
\\\lparameters toUpdateObject
|
||||
|
||||
* Set the properties of the passed updater object.@@@ You likely won't need to
|
||||
* edit this code. One possible change is versioning: if you want to use the
|
||||
* Julian date as a minor version number, edit the AvailableVersion setting to:
|
||||
*
|
||||
* .AvailableVersion = '{APPNAME}-{VERSION}.{JULIAN}-update-{VERSIONDATE}'
|
||||
*
|
||||
* or possibly:
|
||||
*
|
||||
* .AvailableVersion = '{APPNAME}-{VERSION}-{JULIAN}-{VERSIONDATE}'\\\
|
||||
|
||||
with toUpdateObject
|
||||
.VersionNumber = '{VERSION} - {VERSIONDATE}'
|
||||
.AvailableVersion = '{APPNAME}-{VERSION}-update-{VERSIONDATE}'
|
||||
.Notes = GetNotes()
|
||||
<<iif('{COMPONENT}' = 'No', '', '*')>> .RegisterWithThor = GetRegisterWithThor()
|
||||
endwith
|
||||
return toUpdateObject
|
||||
|
||||
* Get the notes for the project.@@@ Edit this code as necessary. If you specify
|
||||
* the name of a change log file as the ChangeLog setting in ProjectSettings.txt,
|
||||
* the contents of that file are substituted for the CHANGELOG placeholder so
|
||||
* there's no need to edit this.\\\
|
||||
|
||||
procedure GetNotes
|
||||
local lcNotes
|
||||
text to lcNotes noshow
|
||||
{CHANGELOG}
|
||||
endtext
|
||||
return lcNotes
|
||||
|
||||
@@@* Register the tool with Thor. This template code assumes the tool is an APP
|
||||
* file named {AppID}.app, where AppID is the AppID setting in ProjectSettings.txt.
|
||||
* If that isn't the case, edit the Code property as necessary.
|
||||
|
||||
\\\* Register the tool with Thor. Note: Thor replaces ##InstallFolder## with the
|
||||
* installation path for the tool when this code is executed.
|
||||
|
||||
<<iif('{COMPONENT}' = 'No', '', '@@@')>>
|
||||
procedure GetRegisterWithThor
|
||||
local lcCommand
|
||||
text to lcCommand noshow
|
||||
* "{APPNAME}" is a tool created by VFPX Deployment:
|
||||
* Create the tool under Thor Tools.
|
||||
|
||||
loThorInfo = Execscript (_Screen.cThorDispatcher, 'Thor Register=')
|
||||
with loThorInfo
|
||||
|
||||
* Required properties.
|
||||
|
||||
.PRGName = 'Thor_Tool_{APPID}'
|
||||
.FolderName = '##InstallFolder##'
|
||||
.Prompt = '{APPNAME}'
|
||||
|
||||
* Optional properties.
|
||||
|
||||
.Description = '{APPNAME}'
|
||||
|
||||
* These are used to group and sort tools when they are displayed in menus or
|
||||
* the Thor form.
|
||||
|
||||
.Category = '{CATEGORY}'
|
||||
.CanRunAtStartUp = .F.
|
||||
|
||||
* This is the code to execute when the tool is selected.
|
||||
|
||||
.Code = "do ('##InstallFolder##{APPID}.app')"
|
||||
|
||||
* Register the tool with Thor.
|
||||
|
||||
llRegister = .Register()
|
||||
endwith
|
||||
endtext
|
||||
|
||||
return lcCommand
|
||||
endproc &&GetRegisterWithThor
|
||||
<<iif('{COMPONENT}' = 'No', '', '\\\')>><<iif('{COMPONENT}' = 'No', '@@@', '')>>
|
||||
* "{APPNAME}" is a Component. No procedure GetRegisterWithThor created by VFPX Deployment
|
||||
<<iif('{COMPONENT}' = 'No', '\\\', '')>>
|
||||
|
||||
*created by VFPX Deployment, <<DATETIME()>>
|
||||
14
BuildProcess/afterbuild.prg
Normal file
14
BuildProcess/afterbuild.prg
Normal 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
|
||||
75
BuildProcess/buildme.prg
Normal file
75
BuildProcess/buildme.prg
Normal file
@@ -0,0 +1,75 @@
|
||||
*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
|
||||
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
|
||||
64
BuildProcess/installedfiles.txt
Normal file
64
BuildProcess/installedfiles.txt
Normal file
@@ -0,0 +1,64 @@
|
||||
#Folder
|
||||
#.git/
|
||||
#.github/
|
||||
#.gitignore
|
||||
#BuildProcess/
|
||||
#CONFIG/
|
||||
#Documentacion/
|
||||
#FileName_Caps/
|
||||
#INSTALLEDFILES/
|
||||
#TESTS/
|
||||
#ThorUpdater/
|
||||
#WinMergePortable/
|
||||
#data/
|
||||
#docs/
|
||||
#tool/
|
||||
#xThorUpdater/
|
||||
|
||||
#to ignore
|
||||
#.gitattributes
|
||||
#VFP9RENU.dll*
|
||||
#vfp9r.dll*
|
||||
#filetypes.conf
|
||||
#ignore.conf
|
||||
|
||||
#to move
|
||||
#FoxBin2PRGVersionFile.txt
|
||||
|
||||
#----------------------
|
||||
#Fb2P_Diff
|
||||
Fb2P_Diff\Fb2P_Diff.exe||\Fb2P_Diff.exe
|
||||
|
||||
#FileName_Caps
|
||||
FileName_Caps\FileName_Caps.exe||\FileName_Caps.exe
|
||||
FileName_Caps\FileName_Caps.cfg||\FileName_Caps.cfg
|
||||
|
||||
|
||||
#Foxbin2prg
|
||||
#default
|
||||
\*.vbs
|
||||
|
||||
#config
|
||||
\FOXBIN2PRG.CFG.TXT
|
||||
\FOXBIN2PRG.DBF.CFG.TXT
|
||||
Config\config.fpw
|
||||
|
||||
#prg
|
||||
\foxbin2prg.exe
|
||||
\foxbin2prg.ico
|
||||
\foxbin2prg.jpg
|
||||
#we ignore the pjx for Thor, is somebody needs it, he can clone the repo
|
||||
#\foxbin2prg.pjt
|
||||
#\foxbin2prg.pjx
|
||||
\foxbin2prg.prg
|
||||
\foxbin2prg_keywords.cdx
|
||||
\foxbin2prg_keywords.dbf
|
||||
\props_*.txt
|
||||
|
||||
\LICENSE
|
||||
|
||||
########
|
||||
|
||||
\readme.md
|
||||
|
||||
WinMergePortable\
|
||||
70
BuildProcess/projectsettings.txt
Normal file
70
BuildProcess/projectsettings.txt
Normal file
@@ -0,0 +1,70 @@
|
||||
*ProjectSettings.txt to create Thor deployment
|
||||
*See https://github.com/VFPX/VFPXDeployment/blob/main/docs/Documentation.md for help.
|
||||
*Paths relative are based on git toplevel folder
|
||||
|
||||
*The name to show in Thor. Mandatory
|
||||
AppName = FoxBin2PRG
|
||||
|
||||
*The ID for Thor operation. Mandatory
|
||||
AppID = FoxBin2PRG
|
||||
|
||||
*Version number
|
||||
*A string, or enter pjx to use _VFP.ActiveProject.VersionNumber or, if defined PJXFile
|
||||
*SF 20230806: <20>berdenken, wie das hier und pjx und prg zusammengeht
|
||||
Version = 1.0
|
||||
|
||||
*Component of Thor or Tool. Use No for Tool.
|
||||
Component = Yes
|
||||
|
||||
*Remote repository on a git server. There are two ways for the remote repository.
|
||||
*- the builder assumes https://github.com/VFPX/{AppId}
|
||||
*- or enter the URL here (uncomment to use):
|
||||
Repository = https://github.com/fdbozzo/foxbin2prg
|
||||
|
||||
*The changelog file. Might be merged into the {AppID}Version.txt
|
||||
*The file installed as template (uncomment to use):
|
||||
ChangeLog = docs\ChangeLog.md
|
||||
|
||||
*Create VFPX community folders and files. Will not overwrite existing files.
|
||||
*Include_VFPX = Yes
|
||||
|
||||
*Do not create Thor folders and files (uncomment to use):
|
||||
*Include_Thor = No
|
||||
|
||||
|
||||
* The remaining lines are options to are not mandatory uncomment the options to use *
|
||||
|
||||
*"Yes" to auto run FoxBin2prg (Default), else "No" to not run.
|
||||
RunBin2Prg = No
|
||||
|
||||
*"Yes" to auto run git (Default), else "No" to not run.
|
||||
RunGit = No
|
||||
|
||||
*The release date formatted as YYYY-MM-DD; if omitted, today
|
||||
*VersionDate = 1973-09-11
|
||||
|
||||
*Yes (Default) to prompt for Version if not specified
|
||||
*Prompt = Yes
|
||||
|
||||
*The category to use when adding to the Thor menu. If omitted, "Applications". only when Component is No.
|
||||
*Category = {My}
|
||||
|
||||
*The relative path to the PJX file to compile. Omit this if that isn't required.
|
||||
PJXFile = FoxBin2Prg.pjx
|
||||
*The path to the APP or EXE to build from the project, with the extension
|
||||
AppFile = FoxBin2Prg.exe
|
||||
*Builds the project specified in PJXFile without the RECOMPILE clause.
|
||||
*Recompile = No
|
||||
|
||||
*A comma-separated list of relative paths to which FoxBin2PRG is to be applied.
|
||||
*Bin2PRGFolder = {MySource1,MySource1}
|
||||
|
||||
*A different name for the staging folder.
|
||||
*InstalledFilesFolder = {MyInstallFolder}
|
||||
|
||||
*Remove all files from InstalledFiles folder if InstalledFiles.txt is given
|
||||
*Clear_InstalledFiles = No
|
||||
|
||||
*A different name for version file used to publish info on the remote server.
|
||||
*A help with old projects using a different name for the version file
|
||||
*VersionFile_Remote = {AppID}Version.txt
|
||||
Reference in New Issue
Block a user