You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
In the meantime a workaround could be to write your own 'fips verb' scripts, which runs the 'fips gen' functionality, and after that injects crinkle, it would look roughly like this (copied from https://github.com/floooh/oryol/blob/master/fips-verbs/testrunner.py), and you would run "./fips crinkle" instead of "./fips gen"
frommodimportlog, project, settings, util, config#-------------------------------------------------------------------------------defrun(fips_dir, proj_dir, args) :
cfg_name=settings.get(proj_dir, 'config')
project.gen(fips_dir, proj_dir, cfg_name)
# for each application target, inject crinkle in vcxproj filecfg=config.load(fips_dir, proj_dir, cfg_name)[0]
proj_name=util.get_project_name_from_dir(proj_dir)
build_dir=util.get_build_dir(fips_dir, proj_name, cfg)
success, targets=project.get_target_list(fips_dir, proj_dir, cfg_name)
ifsuccess :
app_targets= [tgtfortgtintargetsiftargets[tgt] =='app']
forappinapp_targets :
# hmmmmm... ok now it gets tricky... the vcxproj file for this# target which has been generated by cmake is somewhere under # build_dir but we don't have the information WHERE... so some# hackery and hard-wiring would be involved here...log.info(">>> patching vcxproj for target '{}'".format(app))
#-------------------------------------------------------------------------------defhelp() :
log.info(log.YELLOW+'fips crinkle\n'+log.DEF+' gen and inject crinkle')
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:
./fips gen win32-vs2013-minsizerel
which is a release config which adds the/CRINKLER
link parameter, among other things../fips open win32-vs2013-minsizerel
to load the VS 2013 project.${projectRoot}\
to the ExecutablePath settings.link.exe
which is then picked as the linker by Visual Studio.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 infips-generators
, and can be added as an option tofips-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 openfips-build/${path-to-project}/${project-name}.vcxproj
, and inject an<ExecutablePath>
property.The text was updated successfully, but these errors were encountered: