-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Examples updates. Added programmatic maintenance tool passthru args d…
…emo to Dynamic Finish Example to tweak custom uninstall on upgrade context. Added a new UI Example, demoing component selection and enabling / disabling per the internet status (with plans to expand to other UI demos).
- Loading branch information
BuvinJ
committed
Jan 15, 2021
1 parent
35ae18d
commit ada03b7
Showing
5 changed files
with
123 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
from distbuilder import( RobustInstallerProcess, ConfigFactory, | ||
QtIfwControlScript, findQtIfwPackage ) | ||
|
||
f = masterConfigFactory = ConfigFactory() | ||
f.productName = "Hello Custom UI Interactions Example" | ||
f.companyTradeName = "Some Company" | ||
f.companyLegalName = "Some Company Inc." | ||
f.iconFilePath = "../hello_world_tk/demo.ico" | ||
f.version = (1,0,0,0) | ||
f.setupName = "HelloUiInteractionsSetup" | ||
|
||
# Define a "Package Factory Dictionary" | ||
# Note: None values for a ConfigFactory results in making a clone of the | ||
# master, which can then be customization from that "base" within | ||
# RobustInstallerProcess.onConfigFactory | ||
TK_CONFIG_KEY = "tk" | ||
CLI_CONFIG_KEY = "cli" | ||
pkgFactories={ TK_CONFIG_KEY:None, CLI_CONFIG_KEY:None } | ||
|
||
licenseName = "LICENSE.TXT" | ||
|
||
class BuildProcess( RobustInstallerProcess ): | ||
|
||
def onConfigFactory( self, key, f ): | ||
if key==TK_CONFIG_KEY: | ||
f.productName = "Hello World Tk Example" | ||
f.description = "Tk Example" | ||
f.binaryName = "HelloWorldTk" | ||
f.version = (1,0,0,0) | ||
f.isGui = True | ||
f.sourceDir = "../hello_world_tk" | ||
f.entryPointPy = "hello.py" | ||
f.iconFilePath = "demo.ico" | ||
elif key==CLI_CONFIG_KEY: | ||
f.productName = "Hello World CLI Example" | ||
f.description = "CLI Example" | ||
f.binaryName = "HelloWorld" | ||
f.version = (1,0,0,0) | ||
f.isGui = False | ||
f.sourceDir = "../hello_world" | ||
f.entryPointPy = "hello.py" | ||
f.iconFilePath = None | ||
f.distResources = [licenseName] | ||
|
||
def onQtIfwConfig( self, cfg ): | ||
|
||
def reviseComponentSelectionPage( cfg, tkPkg ): | ||
Script = QtIfwControlScript | ||
TAB = Script.TAB | ||
ELSE = Script.ELSE | ||
SBLK = Script.START_BLOCK | ||
EBLK = Script.END_BLOCK | ||
NET_ERR_MSG="The Tk Example requires an internet connection" | ||
cfg.controlScript.componentSelectionPageInjection =( | ||
Script.ifAutoPilot( isMultiLine=True ) + | ||
TAB + Script.ifComponentSelected( tkPkg, | ||
isMultiLine=True ) + | ||
(2*TAB) + Script.assertInternetConnected( | ||
errMsg=NET_ERR_MSG ) + | ||
TAB + EBLK + | ||
EBLK + ELSE + SBLK + | ||
TAB + Script.ifInternetConnected( isRefresh=True, | ||
isMultiLine=True ) + | ||
(2*TAB) + QtIfwControlScript.enableComponent( tkPkg, True ) + | ||
TAB + EBLK + | ||
TAB + ELSE + SBLK + | ||
(2*TAB) + QtIfwControlScript.warningPopup( NET_ERR_MSG ) + | ||
(2*TAB) + QtIfwControlScript.selectComponent( tkPkg, False ) + | ||
(2*TAB) + QtIfwControlScript.enableComponent( tkPkg, False ) + | ||
TAB + EBLK + | ||
EBLK | ||
) | ||
|
||
pkgs = cfg.packages | ||
tkPkg = findQtIfwPackage( pkgs, TK_CONFIG_KEY ) | ||
cliPkg = findQtIfwPackage( pkgs, CLI_CONFIG_KEY ) | ||
reviseComponentSelectionPage( cfg, tkPkg ) | ||
|
||
p = BuildProcess( masterConfigFactory, pyPkgConfigFactoryDict=pkgFactories, | ||
isDesktopTarget=True ) | ||
p.isInstallTest = True | ||
p.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# TODO! |