#! /usr/bin/perl # Copyright (c) 2002-2016, Dirk Krause. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause my $version = "4.8.0"; my $copyrightyears = "2017"; sub create_rc_file($$$$$$$$$) { my $filename = shift; my $vendor = shift; my $iconfile = shift; my $swname = shift; my $version = shift; my $prodname = shift; my $internalname = shift; my $fileversion = shift; my $prodversion = shift; my $outfile = undef; if($version =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/o) { $fileversion = $1 . "," . $2 . "," . $3 . "," . $4; $prodversion = $fileversion; } else { if($version =~ /(\d+)\.(\d+)\.(\d+)/o) { $fileversion = $1 . "," . $2 . "," . $3 . ",0"; $prodversion = $fileversion; } else { if($version =~ /(\d+)\.(\d+)/o) { $fileversion = $1 . "," . $2 . ",0,0"; $prodversion = $fileversion; } else { if($version =~ /(\d+)/o) { $fileversion = $1 . ",0,0,0"; $prodversion = $fileversion; } } } } if(open($outfile, ">$filename")) { if(defined($iconfile)) { print $outfile "aaaaa ICON $iconfile\r\n\r\n"; # print $outfile "#include \"wx/msw/wx.rc\"\r\n"; } print $outfile "#include \r\n"; print $outfile "\r\n"; print $outfile "VS_VERSION_INFO VERSIONINFO\r\n"; print $outfile " FILEVERSION $fileversion\r\n"; print $outfile " PRODUCTVERSION $prodversion\r\n"; print $outfile " FILEFLAGSMASK 0x3fL\r\n"; print $outfile "#ifdef _DEBUG\r\n"; print $outfile " FILEFLAGS 0x1L\r\n"; print $outfile "#else\r\n"; print $outfile " FILEFLAGS 0x0L\r\n"; print $outfile "#endif\r\n"; print $outfile " FILEOS 0x4L\r\n"; print $outfile " FILETYPE 0x1L\r\n"; print $outfile " FILESUBTYPE 0x0L\r\n"; print $outfile "BEGIN\r\n"; print $outfile " BLOCK \"StringFileInfo\"\r\n"; print $outfile " BEGIN\r\n"; print $outfile " BLOCK \"040904b0\"\r\n"; print $outfile " BEGIN\r\n"; print $outfile " VALUE \"Comments\", \"$swname\\0\"\r\n"; print $outfile " VALUE \"CompanyName\", \"$vendor\\0\"\r\n"; print $outfile " VALUE \"FileDescription\", \"$swname\\0\"\r\n"; print $outfile " VALUE \"FileVersion\", \"$version\\0\"\r\n"; print $outfile " VALUE \"InternalName\", \"$internalname\\0\"\r\n"; print $outfile " VALUE \"LegalCopyright\", \"Copyright \251 $copyrightyears $vendor\\0\"\r\n"; print $outfile " VALUE \"ProductName\", \"$prodname\\0\"\r\n"; print $outfile " VALUE \"ProductVersion\", \"$version\\0\"\r\n"; print $outfile " END\r\n"; print $outfile " END\r\n"; print $outfile " BLOCK \"VarFileInfo\"\r\n"; print $outfile " BEGIN\r\n"; print $outfile " VALUE \"Translation\", 0x409, 1200\r\n"; print $outfile " END\r\n"; print $outfile "END\r\n"; print $outfile "\r\n"; close($outfile); } } my $infile = undef; my $firstline = 1; if(open($infile, ") { $line = $_; chomp($line); if($firstline) { if($line =~ /(\S+)/o) { $version = $1; $firstline = 0; } } } close($infile); } create_rc_file( "dk-cat.rc", "Dirk Krause", "dkicon.ico", "A cat clone, shows text file contents", $version, "Dirk Krause's tools", "dk-cat", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-blks.rc", "Dirk Krause", "dkicon.ico", "Blocksize corrector, creates sequence of fixed size blocks", $version, "Dirk Krause's tools", "dk-blks", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-eradisk.rc", "Dirk Krause", "dkicon.ico", "Create data stream to erase a disk", $version, "Dirk Krause's tools", "dk-eradisk", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-ls.rc", "Dirk Krause", "dkicon.ico", "An ls clone, configurable output column order", $version, "Dirk Krause's tools", "dk-ls", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-sort.rc", "Dirk Krause", "dkicon.ico", "A sort clone, mainly intended for Windows", $version, "Dirk Krause's tools", "dk-sort", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-lines.rc", "Dirk Krause", "dkicon.ico", "Extract specific lines from text", $version, "Dirk Krause's tools", "dk-lines", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-fic.rc", "Dirk Krause", "dkicon.ico", "File integrity check", $version, "Dirk Krause's tools", "dk-fic", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-sqlsplit.rc", "Dirk Krause", "dkicon.ico", "Split overlong SQL lines", $version, "Dirk Krause's tools", "dk-sqlsplit", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-pwgen.rc", "Dirk Krause", "dkicon.ico", "Generator for passwords, PINs and hexadecimal keys", $version, "Dirk Krause's tools", "dk-pwgen", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-rand.rc", "Dirk Krause", "dkicon.ico", "Random data generator", $version, "Dirk Krause's tools", "dk-rand", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-t2h.rc", "Dirk Krause", "dkicon.ico", "Text to HTML converter", $version, "Dirk Krause's tools", "dk-t2h", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-t2l.rc", "Dirk Krause", "dkicon.ico", "Text to LaTeX converter", $version, "Dirk Krause's tools", "dk-t2l", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-hex.rc", "Dirk Krause", "dkicon.ico", "Show file contents in hexadecimal notation", $version, "Dirk Krause's tools", "dk-hex", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-bmm.rc", "Dirk Krause", "dkicon.ico", "Backup media manager", $version, "Dirk Krause's tools", "dk-bmm", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-recv.rc", "Dirk Krause", "dkicon.ico", "Receive data transmission", $version, "Dirk Krause's tools", "dk-recv", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-send.rc", "Dirk Krause", "dkicon.ico", "Send data transmission", $version, "Dirk Krause's tools", "dk-send", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-t2db.rc", "Dirk Krause", "dkicon.ico", "Convert text to simple text database", $version, "Dirk Krause's tools", "dk-t2db", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-db2t.rc", "Dirk Krause", "dkicon.ico", "Write simple text database to standard output", $version, "Dirk Krause's tools", "dk-db2t", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-dbco.rc", "Dirk Krause", "dkicon.ico", "Copy and convert simple databases", $version, "Dirk Krause's tools", "dk-dbco", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-pwd.rc", "Dirk Krause", "dkicon.ico", "Show current working directory", $version, "Dirk Krause's tools", "dk-pwd", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk4info.rc", "Dirk Krause", "dkicon.ico", "Show setup information", $version, "Dirk Krause's tools", "dk4info", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dkct.rc", "Dirk Krause", "dkicon.ico", "Dirk Krause's C tool", $version, "Dirk Krause's tools", "dkct", "0,0,0,1", "0,0,0,1" ); create_rc_file( "addctrld.rc", "Dirk Krause", "dkicon.ico", "Ensure final Ctrl-D", $version, "Dirk Krause's tools", "addctrld", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dkdbt.rc", "Dirk Krause", "dkicon.ico", "Database tool", $version, "Dirk Krause's tools", "dkdbt", "0,0,0,1", "0,0,0,1" ); create_rc_file( "wxd2lat.rc", "Dirk Krause", "wxdkdraw.ico", "Wxdkdraw to LaTeX converter", $version, "Dirk Krause's tools", "wxd2lat", "0,0,0,1", "0,0,0,1" ); create_rc_file( "bmpp.rc", "Dirk Krause", "dkicon.ico", "Bitmap to PDF/(E)PS converter", $version, "Dirk Krause's tools", "bmpp", "0,0,0,1", "0,0,0,1" ); create_rc_file( "fig2lat.rc", "Dirk Krause", "dkicon.ico", "Fig to LaTeX converter", $version, "Dirk Krause's tools", "fig2lat", "0,0,0,1", "0,0,0,1" ); create_rc_file( "htmlbook.rc", "Dirk Krause", "dkicon.ico", "Publish book-like HTML", $version, "Dirk Krause's tools", "htmlbook", "0,0,0,1", "0,0,0,1" ); create_rc_file( "plpdftex.rc", "Dirk Krause", "dkicon.ico", "Output driver for octpgfpl", $version, "Dirk Krause's tools", "plpdftex", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dkwxwiz.rc", "Dirk Krause", "dkicon.ico", "Project wizard", $version, "Dirk Krause's tools", "dkwxwiz", "0,0,0,1", "0,0,0,1" ); create_rc_file( "wxdkct.rc", "Dirk Krause", "dkicon.ico", "Dirk Krause's C tool (GUI)", $version, "Dirk Krause's tools", "wxdkct", "0,0,0,1", "0,0,0,1" ); create_rc_file( "wxdkdraw.rc", "Dirk Krause", "wxdkdraw.ico", "Drawing application for use with LaTeX", $version, "Dirk Krause's tools", "wxdkdraw", "0,0,0,1", "0,0,0,1" ); create_rc_file( "wxbmpp.rc", "Dirk Krause", "dkicon.ico", "Bitmap to PDF/(E)PS converter (GUI)", $version, "Dirk Krause's tools", "wxbmpp", "0,0,0,1", "0,0,0,1" ); create_rc_file( "wxpqdic.rc", "Dirk Krause", "dkicon.ico", "Printqdi client (GUI)", $version, "Dirk Krause's tools", "wxpqdic", "0,0,0,1", "0,0,0,1" ); create_rc_file( "wximgsz.rc", "Dirk Krause", "dkicon.ico", "Image rescale calculator (GUI)", $version, "Dirk Krause's tools", "wximgsz", "0,0,0,1", "0,0,0,1" ); create_rc_file( "wxdkclock.rc", "Dirk Krause", "dkicon.ico", "Simple clock with one alert (GUI)", $version, "Dirk Krause's tools", "wxdkclock", "0,0,0,1", "0,0,0,1" ); create_rc_file( "wxdkhtb.rc", "Dirk Krause", "dkicon.ico", "HTB help file viewer (GUI)", $version, "Dirk Krause's tools", "wxdkhtb", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk-bin2c.rc", "Dirk Krause", "dkicon.ico", "Binary data to C source converter", $version, "Dirk Krause's tools", "dk-bin2c", "0,0,0,1", "0,0,0,1" ); create_rc_file( "lprngcl.rc", "Dirk Krause", "dkicon.ico", "LPRng print queue cleaner", $version, "Dirk Krause's tools", "lprngcl", "0,0,0,1", "0,0,0,1" ); create_rc_file( "itadmin.rc", "Dirk Krause", "dkicon.ico", "IT management using a MySQL DB", $version, "Dirk Krause's tools", "itadmin", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dk3info.rc", "Dirk Krause", "dkicon.ico", "Show setup information", $version, "Dirk Krause's tools", "dk3info", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dkwt.rc", "Dirk Krause", "dkicon.ico", "Dirk Krause's Windows tool", $version, "Dirk Krause's tools", "dkwt", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dkwtadm.rc", "Dirk Krause", "dkicon.ico", "Dirk Krause's Windows adm tool", $version, "Dirk Krause's tools", "dkwtadm", "0,0,0,1", "0,0,0,1" ); create_rc_file( "wprclean.rc", "Dirk Krause", "dkicon.ico", "Clean Windows print queue", $version, "Dirk Krause's tools", "wprclean", "0,0,0,1", "0,0,0,1" ); create_rc_file( "winprint.rc", "Dirk Krause", "dkicon.ico", "Schedule file to Windows print queue", $version, "Dirk Krause's tools", "winprint", "0,0,0,1", "0,0,0,1" ); create_rc_file( "dkwxpath.rc", "Dirk Krause", "dkctinst.ico", "Path setup during installation", $version, "Dirk Krause's tools", "dkwxpath", "0,0,0,1", "0,0,0,1" ); create_rc_file( "wxdkfcs.rc", "Dirk Krause", "dkicon.ico", "Checksum builder with GUI", $version, "Dirk Krause's tools", "wxdkfcs", "0,0,0,1", "0,0,0,1" ); create_rc_file( "wxdkscrsz.rc", "Dirk Krause", "wxdkscrsz.ico", "Change Screen Size", $version, "Dirk Krause's tools", "ChangeScreenSize", "0,0,0,1", "0,0,0,1" );