trevordevore / levure

Application development framework for LiveCode
MIT License
32 stars 14 forks source link

preparing (encrypting) some files as a pre-build step during build process #189

Closed rodneytamblyn closed 2 years ago

rodneytamblyn commented 2 years ago

Hi Trevor,

I'm interested in encrypting some files as a pre-packaging task during the build process.

The high level abstraction/steps I would imagine is:

What's the correct way for me to achieve this process.

I see dispatch is used to send these callbacks so presumably they are non-blocking? Is there a way to pause the build process while the required task is completed?

I offer to submit a PR to the wiki pages when I have clarified this and got it working with my project :-)

Callback messages from Packager I have found so far:

From https://github.com/trevordevore/levure/wiki/Levure-API#levurepackageapplication

The packager callback stackfiles property in app.yml points to a stack that will receive the finalizePackagedAssets pBuildProfile, pBuildProfile, @xAppA, pAppFolder, finalizeStandaloneForPlatform pBuildProfile, pPlatform, pAppA, pAppFolder, pFolderSavedIn, finalizePackageForPlatform pBuildProfile, pPlatform, pAppA, pAppFolder, pOutputFolder, and packagingComplete pBuildProfile, pOutputFolder, pAppA messages.
on finalizePackagedAssets pBuildProfile, pPlatform, xAppA, pAppFolder
end finalizePackagedAssets

on finalizeStandaloneForPlatform pBuildProfile, pPlatform, pAppA, pAppFolder, pFolderSavedIn
end finalizeStandaloneForPlatform 

on finalizePackageForPlatform pBuildProfile, pPlatform, xAppA, pAppFolder, pOutputFolder
end finalizePackageForPlatform

on packagingComplete pBuildProfile, pOutputFolder, xAppA
end packagingComplete
trevordevore commented 2 years ago

@rodneytamblyn dispatch is blocking so the callbacks will already behave the way you want them to. I think you want to use finalizePackageForPlatform as all of the files that go into the platform build will be in the temp folder at this point.

rodneytamblyn commented 2 years ago

That's great Trevor. I will give this a go. If I find anything useful to contribute to the page I'll make a wiki PR.

~ Rodney