Settings for lint running cmdline

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
NeoGeonode
Newbie
Posts: 6
Joined: Thu Jun 14, 2018 12:07 pm
Completed: TBD
Projects: TBD
Contact:

Settings for lint running cmdline

#1 Post by NeoGeonode »

Hi guys,

Recently I added to a customized script sequence calling my project from cmd line for CI/CD integrations, like:

- "cd /D D:\\Program Files (x86)\\Renpy\\renpy-6.99.4-sdk\\"
    • - 'set PROJ_PATHBASE="<path>"'
      - 'set PROJ_OUTPUT_FILE= <path>\\results.txt"'
      - "renpy.exe %PROJ_PATHBASE% lint %PROJ_OUTPUT_FILE%"


At that point, if I run lint, from launcher, for example, it recognizes some settings from the platform, as I perform something like:

## get_target_resolution(source_x, source_y)
## Function for retrieving scaling data for the images.


To select the appropiate asset, distinguishing between "_std" for 4:3 resolutions and "_wide" for 16:9 resolutions
But, as long as I am not sending the platform parameter, it is not detecting the "_wide" asset.

Usually the "lint" running from launcher does not complain for that missing files, because its using the "_wide" setting from the platform setting, like:

if renpy.windows:

And so on...

Now, below is an example, which is right, because the file does not exist:

game/im_re_res_reg.rpy:43 Image anime_studio_outdoor_spring_morning uses file 'artwork/bg/static/city/anime_studio/outdoor/anime_studio_outdoor_spring_morning_std.png', which is not loadable.


My question is,

This makes me wonder if there is a way to pass some platform information as "arg" to the cmdline, so it can recognize the information needed.
Such information like platform, and if I can customize some of it to harness some additional testings

This is, in order to extend the current lint on my build process, so I can validate for newer warnings on the code

Thank you!
NeoGeonode

:!: People is looking for new experiences, that gives them knowledge, experience and of course, money whereas.

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Settings for lint running cmdline

#2 Post by PyTom »

If it's your own script, I'd suggest using os.environ to get at the environment variables. Once you have them, you can pass in what you need.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: No registered users