Skip to content
Snippets Groups Projects
Commit b3c506bc authored by Nat Goodspeed's avatar Nat Goodspeed
Browse files

MAINT-7514: Add (32) or (64) to registry for "install again?" prompt.

Specifically, append (32) or (64) to the four-part version number stored in
the registry entry used to detect whether this viewer has already been
installed. This is injected as a new VERSION_REGISTRY NSIS variable.

(It was tempting to simply change the value of VERSION_LONG with the embedded
address size. However, there is one other use of VERSION_LONG in the NSIS
template. That use is the subject of MAINT-7533.)

Synthesize the VERSION_REGISTRY value in viewer_manifest.py and add it to the
substitution dict used to populate the NSIS template.

ADDRESS_SIZE isn't passed into viewer_manifest.py, but it can be inferred from
the existing 'arch' parameter: 'arch' as well as 'platform' is used to select
the specific subclass of the ViewerManifest class to instantiate for this run.
Add an appropriate address_size attribute to every such subclass.

Change a couple existing tests on 'arch' to tests on self.address_size instead
-- clearer to the maintainer.

Also, given that subclass selection mechanism, the ViewerManifest base class
shouldn't need if / elif tests on 'platform'. Make build_data_json_platform a
class attribute as well, removing the base-class stanza that dynamically
examines 'platform' and 'arch'.

Similarly, move platform-specific tweaks to the build_data_dict used to
populate build_data.json into a new finish_build_data_dict() method overridden
by individual platform subclasses.

Encapsulate the logic around running the Windows code-signing tool into a
sign() method, and call it as needed. For obtaining environment variables with
fallback values, use os.environ.get() instead of os.path.expandvars() with
tests on the returned value.
parent 6bcbee33
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment