Skip to content

Commit d285b29

Browse files
committed
fix: Add missing Makefile
Cleanup ca.dll ressource files
1 parent e6a4eb3 commit d285b29

File tree

3 files changed

+46
-5
lines changed

3 files changed

+46
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
# DLL versioning to be defined on gmake commandline
3+
MAJOR = 0
4+
MINOR = 0
5+
REV = 0
6+
7+
SHAREDLIB = ca.dll
8+
9+
PREFIX =
10+
CC = $(PREFIX)gcc
11+
CFLAGS = -O3 -Wall -D__STRSAFE__NO_INLINE
12+
13+
LD = $(CC)
14+
LDFLAGS = -static -Wl,--subsystem,windows -lmsi -lstdc++
15+
16+
RC = $(PREFIX)windres
17+
RCFLAGS = --define MAJOR=$(MAJOR) --define MINOR=$(MINOR) --define REVISION=$(REV)
18+
19+
STRIP = $(PREFIX)strip
20+
21+
RM = rm -f
22+
23+
OBJS = dllmain.o log.o customaction.o
24+
25+
all: $(SHAREDLIB)
26+
27+
$(SHAREDLIB): dll/ca.def $(OBJS) ca.rc.o
28+
$(LD) -shared -o $@ dll/ca.def $(OBJS) ca.rc.o $(LDFLAGS)
29+
$(STRIP) $@
30+
31+
ca.rc.o: dll/ca.rc dll/$(SHAREDLIB).manifest
32+
$(RC) $(RCFLAGS) -o $@ dll/ca.rc
33+
34+
$(OBJS): %.o:dll/%.cpp dll/customaction.h
35+
$(CC) $(CFLAGS) -c -o $@ $<
36+
37+
.PHONY: clean
38+
39+
clean:
40+
-$(RM) $(SHAREDLIB)
41+
-$(RM) *.o

contrib/windows/packaging/tools/ca/dll/ca.dll.manifest.tt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3-
<assemblyIdentity name="ca" version="[%MAJOR%].[%MINOR%].[%REV%].0" processorArchitecture="amd64" type="win32"/>
4-
<description>GLPI Agent [%VERSION%] Custom Actions</description>
2+
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3+
<assemblyIdentity name="ca" version="[%MAJOR%].[%MINOR%].[%REV%].0" processorArchitecture="amd64" type="win32"/>
4+
<description>GLPI Agent [%VERSION%] Custom Actions</description>
55
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
66
<security>
77
<requestedPrivileges>

contrib/windows/packaging/tools/ca/dll/ca.rc

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
#endif
1414

1515
#if !REVISION
16-
#define VER_VERSIONINFO_STR xstr(MAJOR.MINOR)
16+
#define VER_VERSIONINFO_STR xstr(MAJOR.MINOR)
1717
#else
18-
#define VER_VERSIONINFO_STR xstr(MAJOR.MINOR.REVISION)
18+
#define VER_VERSIONINFO_STR xstr(MAJOR.MINOR.REVISION)
1919
#endif
2020
#define VER_FILE_VERSION MAJOR,MINOR,REVISION,0
2121

0 commit comments

Comments
 (0)