Skip to content

Commit 81b58f7

Browse files
committed
simplify custom builds
1 parent 8f30bf2 commit 81b58f7

File tree

3 files changed

+30
-16
lines changed

3 files changed

+30
-16
lines changed

CMakeLists.txt

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
# required cmake version
22
cmake_minimum_required(VERSION 3.6)
33

4-
# set the project name and version
5-
project(osslsigncode VERSION 2.4 LANGUAGES C)
4+
# configure basic project information
5+
project(osslsigncode
6+
VERSION 2.4
7+
DESCRIPTION "OpenSSL based Authenticode signing for PE, CAB, CAT and MSI files"
8+
HOMEPAGE_URL "https://github.com/mtrojnar/osslsigncode"
9+
LANGUAGES C)
10+
11+
# force nonstandard version format for development packages
612
set(DEV "-dev")
713
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}${DEV}")
14+
15+
# version and contact information
816
set(PACKAGE_STRING "${PROJECT_NAME} ${PROJECT_VERSION}")
917
set(PACKAGE_BUGREPORT "Michal.Trojnara@stunnel.org")
10-
set(PACKAGE_URL "https://github.com/mtrojnar/osslsigncode")
11-
set(PACKAGE_DESCRIPTION "OpenSSL based Authenticode signing for PE, CAB, CAT and MSI files")
1218

1319
# specify the C standard
1420
set(CMAKE_C_STANDARD 11)

INSTALL.W32.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
cd osslsigncode-folder
1515
x86_64-w64-mingw32-gcc osslsigncode.c msi.c -o osslsigncode.exe \
1616
-lcrypto -lssl -lcurl \
17-
-D 'PACKAGE_STRING="osslsigncode 2.4"' \
18-
-D 'PACKAGE_BUGREPORT="Michal.Trojnara@stunnel.org"' \
17+
-D 'PACKAGE_STRING="osslsigncode x.y"' \
18+
-D 'PACKAGE_BUGREPORT="Your.Email@example.com"' \
1919
-D ENABLE_CURL
2020
```
2121

@@ -76,8 +76,8 @@
7676
-I 'C:/OpenSSL/include/' \
7777
-L 'C:/curl/lib' -lcurl \
7878
-I 'C:/curl/include' \
79-
-D 'PACKAGE_STRING="osslsigncode 2.4"' \
80-
-D 'PACKAGE_BUGREPORT="Michal.Trojnara@stunnel.org"' \
79+
-D 'PACKAGE_STRING="osslsigncode x.y"' \
80+
-D 'PACKAGE_BUGREPORT="Your.Email@example.com"' \
8181
-D ENABLE_CURL
8282
```
8383

osslsigncode.c

+16-8
Original file line numberDiff line numberDiff line change
@@ -5570,16 +5570,24 @@ static PKCS7 *cat_presign_file(file_type_t type, cmd_type_t cmd, FILE_HEADER *he
55705570

55715571
static void print_version()
55725572
{
5573+
printf("%s, using:\n\t%s (Library: %s)\n\t%s\n",
5574+
#ifdef PACKAGE_STRING
5575+
PACKAGE_STRING,
5576+
#else /* PACKAGE_STRING */
5577+
"osslsigncode custom build",
5578+
#endif /* PACKAGE_STRING */
5579+
OPENSSL_VERSION_TEXT,
5580+
OpenSSL_version(OPENSSL_VERSION),
55735581
#ifdef ENABLE_CURL
5574-
printf(PACKAGE_STRING ", using:\n\t%s (Library: %s)\n\t%s\n",
5575-
OPENSSL_VERSION_TEXT, OpenSSL_version(OPENSSL_VERSION),
5576-
curl_version());
5577-
#else
5578-
printf(PACKAGE_STRING ", using:\n\t%s (Library: %s)\n\t%s\n",
5579-
OPENSSL_VERSION_TEXT, OpenSSL_version(OPENSSL_VERSION),
5580-
"no libcurl available");
5582+
curl_version()
5583+
#else /* ENABLE_CURL */
5584+
"no libcurl available"
55815585
#endif /* ENABLE_CURL */
5582-
printf("\nPlease send bug-reports to " PACKAGE_BUGREPORT "\n\n");
5586+
);
5587+
#ifdef PACKAGE_BUGREPORT
5588+
printf("\nPlease send bug-reports to " PACKAGE_BUGREPORT "\n");
5589+
#endif
5590+
printf("\n");
55835591
}
55845592

55855593
static cmd_type_t get_command(char **argv)

0 commit comments

Comments
 (0)