바이너리의 Subversion 버전 문자열

기술노트 57192

아키텍처:

All

컴포넌트:

IDE

업데이트:

2018-02-28 오전 2:36

Introduction

I want a version string in my executable. I am using Subversion.

Possible solution

Use the Subversion program svnversion to produce version strings.

  • Set a pre-build action to call an appropriate script.
  • Create a script creating a C source file with a version string.
  • Include the created C source in your project.
  • Do not include the created C source in your version archive.
  • Optionally, use the version string in your code. If so, suggest to create and use a headerfile as done in the example code.
  • Optionally, add a post-build action to remove the created C source.

Download Example (TN57192).zip for more details.

You may want to look at the screenshots in the example file first.

Comments

Has been tested

  • with IAR Embedded Workbench for ARM version 6.50.3.
  • with IAR Embedded Workbench for AVR version 6.20.2.
  • on Microsoft Windows 7 64-bit.
  • with path including blanks.
  • with path on another drive letter.
  • with path on a UNC share (e.g.,\\server\share\path).

Set Tools > Options > Messages > Show build messages > 'All' to get messages from bat file in Build Log.

 

All product names are trademarks or registered trademarks of their respective owners.

죄송하지만, 당사 사이트에서는 Internet Explorer를 지원하지 않습니다.보다 편안한 사이트를 위해 Chrome, Edge, Firefox 등과 같은 최신 브라우저를 사용해 주시길 부탁드립니다.