Browse Source

template layouts

master
Julian Noble 12 months ago
parent
commit
f16733c0cc
  1. 1
      src/modules/punk/mix/templates/layouts/minimal/.fossil-custom/mainmenu
  2. 1
      src/modules/punk/mix/templates/layouts/minimal/.fossil-settings/crlf-glob
  3. 10
      src/modules/punk/mix/templates/layouts/minimal/.fossil-settings/ignore-glob
  4. 1
      src/modules/punk/mix/templates/layouts/minimal/.fossil-settings/manifest
  5. 1
      src/modules/punk/mix/templates/layouts/project/.fossil-custom/mainmenu
  6. 1
      src/modules/punk/mix/templates/layouts/project/.fossil-settings/crlf-glob
  7. 8
      src/modules/punk/mix/templates/layouts/project/.fossil-settings/ignore-glob
  8. 1
      src/modules/punk/mix/templates/layouts/project/.fossil-settings/manifest
  9. 3
      src/modules/punk/mix/templates/layouts/project/src/doc/include/changes.inc
  10. 25
      src/modules/punk/mix/templates/layouts/project/src/doc/include/changes_0.1.inc
  11. 18
      src/modules/punk/mix/templates/layouts/project/src/doc/include/feedback.inc
  12. 2
      src/modules/punk/mix/templates/layouts/project/src/doc/include/general.inc
  13. 3
      src/modules/punk/mix/templates/layouts/project/src/doc/include/punkshell.inc
  14. 2
      src/modules/punk/mix/templates/layouts/project/src/doc/include/welcome.inc
  15. 3
      src/modules/punk/mix/templates/layouts/project/src/doc/main.man
  16. 13
      src/modules/punk/mix/templates/layouts/project/src/doc/project_changes.man
  17. 15
      src/modules/punk/mix/templates/layouts/project/src/doc/project_intro.man
  18. 160
      src/modules/punk/mix/templates/layouts/project/src/make.tcl
  19. 12
      src/modules/punk/mix/templates/layouts/project/src/runtime/mapvfs.config

1
src/modules/punk/mix/templates/layouts/minimal/.fossil-custom/mainmenu

@ -7,6 +7,7 @@ Forum /forum {@2 3 4 5 6} wideonly
Chat /chat C wideonly Chat /chat C wideonly
Tickets /ticket r wideonly Tickets /ticket r wideonly
Wiki /wiki j wideonly Wiki /wiki j wideonly
Doc /doc/tip/src/embedded/md/toc.md * {}
Download /download * {} Download /download * {}
Admin /setup {a s} desktoponly Admin /setup {a s} desktoponly
Logout /logout L wideonly Logout /logout L wideonly

1
src/modules/punk/mix/templates/layouts/minimal/.fossil-settings/crlf-glob

@ -0,0 +1 @@
src/embedded/*

10
src/modules/punk/mix/templates/layouts/minimal/.fossil-settings/ignore-glob

@ -3,6 +3,8 @@ bin
lib lib
#The directory for compiled/built Tcl modules #The directory for compiled/built Tcl modules
modules modules
#The buildsuites output folder
builds
#Temporary files e.g from tests #Temporary files e.g from tests
tmp tmp
@ -27,3 +29,11 @@ tcl*.exe
*.swp *.swp
todo.txt todo.txt
zig-cache
zig-out
release
debug
build
build-*
docgen_tmp

1
src/modules/punk/mix/templates/layouts/minimal/.fossil-settings/manifest

@ -0,0 +1 @@
rut

1
src/modules/punk/mix/templates/layouts/project/.fossil-custom/mainmenu

@ -7,6 +7,7 @@ Forum /forum {@2 3 4 5 6} wideonly
Chat /chat C wideonly Chat /chat C wideonly
Tickets /ticket r wideonly Tickets /ticket r wideonly
Wiki /wiki j wideonly Wiki /wiki j wideonly
Doc /doc/tip/src/embedded/md/toc.md * {}
Download /download * {} Download /download * {}
Admin /setup {a s} desktoponly Admin /setup {a s} desktoponly
Logout /logout L wideonly Logout /logout L wideonly

1
src/modules/punk/mix/templates/layouts/project/.fossil-settings/crlf-glob

@ -0,0 +1 @@
src/embedded/*

8
src/modules/punk/mix/templates/layouts/project/.fossil-settings/ignore-glob

@ -29,3 +29,11 @@ tcl*.exe
*.swp *.swp
todo.txt todo.txt
zig-cache
zig-out
release
debug
build
build-*
docgen_tmp

1
src/modules/punk/mix/templates/layouts/project/.fossil-settings/manifest

@ -0,0 +1 @@
rut

3
src/modules/punk/mix/templates/layouts/project/src/doc/include/changes.inc

@ -0,0 +1,3 @@
[section Changes]
[include changes_0.1.inc]

25
src/modules/punk/mix/templates/layouts/project/src/doc/include/changes_0.1.inc

@ -0,0 +1,25 @@
[subsection {Changes for version 0.1}]
[vset punkshell_project https://www.gitea1.intx.com.au/jn/punkshell]
This release 0.1 of project %project%
[para] In detail:
[list_begin enumerated]
[comment {- - -- --- ----- -------- ------------- ---------------------}]
[enum] %project% requires Tcl 8.6 or higher. Tcl 8.5 or less is not
supported.
[comment {- - -- --- ----- -------- ------------- ---------------------}]
[comment {Please consider retaining a link to PunkShell to support the project}]
[enum] This project uses [uri [vset punkshell_project] {PunkShell}] as a deployment management and documentation tool.
[comment {- - -- --- ----- -------- ------------- ---------------------}]
[para] Summary
[list_begin enumerated]
[enum] feature 1
[enum] feature 2
[list_end]
[comment {- - -- --- ----- -------- ------------- ---------------------}]
[list_end]

18
src/modules/punk/mix/templates/layouts/project/src/doc/include/feedback.inc

@ -0,0 +1,18 @@
[comment {-*- tcl -*- --- !doctools --- manpage}]
[comment {- - -- --- ----- -------- ------------- ---------------------}]
[section {Bugs, Ideas, Feedback}]
[vset project_tracker https://example.com/tracker]
[vset project_email dev@example.com]
This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such at the
[uri [vset project_tracker] {%project% tracker}].
Please also report any ideas for enhancements you may have for either
package and/or documentation.
Contact: [uri [vset project_email] [vset project_email]]

2
src/modules/punk/mix/templates/layouts/project/src/doc/include/general.inc

@ -2,5 +2,5 @@
[comment {- -- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---}] [comment {- -- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---}]
[moddesc {%project% - a Tcl project}] [moddesc {%project% - a Tcl project}]
[category {unspecified}] [category {unspecified}]
[keywords {keyword1 keyword2}] [keywords module %project%]
[require Tcl 8.6] [require Tcl 8.6]

3
src/modules/punk/mix/templates/layouts/project/src/doc/include/punkshell.inc

@ -0,0 +1,3 @@
[comment {Please consider retaining a link to PunkShell to support the project}]
[vset punkshell_project https://www.gitea1.intx.com.au/jn/punkshell]
[para] This project uses [uri [vset punkshell_project] {PunkShell}] as a deployment management and documentation tool.

2
src/modules/punk/mix/templates/layouts/project/src/doc/include/welcome.inc

@ -2,5 +2,5 @@
[comment {- -- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---}] [comment {- -- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---}]
[include welcome_basic.inc] [include welcome_basic.inc]
[para] Please read the document [term {%project% - Introduction to %project%}], [para] Please read the document [term {Introduction to %project%}],
if you have not done so already, to get an overview of the whole system. if you have not done so already, to get an overview of the whole system.

3
src/modules/punk/mix/templates/layouts/project/src/doc/main.man

@ -9,5 +9,8 @@
This document is the reference to all commands provided by %project% This document is the reference to all commands provided by %project%
[include include/feedback.inc]
[comment {Please consider retaining a link to PunkShell to support the project}]
[include include/punkshell.inc]
[manpage_end] [manpage_end]

13
src/modules/punk/mix/templates/layouts/project/src/doc/project_changes.man

@ -0,0 +1,13 @@
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin project_changes n 8]
[include include/general.inc]
[titledesc {%project% Changes}]
[description]
[include include/welcome_basic.inc]
[para]
This document provides an overview of the changes [package %project%]
underwent from version to version.
[include include/changes.inc]
[include include/feedback.inc]
[manpage_end]

15
src/modules/punk/mix/templates/layouts/project/src/doc/project_intro.man

@ -0,0 +1,15 @@
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin project_intro n 8]
[include include/general.inc]
[titledesc {Introduction to %project%}]
[description]
[include include/welcome_basic.inc]
[para]
Introduction to %project%
[include include/feedback.inc]
[comment {Please consider retaining a link to PunkShell to support the project}]
[include include/punkshell.inc]
[manpage_end]

160
src/modules/punk/mix/templates/layouts/project/src/make.tcl

@ -290,37 +290,21 @@ if {[file exists $sourcefolder/vendorlib]} {
README.md\ README.md\
] ]
puts stdout "VENDORLIB: copying from $sourcefolder/vendorlib to $projectroot/lib (if source file changed)"
set resultdict [punkcheck::install $sourcefolder/vendorlib $projectroot/lib -overwrite installedsourcechanged-targets -unpublish_paths $unpublish] set resultdict [punkcheck::install $sourcefolder/vendorlib $projectroot/lib -overwrite installedsourcechanged-targets -unpublish_paths $unpublish]
set copied [dict get $resultdict files_copied] puts stdout [punkcheck::summarize_install_resultdict $resultdict]
set sources_unchanged [dict get $resultdict sources_unchanged]
puts stdout "--------------------------"
flush stdout
puts stderr "Copied [llength $copied] vendor lib files from src/vendorlib to $projectroot/lib"
foreach f $copied {
puts stdout "COPIED $f"
}
puts stdout "[llength $sources_unchanged] unchanged source files"
puts stdout "--------------------------"
} else { } else {
puts stderr "NOTE: No src/vendorlib folder found." puts stderr "VENDORLIB: No src/vendorlib folder found."
} }
if {[file exists $sourcefolder/vendormodules]} { if {[file exists $sourcefolder/vendormodules]} {
#install .tm *and other files* #install .tm *and other files*
puts stdout "VENDORMODULES: copying from $sourcefolder/vendormodules to $target_modules_base (if source file changed)"
set resultdict [punkcheck::install $sourcefolder/vendormodules $target_modules_base -installer make.tcl -overwrite installedsourcechanged-targets -unpublish_paths {README.md}] set resultdict [punkcheck::install $sourcefolder/vendormodules $target_modules_base -installer make.tcl -overwrite installedsourcechanged-targets -unpublish_paths {README.md}]
set copied [dict get $resultdict files_copied] puts stdout [punkcheck::summarize_install_resultdict $resultdict]
set sources_unchanged [dict get $resultdict sources_unchanged]
puts stdout "--------------------------"
flush stdout
puts stderr "Copied [llength $copied] vendor module files from src/vendormodules to $target_modules_base"
foreach f $copied {
puts stdout "COPIED $f"
}
puts stdout "[llength $sources_unchanged] unchanged source files"
puts stdout "--------------------------"
} else { } else {
puts stderr "NOTE: No src/vendormodules folder found." puts stderr "VENDORMODULES: No src/vendormodules folder found."
} }
######################################################## ########################################################
@ -354,6 +338,7 @@ foreach layoutinfo $layout_update_list {
foreach filepair $pairs { foreach filepair $pairs {
lassign $filepair srcfile tgtfile lassign $filepair srcfile tgtfile
file mkdir [file dirname $tgtfile]
#---------- #----------
$tpl_event targetset_init INSTALL $tgtfile $tpl_event targetset_init INSTALL $tgtfile
$tpl_event targetset_addsource $srcfile $tpl_event targetset_addsource $srcfile
@ -386,8 +371,6 @@ foreach layoutinfo $layout_update_list {
######################################################## ########################################################
#default source module folder is at projectroot/src/modules #default source module folder is at projectroot/src/modules
#There may be multiple other src module folders at same level (e.g folder not being other special-purpose folder and not matching name vendor* that contains at least one .tm file in its root) #There may be multiple other src module folders at same level (e.g folder not being other special-purpose folder and not matching name vendor* that contains at least one .tm file in its root)
set source_module_folderlist [punk::mix::cli::lib::find_source_module_paths $projectroot] set source_module_folderlist [punk::mix::cli::lib::find_source_module_paths $projectroot]
@ -403,19 +386,54 @@ foreach src_module_dir $source_module_folderlist {
set overwrite "installedsourcechanged-targets" set overwrite "installedsourcechanged-targets"
#set overwrite "ALL-TARGETS" #set overwrite "ALL-TARGETS"
puts stdout "MODULEFOLDER non_tm_files $src_module_dir - copying to $target_modules_base (if source file changed)"
set resultdict [punkcheck::install_non_tm_files $src_module_dir $target_modules_base -installer make.tcl -overwrite $overwrite -unpublish_paths {README.md}] set resultdict [punkcheck::install_non_tm_files $src_module_dir $target_modules_base -installer make.tcl -overwrite $overwrite -unpublish_paths {README.md}]
set copied [dict get $resultdict files_copied] puts stdout [punkcheck::summarize_install_resultdict $resultdict]
set sources_unchanged [dict get $resultdict sources_unchanged]
puts stdout "--------------------------"
flush stdout
puts stderr "Copied [llength $copied] non-tm source files from $src_module_dir to $target_modules_base"
puts stderr "[llength $sources_unchanged] unchanged source files"
flush stderr
puts stdout "--------------------------"
} }
set installername "make.tcl"
# ---------------------------------------- # ----------------------------------------
if {[punk::repo::is_fossil_root $projectroot]} {
set config [dict create\
-make-step configure_fossil\
]
#----------
set installer [punkcheck::installtrack new $installername $projectroot/.punkcheck]
$installer set_source_target $projectroot $projectroot
set event [$installer start_event $config]
$event targetset_init VIRTUAL fossil_settings_mainmenu ;#VIRTUAL - since there is no actual target file
set menufile $projectroot/.fossil-custom/mainmenu
$event targetset_addsource $menufile
#----------
if {\
[llength [dict get [$event targetset_source_changes] changed]]\
} {
$event targetset_started
# -- --- --- --- --- ---
puts stdout "Configuring fossil setting: mainmenu from: $menufile"
if {[catch {
set fd [open $menufile r]
fconfigure $fd -translation binary
set data [read $fd]
close $fd
exec fossil settings mainmenu $data
} errM]} {
$event targetset_end FAILED -note "fossil update failed: $errM"
} else {
$event targetset_end OK
}
# -- --- --- --- --- ---
} else {
puts stderr "."
$event targetset_end SKIPPED
}
$event end
$event destroy
$installer destroy
}
set buildfolder [punk::mix::cli::lib::get_build_workdir $sourcefolder] set buildfolder [punk::mix::cli::lib::get_build_workdir $sourcefolder]
if {$buildfolder ne "$sourcefolder/_build"} { if {$buildfolder ne "$sourcefolder/_build"} {
@ -430,7 +448,8 @@ set rtfolder $sourcefolder/runtime
set runtimes [glob -nocomplain -dir $rtfolder -types {f x} -tail *] set runtimes [glob -nocomplain -dir $rtfolder -types {f x} -tail *]
if {![llength $runtimes]} { if {![llength $runtimes]} {
puts stderr "No executable runtimes found in $rtfolder - unable to build any .vfs folders into executables." puts stderr "No executable runtimes found in $rtfolder - unable to build any .vfs folders into executables."
exit 2 puts stderr "Add runtimes to $sourcefolder/runtime if required"
exit 0
} }
if {[catch {exec sdx help} errM]} { if {[catch {exec sdx help} errM]} {
@ -465,6 +484,7 @@ if {[file exists $mapfile]} {
#drop windows .exe suffix so same config can work cross platform - extension will be re-added if necessary later #drop windows .exe suffix so same config can work cross platform - extension will be re-added if necessary later
set runtime [string range $runtime 0 end-4] set runtime [string range $runtime 0 end-4]
} }
if {$runtime ne "-"} {
set runtime_test $runtime set runtime_test $runtime
if {"windows" eq $::tcl_platform(platform)} { if {"windows" eq $::tcl_platform(platform)} {
set runtime_test $runtime.exe set runtime_test $runtime.exe
@ -473,6 +493,7 @@ if {[file exists $mapfile]} {
puts stderr "WARNING: Missing runtime file $rtfolder/$runtime_test (line in mapvfs.config: $ln)" puts stderr "WARNING: Missing runtime file $rtfolder/$runtime_test (line in mapvfs.config: $ln)"
lappend missing $runtime lappend missing $runtime
} }
}
foreach vfs $vfspaths { foreach vfs $vfspaths {
if {![file isdirectory [file join $sourcefolder $vfs]]} { if {![file isdirectory [file join $sourcefolder $vfs]]} {
puts stderr "WARNNING: Missing vfs folder [file join $sourcefolder $vfs] specified in mapvfs.config for runtime $runtime" puts stderr "WARNNING: Missing vfs folder [file join $sourcefolder $vfs] specified in mapvfs.config for runtime $runtime"
@ -511,7 +532,6 @@ if {![llength $vfs_folders]} {
set vfs_folder_changes [dict create] ;#cache whether each .vfs folder has changes so we don't re-run tests if building from same .vfs with multiple runtime executables set vfs_folder_changes [dict create] ;#cache whether each .vfs folder has changes so we don't re-run tests if building from same .vfs with multiple runtime executables
set installername "make.tcl"
# -- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- # -- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
#set runtimefile [lindex $runtimes 0] #set runtimefile [lindex $runtimes 0]
foreach runtimefile $runtimes { foreach runtimefile $runtimes {
@ -593,7 +613,7 @@ foreach vfs $vfs_folders {
set runtimes_raw $runtimes set runtimes_raw $runtimes
set runtimes [list] set runtimes [list]
foreach rt $runtimes_raw { foreach rt $runtimes_raw {
if {![string match *.exe $rt]} { if {![string match *.exe $rt] && $rt ne "-"} {
set rt $rt.exe set rt $rt.exe
} }
lappend runtimes $rt lappend runtimes $rt
@ -615,27 +635,36 @@ foreach vfs $vfs_folders {
#assert $runtimes is a list of executable names suffixed with .exe if on windows - whether or not specified with .exe in the mapvfs.config #assert $runtimes is a list of executable names suffixed with .exe if on windows - whether or not specified with .exe in the mapvfs.config
#todo - non kit based - zipkit?
# $runtimes may now include a dash entry "-" (from mapvfs.config file)
foreach rtname $runtimes { foreach rtname $runtimes {
#rtname of "-" indicates build a kit without a runtime
#first configured runtime will be the one to use the same name as .vfs folder for output executable. Additional runtimes on this .vfs will need to suffix the runtime name to disambiguate. #first configured runtime will be the one to use the same name as .vfs folder for output executable. Additional runtimes on this .vfs will need to suffix the runtime name to disambiguate.
#review: This mechanism may not be great for multiplatform builds ? We may be better off consistently combining vfsname and rtname and letting a later platform-specific step choose ones to install in bin with simpler names. #review: This mechanism may not be great for multiplatform builds ? We may be better off consistently combining vfsname and rtname and letting a later platform-specific step choose ones to install in bin with simpler names.
if {$rtname eq "-"} {
set targetkit $vfsname.kit
} else {
if {$::tcl_platform(platform) eq "windows"} { if {$::tcl_platform(platform) eq "windows"} {
set targetexe ${vfsname}.exe set targetkit ${vfsname}.exe
} else { } else {
set targetexe $vfsname set targetkit $vfsname
} }
if {$targetexe in $exe_names_seen} { if {$targetkit in $exe_names_seen} {
#more than one runtime for this .vfs #more than one runtime for this .vfs
set targetexe ${vfsname}_$rtname set targetkit ${vfsname}_$rtname
}
} }
lappend exe_names_seen $targetexe lappend exe_names_seen $targetkit
# -- ---------- # -- ----------
set vfs_installer [punkcheck::installtrack new $installername $basedir/.punkcheck] set vfs_installer [punkcheck::installtrack new $installername $basedir/.punkcheck]
$vfs_installer set_source_target $sourcefolder $buildfolder $vfs_installer set_source_target $sourcefolder $buildfolder
set vfs_event [$vfs_installer start_event {-make-step build_vfs}] set vfs_event [$vfs_installer start_event {-make-step build_vfs}]
$vfs_event targetset_init INSTALL $buildfolder/$targetexe $vfs_event targetset_init INSTALL $buildfolder/$targetkit
$vfs_event targetset_addsource $sourcefolder/$vfs $vfs_event targetset_addsource $sourcefolder/$vfs
if {$rtname ne "-"} {
$vfs_event targetset_addsource $buildfolder/build_$rtname $vfs_event targetset_addsource $buildfolder/build_$rtname
}
# -- ---------- # -- ----------
set changed_unchanged [$vfs_event targetset_source_changes] set changed_unchanged [$vfs_event targetset_source_changes]
@ -655,9 +684,17 @@ foreach vfs $vfs_folders {
if {[catch { if {[catch {
if {$rtname ne "-"} {
exec sdx wrap $buildfolder/$vfsname.new -vfs $sourcefolder/$vfs -runtime $buildfolder/build_$rtname -verbose exec sdx wrap $buildfolder/$vfsname.new -vfs $sourcefolder/$vfs -runtime $buildfolder/build_$rtname -verbose
} else {
exec sdx wrap $buildfolder/$vfsname.new -vfs $sourcefolder/$vfs -verbose
}
} result]} { } result]} {
if {$rtname ne "-"} {
puts stderr "sdx wrap $buildfolder/$vfsname.new -vfs $sourcefolder/$vfs -runtime $buildfolder/build_$rtname -verbose failed with msg: $result" puts stderr "sdx wrap $buildfolder/$vfsname.new -vfs $sourcefolder/$vfs -runtime $buildfolder/build_$rtname -verbose failed with msg: $result"
} else {
puts stderr "sdx wrap $buildfolder/$vfsname.new -vfs $sourcefolder/$vfs -verbose failed with msg: $result"
}
} else { } else {
puts stdout "ok - finished sdx" puts stdout "ok - finished sdx"
set separator [string repeat = 40] set separator [string repeat = 40]
@ -679,6 +716,8 @@ foreach vfs $vfs_folders {
set pscmd "ps" set pscmd "ps"
} }
#killing process doesn't apply to .kit build
if {$rtname ne "-"} {
if {![catch { if {![catch {
exec $pscmd | grep $vfsname exec $pscmd | grep $vfsname
} still_running]} { } still_running]} {
@ -724,19 +763,20 @@ foreach vfs $vfs_folders {
} else { } else {
puts stderr "Ok.. no running '$vfsname' processes found" puts stderr "Ok.. no running '$vfsname' processes found"
} }
}
if {[file exists $buildfolder/$targetexe]} { if {[file exists $buildfolder/$targetkit]} {
puts stderr "deleting existing $buildfolder/$targetexe" puts stderr "deleting existing $buildfolder/$targetkit"
if {[catch { if {[catch {
file delete $buildfolder/$targetexe file delete $buildfolder/$targetkit
} msg]} { } msg]} {
puts stderr "Failed to delete $buildfolder/$targetexe" puts stderr "Failed to delete $buildfolder/$targetkit"
exit 4 exit 4
} }
} }
#WINDOWS filesystem 'tunneling' (file replacement within 15secs) could cause targetexe to copy ctime & shortname metadata from previous file! #WINDOWS filesystem 'tunneling' (file replacement within 15secs) could cause targetkit to copy ctime & shortname metadata from previous file!
#This is probably harmless - but worth being aware of. #This is probably harmless - but worth being aware of.
file rename $buildfolder/$vfsname.new $buildfolder/$targetexe file rename $buildfolder/$vfsname.new $buildfolder/$targetkit
# -- --- --- --- --- --- # -- --- --- --- --- ---
$vfs_event targetset_end OK $vfs_event targetset_end OK
@ -748,36 +788,36 @@ foreach vfs $vfs_folders {
# -- ---------- # -- ----------
set bin_installer [punkcheck::installtrack new "make.tcl" $deployment_folder/.punkcheck] set bin_installer [punkcheck::installtrack new "make.tcl" $deployment_folder/.punkcheck]
$bin_installer set_source_target $buildfolder $deployment_folder $bin_installer set_source_target $buildfolder $deployment_folder
set bin_event [$bin_installer start_event {-make-step final_exe_install}] set bin_event [$bin_installer start_event {-make-step final_kit_install}]
$bin_event targetset_init INSTALL $deployment_folder/$targetexe $bin_event targetset_init INSTALL $deployment_folder/$targetkit
$bin_event targetset_addsource $buildfolder/$targetexe $bin_event targetset_addsource $buildfolder/$targetkit
$bin_event targetset_started $bin_event targetset_started
# -- ---------- # -- ----------
set delete_failed 0 set delete_failed 0
if {[file exists $deployment_folder/$targetexe]} { if {[file exists $deployment_folder/$targetkit]} {
puts stderr "deleting existing deployed at $deployment_folder/$targetexe" puts stderr "deleting existing deployed at $deployment_folder/$targetkit"
if {[catch { if {[catch {
file delete $deployment_folder/$targetexe file delete $deployment_folder/$targetkit
} errMsg]} { } errMsg]} {
puts stderr "deletion of deployed version at $deployment_folder/$targetexe failed: $errMsg" puts stderr "deletion of deployed version at $deployment_folder/$targetkit failed: $errMsg"
#exit 5 #exit 5
set delete_failed 1 set delete_failed 1
} }
} }
if {!$delete_failed} { if {!$delete_failed} {
puts stdout "copying.." puts stdout "copying.."
puts stdout "$buildfolder/$targetexe" puts stdout "$buildfolder/$targetkit"
puts stdout "to:" puts stdout "to:"
puts stdout "$deployment_folder/$targetexe" puts stdout "$deployment_folder/$targetkit"
after 300 after 300
file copy $buildfolder/$targetexe $deployment_folder/$targetexe file copy $buildfolder/$targetkit $deployment_folder/$targetkit
# -- ---------- # -- ----------
$bin_event targetset_end OK $bin_event targetset_end OK
# -- ---------- # -- ----------
} else { } else {
$bin_event targetset_end FAILED -note "could not delete $bin_event targetset_end FAILED -note "could not delete"
} }
$bin_event destroy $bin_event destroy
$bin_installer destroy $bin_installer destroy
@ -785,7 +825,7 @@ foreach vfs $vfs_folders {
} else { } else {
set skipped_vfs_build 1 set skipped_vfs_build 1
puts stderr "." puts stderr "."
puts stdout "Skipping build for vfs $vfs - no change detected" puts stdout "Skipping build for vfs $vfs with runtime $rtname - no change detected"
$vfs_event targetset_end SKIPPED $vfs_event targetset_end SKIPPED
} }
$vfs_event destroy $vfs_event destroy

12
src/modules/punk/mix/templates/layouts/project/src/runtime/mapvfs.config

@ -0,0 +1,12 @@
##single line per runtime executable. Name of runtime followed by list of .vfs folders with path relative to src folder.
##if runtime has no entry - it will only match a .vfs folder with a matching filename e.g runtime1.exe runtime1.vfs
##Use a runtime with a name of dash (-) to build a .kit file from the .vfs folder using no runtime
##examples:
#- myproject.vfs
## will produce myproject.kit
#tclkit86bi.exe project1.vfs project2.vfs
## will produce executables project1.exe & project2.exe (on windows) or project1 & project2 on other platforms
#tclkit87bi.exe project1.vfs
## will produce project1_tclkit87bi.exe or project1_tclkit87bi because the project1 name was already taken above
##
## All kits whether directly executable or not will deploy to the projects /bin folder
Loading…
Cancel
Save