Skip to content

Commit

Permalink
Add version resource to sfviewer
Browse files Browse the repository at this point in the history
  • Loading branch information
starg2 committed Dec 23, 2023
1 parent 889e4d0 commit 2cb7253
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 6 deletions.
7 changes: 3 additions & 4 deletions interface/w32g_res.rc
Original file line number Diff line number Diff line change
Expand Up @@ -4158,22 +4158,21 @@ VS_VERSION_INFO VERSIONINFO
{
VALUE "Comments", "\0"
VALUE "CompanyName", "\0"
VALUE "FileVersion", TIMID_VERSION_RESSTR
VALUE "FileVersion", TIMID_VERSION4_RESSTR
#ifdef TWSYNG32
VALUE "FileDescription", "TiMidity++ Win32GUI Synthesizer\0"
VALUE "InternalName", "twsyng\0"
VALUE "OriginalFilename", "twsyng.exe\0"
VALUE "ProductName", "TiMidity++ Win32GUI Synthesizer Version\0"
#else
VALUE "FileDescription", "TiMidity++ Win32GUI\0"
VALUE "InternalName", "timw32g\0"
VALUE "OriginalFilename", "timw32g.exe\0"
VALUE "ProductName", "TiMidity++ Win32GUI Version\0"
#endif
VALUE "ProductName", "TiMidity++\0"
VALUE "LegalCopyright", "Copyright (C) 1999-2018 Masanao Izumo <mo@goice.co.jp>\r\nCopyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>\0"
VALUE "LegalTrademarks", "\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductVersion", TIMID_VERSION
VALUE "ProductVersion", TIMID_VERSION_RESSTR
VALUE "SpecialBuild", "\0"
}
}
Expand Down
1 change: 1 addition & 0 deletions sf_view_gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ add_executable(
sfview_dlg.rc
)

add_dependencies(sfviewer UpdateTim41Version)
target_link_libraries(sfviewer timidity_cfgforsf libarc utils comctl32 shlwapi ws2_32)
install(TARGETS sfviewer)
41 changes: 40 additions & 1 deletion sf_view_gui/sfview_dlg.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <wingdi.h>
#include <commctrl.h>
#include "resource.h"
#include "version.h"

IDB_TREEICON BITMAP "bitmap1.bmp"

Expand Down Expand Up @@ -30,7 +31,7 @@ END
101 DIALOGEX 0, 0, 255, 195
STYLE WS_OVERLAPPEDWINDOW | DS_CENTER
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Soundfont Viewer 1.01"
CAPTION SFVIEWER_TITLE_WITH_VERSION
MENU IDR_MENU1
LANGUAGE LANG_JAPANESE, 0x1
FONT 9, "MS UI Gothic", FW_NORMAL, 0, 128
Expand All @@ -43,3 +44,41 @@ END
IDI_ICON1 ICON "icon1.ico"


//
// Version Information resources
//
#ifdef _MSC_VER
LANGUAGE LANG_JAPANESE, SUBLANG_JAPANESE_JAPAN
#endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION TIMID_VERSION4_COMMA
PRODUCTVERSION TIMID_VERSION4_COMMA
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
FILEFLAGSMASK 0x0000003F
FILEFLAGS 0x00000000
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000004E4"
BEGIN
VALUE "Comments", "\0"
VALUE "CompanyName", "\0"
VALUE "FileVersion", TIMID_VERSION4_RESSTR
VALUE "FileDescription", "Soundfont Viewer\0"
VALUE "InternalName", "sfviewer\0"
VALUE "OriginalFilename", "sfviewer.exe\0"
VALUE "ProductName", "TiMidity++\0"
VALUE "LegalCopyright", "Copyright (C) 1999-2018 Masanao Izumo <mo@goice.co.jp>\r\nCopyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>\0"
VALUE "LegalTrademarks", "\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductVersion", TIMID_VERSION_RESSTR
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0000, 0x04E4
END
END
5 changes: 4 additions & 1 deletion version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define ___VERSION_H_

#define TIMID_VERSION "${tim41VersionStr}"
#define TIMID_VERSION_RESSTR "${tim41VersionStr}\0"
#define TIMID_VERSION4_COMMA ${tim41Version4Comma}
#define TIMID_VERSION_RESSTR "${tim41Version4Comma}\0"
#define TIMID_VERSION4_RESSTR "${tim41Version4Comma}\0"

#define SFVIEWER_TITLE_WITH_VERSION "Soundfont Viewer v${tim41VersionStr}"

#endif /* !___VERSION_H_ */

0 comments on commit 2cb7253

Please sign in to comment.