GithubHelp home page GithubHelp logo

delphidabbler / vied Goto Github PK

View Code? Open in Web Editor NEW
9.0 4.0 4.0 937 KB

Version Information Editor for Windows

Home Page: https://delphidabbler.com/software/vied

Pascal 71.00% CSS 0.44% HTML 26.81% Inno Setup 0.88% Batchfile 0.87%

vied's Introduction

Version Information Editor (VIEd)

Overview

Version Information Editor enables version information to be edited. It also creates version information resource source (.rc) files. The program stores details of the version information in its own project (.vi) files. Simple macros can be used to help automate the updating of version information files.

The program can also create binary resource (.res) files containing version information. To do this it needs to be configured to use a 3rd party resource compiler such as Embarcadero's BRCC32.

A command line switch, -makerc, is supported that silently creates a .rc file from a native .vi file passed on the command line. The program them exits without displaying a window. This option has been made available so that Version Information Editor can be used in automated build processes.

System Requirements

VIEd requires Windows XP and later.

Source Code

VIEd is written in Object Pascal and is compiled with Delphi XE, although any later Delphi compiler may suffice.

See Build.md in the repo root for information about how to build the program from source code.

Contributing

Contributions are welcome.

The GitFlow branching model is used.

To contribute please fork the project and create a new branch off develop that is named feature/your-feature-name. Create a pull request for your feature branch when you're ready. Pull requests must be configured to merge to the develop branch, not master.

Contributions should be licensed under either the Mozilla Public License v2.0 (without a "Incompatible with Secondary Licenses" notice) or under some other compatible license, preferably one in common use. Note that the GPL and its cousins are not compatible.

Executable Code

VIEd is distributed in a zip file containing a standard Windows installer. All releases from the latest back to v2.13.0 are available from the project's releases page.

Documentation

For help using the program the first port of call should be the program's comprehensive HTML help file.

Information on how to install the program is in Docs/ReadMe.txt.

The change log is in CHANGELOG.md in the repository root.

The program's .vi file format is documented in Docs/vi-file-format.md.

Finally, the program has a Web page at https://delphidabbler.com/software/vied.

Bugs and Feature Requests

Any bug reports and feature requests can be made via the project's issue tracker.

License

Most of the original source code is licensed under the terms of the Mozilla Public License 2.0. For full details of source code licensing, including that for 3rd party code and the program's images, see Docs/SourceCodeLicenses.md.

The license for the executable code can be found in Docs/License.rtf.

Note that versions prior to v2.13.0 had different licensing arrangements, so please check before using those versions.

vied's People

Contributors

delphidabbler avatar

Stargazers

George Birbilis avatar Peter Abbasi avatar  avatar Marco Breveglieri avatar JP Fulks avatar John Kouraklis avatar Buks van Tonder avatar TheCocce avatar  avatar

Watchers

James Cloos avatar  avatar  avatar John Kouraklis avatar

vied's Issues

Update help file re changes

Help file needs updating re following:

  • Change in main interface: new list view
  • Change in minimum O/S requirements EDIT: O/S requirements not mentioned in help file
  • Change to comments / string info editor: resizeable, caret position displayed
  • New File | Clear Preferences menu option

Bug in macro name validation

class function TVInfo.IsValidMacroName(const N: string): Boolean;

This method will accept an empty macro name as valid. It will also accept a digit to start the macro name. (EDIT: digits are permitted to start macro names according to docs)

Add fields for day, month etc.

There's a <YEAR> field in VIEd, but no corresponding day or month fields.

Some ideas:

  • <MONTH> - Month number: 1..12
  • <MONTH_0> - Month number, zero padded: 01..12
  • <DAY> - Day of month 1..31
  • <DAY_0> - Day of month, zero padded: 01..31
  • <MONTH_NAME> - Full name of month in relevant translation's locale
  • <MONTH_NAME_A> - Abbreviated name of relevant translation's locale
  • <DOW> - One based number of day of week: 1..7 (1 = Sunday)
  • <DOW_0> - Zero based number of day of week: 0..6 (0 = Sunday)
  • <DOW_M> - One based number of day of week: 1..7 (1 = Monday)
  • <DOW_M_0> - Zero based number of day of week: 0..6 (0 = Monday)
  • <DOW_NAME> - Full name of day of week in relevant translation's locale
  • <DOW_NAME_A> - Abbreviated name of day of week in relevant translation's locale

UTF-8 characters get corrupted by VI editor

Symbols like © get corrupted when displayed in the VIEd editor.

File reading/writing needs to be fixed to work with UTF-8.

Maybe this needs to either use the BOM or to be set as an option to avoid breaking backward compatibility.

Update `Docs/ReadMe.txt`

This read-me, that is distributed with the program installer, is out of date and needs a thorough overhaul before the next release.

Permit dash and underscore in macro names

The decision to limit macro names to alpha-numeric characters is quite limiting when using multi-word names.

I find the name my-macro or my_macro to be more readable than mymacro or even MyMacro.

So it would be good to allow one or both the dash and the underscore in macro names.

VIEd crashes if there are circular fields references

In issue #49 it was said in a comment that:

There's a bug waiting in the form of circular references between string information fields (in fact it might already exist between the current string info fields).

The bug does indeed exist.

To reproduce set Original File Name equal to <PRODUCTNAME> and set Product Name to <SHORTFNAME>. Now press Ctrl+C to copy RC statements. The program will hang then crash. This is caused by circular references and leads to a stack overflow.

Read version info from an executable and / or resource file

Enable VIEd to read version information directly from an existing executable or binary resource file.

This will make it easier to port version info into VIEd rather than having to type in all the info from scratch.

B/f from issue 9 of the old verinfo-tools tracker on GoogleCode.

Prettify VIEd interface

Make VIEd UI use modern fonts.

Make main display distinguish between headers and VI items visually.

B/f from issue 17 of the old verinfo-tools tracker on GoogleCode.

Optionally write `.rc` files in UTF-8

There could still be a problem with file encodings across different locales because, by default, resource compilers assume the local default ANSI encoding.

Additionally, even when the locale doesn't change, some characters that fall outside the default ANSI encoding won't render correctly.

Therefore it makes sense, when the .rc file output would contain anything except 7 bit ASCII text, to write the file in UTF-8.

Suitable pragmas (and possible command line options) will need to be used.

See this article for an explanation.

Update Fixed & Variable File Information per modern MS docs

Check the following version information vales against MS documentatiom;

  • File OS: VOS_UNKNOWN flag isn't used in VIEd. Does it need to be?
  • File type: VFT_DRV needs missing VFT2_DRV_VERSIONED_PRINTER option.
  • File flags 1: VS_FF_INFOINFERRED is present in VIEd code but not in docs. If this is removed it affects ValidFileFlagsMask routine.
  • File flags 2: VS_FFI_FILEFLAGSMASK is a combination of all file flags - can this be used and does it include VS_FF_INFOINFERRED.
  • Languages: re check against list in docs - some spelling may differ.
  • Character sets: names differ - recheck with docs (also layout in source code is off - may contain tabs).

Add a row/column counter to comments editor

It would be useful in limiting the length of a line of comments to a fixed number of characters if it displayed a column / line counter.

B/f from issue 14 of the old verinfo-tools tracker on GoogleCode.

Remove or more strictly enforce limit on length of string table entry values

Main form imposes a limit of 128 characters on the length of string information values.

Ed.MaxLength := 128; // limit length of text to 128

Such a restriction is not supported by MS documentation for version information. So, unless BRCC32 enforces this there's no need for it.

So, depending on BRCC32, the limit should either be lifted or should be enforced after fields & macros have been expanded.

Add a mechanism to import some data from external files

Possibly add an extension to current field format (some kind of #include directive), or add a different pre-processor to include data from files that is then processed as normal. Using the latter method means that external files can contain fields.

This will be useful for any occasions where there is more than one program or DLL that shares some version data, such as product version or license details.

Inconsistent style of hex symbol used in main display

Normally the Pascal style "$" hex symbol is displayed in the main window, for example for the File Sub-type or File Flags / File Flags Mask when the "Describe File Flags" option is off.

However the hex symbol can change to the C-style "0x" hex symbol under some circumstances.

To reproduce do this:

  1. Start a new instance of the application
  2. Load a .vi file and change its File Type to VFT_APP or VFT_DLL if necesarry - note that the File Sub-type is displayed using the "$" hex symbol
  3. Choose the File > View RC Statements menu option
  4. Reload the .vi file. The hex symbol used now will be "0x".

Increase size of dialogue used to display RC file

The dialogue used to display the RC resource file that will be generated is rather small.

It could do with increasing in size, or making resizable with persistent size.

B/f from issue 15 of the old verinfo-tools tracker on GoogleCode.

Trim trailing spaces from string information items

At present any leading and trailing spaces entered into string information items are retained when the .rc file is generated.

Remove the trailing spaces by default.

Or make trimming of leading and trailing spaces an option?

Add a row/column counter to comments editor

It would be useful in limiting the length of a line of comments to a fixed number of characters if it displayed a column / line counter.

B/f from issue 14 of the the old verinfo-tools tracker on GoogleCode.

Update docs re missing releases for v2.11.1 & v2.12.0

Some documentation notes that releases go back to v2.11.2. However the release pages link to GoogleCode which has been unavailable for some years.

Releases 2.11.2 and 2.12.0 are no longer available.

Need to update affected documentation.

Permit version info items to be deleted

Change so that any version info item in VIEd's display can be "deleted" by pressing Del key (or selecting Edit | Delete menu item).

What delete means will depend on what the item is - it may be to delete a string or set a number to 0 or a default value.

B/f from issue 11 of the old verinfo-tools tracker on GoogleCode.

Make the comments editor resizable

The comments editor would be easier to use if it could be resized or defaulted to 80 columns in width.

B/f from issue 13 of the old verinfo-tools tracker on GoogleCode.

Convert to compile with Delphi 12

It's about time this code base was moved to an up to date compiler.

Probably safer to stick to a 32 bit only Windows target to begin with.

Generate binary resource without use of external compiler

It is inconvenient to have to use an external resource compiler to compile .res files from intermediate .rc files. Add facility to VIEd to generate binary files directly.

B/f from issue 16 of the old verinfo-tools tracker on GoogleCode.

Add new fields relating to string file info items

This issue has been created from off topic suggestions in issue #31. Those comments were:


A field that returns the full contents of the Original File Name string information item could be useful.

There's already the <SHORTFNAME> field that removes the file extension from Original File Name, so how about <FNAME> for the full content.

Originally posted by @delphidabbler in #31 (comment)


Another useful field that provides access to a string information item could be <COMPANYNAME>. This would allow the company name to be used in string information, such as copyright.

Also, an obvious complement to <SPECIALBUILD> would be <PRIVATEBUILD>.

Finally, in case the Internal Name string information isn't connected with Original File Name it will do no harm to have a <INTERNALNAME> field.

Originally posted by @delphidabbler in #31 (comment)


In proposing additional fields providing access to string information items, wouldn't it be easier to provide a field for each string item ? That way there's no need to try to second guess which ones would be useful.

Originally posted by @delphidabbler in #31 (comment)

Update `README.md`

The main README.md document contains some broken and/or out of date links.

The content of some sections needs overhauling.

This needs to be done before the next release.

Error parsing `<SHORTFNAME>` field

tkSHORTFNAME: Result := RemoveExtension(StrInfo[siOriginalFileName]);

All other fields that reference contents of a string info item evaluate fields in string info item rather than simply referencing it. For example, here's how <PRODUCTNAME> is parsed:

tkPRODUCTNAME: Result := EvaluateFields(siProductName);

So, should <SHORTFNAME> be parsed like this instead?:

case I of
  // ...
  tkSHORTFNAME: Result := RemoveExtension(EvaluateFields(siOriginalFileName);
  // ...
end;

Allow version numbers to be quickly and easily incremented

Add a facility to quickly and easily increment a version number.

Will need a setting to decide which version number field is incremented and whether file and product versions are to be kept in sync. EDIT: not needed: implemented via version number editor dialogue box.

B/f from issue 12 of the old verinfo-tools tracker on GoogleCode.

Refactor `UVInfo.pas`

To quote from the comments in the UVInfo unit:

THIS CODE IS VERY "SMELLY"!

"Smelly" according to Fowler's definition of bad code smells in his book "Refactoring".

The macro handling functionality was added in to the TVInfo class when it really should be in its own class.

Further, the implementation just grew like topsy and there's a lot of duplication and confusing code.

Data structures are badly chosen too.

This code really needs a major overhaul.

Nuff said!

Command line version of VIEd

Create a command line version of VIEd that can generate .res files directly from .vi files.

B/f from issue 18 of the old verinfo-tools tracker on GoogleCode.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.