Suggestion: custom post-generator scripts

Aperta
#144 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cmake, python
Ambito
build-system

Direzione di ricerca

The request is a hook that runs after ./fips gen, with scripts in fips-generators referenced from a custom fips-configs/*.yml entry. Start by reading how the existing generator step is invoked and what context it passes, and decide which values (project root, fips-build output path, project paths) the hook receives. Done means a settled design for the hook interface, agreed with the maintainer, before any implementation.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

feature

Use case: I'm doing a little side-project which uses Crinkler to shrink the executable. For this build variant, I'm using VS2013 because Crinkler doesn't work well with more recent versions of the Windows SDK.

My current work flow:

  • Run ./fips gen win32-vs2013-minsizerel which is a release config which adds the /CRINKLER link parameter, among other things.
  • Run ./fips open win32-vs2013-minsizerel to load the VS 2013 project.
  • In the VS2013 project properties, add ${projectRoot}\ to the ExecutablePath settings.
  • In my project root, there is the Crinkler executable named link.exe which is then picked as the linker by Visual Studio.
  • Redo the changes inside VS each time the project changes, and project files are overwritten.

Now, in theory there is a CMake option to customize the linker executable, but my StackOverflow skills have failed me to find a working solution, if there even is one supposed to work with the VS generators.

Here's the idea: Allow a post-generator script, very much like code generation, which runs after ./fips gen. The script can just sit in fips-generators, and can be added as an option to fips-configs/${my-custom-config}.yml.

The script may need to pass a few information, e.g. the project root, the generator output path in fips-build/, and/or the (a list of) project path(s). In my example, a custom script would then try to open fips-build/${path-to-project}/${project-name}.vcxproj, and inject an <ExecutablePath> property.

Lingua principale
Python
Stelle
506
Fork
84
Merge medio
13h 14m
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di floooh/fips

Tutte le issue di floooh/fips

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.