Skip to contentSkip to conversation

add GRUB_WINDOWS_DLLS to make windowsdir to allow shipping runtime files

PATCH In review Andrey Borzenkov 2 participants 6 messages Jan 18, 2014 – Jan 21, 2014 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add GRUB_WINDOWS_DLLS to make windowsdir to allow shipping runtime files

Not all toolkits provide static libraries. This patch enables creation of self contained distribution that does not require pre-existing runtime libraries. Intended usage is

export GRUB_EXTRA_DLLS="/path/to/liblzma.dll /path/to/libintl.dll" make
make windowszip

As those libraries and locations are dependent on toolchain in use, trying to autodetect them is likely impossible. So just provide a simple way to package everything in one step.

Also remove $(windowsdir) after ZIP was created same as other "make dist" targets.

---
 Makefile.am | 4 ++++
 1 file changed, 4 insertions(+)
Makefile.am +4 -0
index 1bbec0e..649a10b 100644
@@ -420,10 +420,14 @@ windowsdir: $(PROGRAMS) $(starfield_DATA) $(platform_DATA)
 	for x in $(starfield_DATA); do \
 		cp -fp $$x $(windowsdir)/themes/starfield/$$(basename $$x); \
 	done
+	for x in $(GRUB_WINDOWS_DLLS); do \
+		cp -fp $$x $(windowsdir); \
+	done
 
 windowszip=$(top_builddir)/$(PACKAGE)-$(VERSION)-for-windows.zip
 windowszip: windowsdir
 	test -f $(windowszip) && rm $(windowszip) || true
 	zip -r $(windowszip) $(windowsdir)
+	rm -rf $(windowsdir)
 
 EXTRA_DIST += linguas.sh
Signature · 1 line
tg: (5ef569d..) u/mingw/extra_windows_dist (depends on: master)
#1 lore raw
Quoted 3 lines · Andrey Borzenkov

export GRUB_EXTRA_DLLS="/path/to/liblzma.dll /path/to/libintl.dll" make
make windowszip

Perhaps a better name to indicate that you could use it to add any extra files to zip. Perhaps GRUB_WINDOWS_EXTRA_DIST ?

#2 lore raw

В Sun, 19 Jan 2014 02:23:41 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 7 lines · Andrey Borzenkov
Quoted 3 lines

export GRUB_EXTRA_DLLS="/path/to/liblzma.dll /path/to/libintl.dll" make
make windowszip

Perhaps a better name to indicate that you could use it to add any extra files to zip. Perhaps GRUB_WINDOWS_EXTRA_DIST ?

I thought about it, but was not sure - *DIST would imply arbitrary file location inside archive and that becomes far too complicated. But I do not have strong preference.

#3 lore raw
Quoted 7 lines · Andrey Borzenkov

В Sun, 19 Jan 2014 02:23:41 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 4 lines · Andrey Borzenkov
Quoted 3 lines

export GRUB_EXTRA_DLLS="/path/to/liblzma.dll /path/to/libintl.dll" make
make windowszip

Quoted 6 lines
Quoted 3 lines

Perhaps a better name to indicate that you could use it to add any extra files to zip. Perhaps GRUB_WINDOWS_EXTRA_DIST ?

I thought about it, but was not sure - *DIST would imply arbitrary file location inside archive and that becomes far too complicated.

I don't think that just fixing target would be of any issue.

Quoted 10 lines

But I
do not have strong preference.

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#4 lore raw

В Tue, 21 Jan 2014 08:26:04 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 8 lines · Andrey Borzenkov
Quoted 7 lines

В Sun, 19 Jan 2014 02:23:41 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 4 lines · Andrey Borzenkov
Quoted 3 lines

export GRUB_EXTRA_DLLS="/path/to/liblzma.dll /path/to/libintl.dll" make
make windowszip

Quoted 7 lines
Quoted 6 lines
Quoted 3 lines

Perhaps a better name to indicate that you could use it to add any extra files to zip. Perhaps GRUB_WINDOWS_EXTRA_DIST ?

I thought about it, but was not sure - *DIST would imply arbitrary file location inside archive and that becomes far too complicated.

I don't think that just fixing target would be of any issue.

Is it OK?

From: Andrey Borzenkov <[email protected]>
Subject: [PATCH] add GRUB_WINDOWS_EXTRA_DIST to allow shipping runtime files

Not all toolkits provide static libraries. This patch enables creation of self contained distribution that does not require pre-existing runtime libraries. Intended usage is

export GRUB_WINDOWS_EXTRA_DIST="/path/to/liblzma.dll /path/to/libintl.dll" make
make windowszip

As those libraries and locations are dependent on toolchain in use, trying to autodetect them is likely impossible. So just provide a simple way to package everything in one step.

Also remove $(windowsdir) after ZIP was created same as other "make dist" targets.

---
 Makefile.am | 4 ++++
 1 file changed, 4 insertions(+)
Makefile.am +4 -0
index 97c062d..f02ae0a 100644
@@ -420,10 +420,14 @@ windowsdir: $(PROGRAMS) $(starfield_DATA) $(platform_DATA)
 	for x in $(starfield_DATA); do \
 		cp -fp $$x $(windowsdir)/themes/starfield/$$(basename $$x); \
 	done
+	for x in $(GRUB_WINDOWS_EXTRA_DIST); do \
+		cp -fp $$x $(windowsdir); \
+	done
 
 windowszip=$(top_builddir)/$(PACKAGE)-$(VERSION)-for-windows.zip
 windowszip: windowsdir
 	test -f $(windowszip) && rm $(windowszip) || true
 	zip -r $(windowszip) $(windowsdir)
+	rm -rf $(windowsdir)
 
 EXTRA_DIST += linguas.sh
Signature · 1 line
tg: (443b322..) u/mingw/extra_windows_dist (depends on: master)
#5 lore raw

Go ahead.

Quoted 71 lines · Andrey Borzenkov

В Tue, 21 Jan 2014 08:26:04 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 8 lines · Andrey Borzenkov
Quoted 7 lines

В Sun, 19 Jan 2014 02:23:41 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 4 lines · Andrey Borzenkov
Quoted 3 lines

export GRUB_EXTRA_DLLS="/path/to/liblzma.dll /path/to/libintl.dll" make
make windowszip

Quoted 7 lines
Quoted 6 lines
Quoted 3 lines

Perhaps a better name to indicate that you could use it to add any extra files to zip. Perhaps GRUB_WINDOWS_EXTRA_DIST ?

I thought about it, but was not sure - *DIST would imply arbitrary file location inside archive and that becomes far too complicated.

I don't think that just fixing target would be of any issue.

Is it OK?

From: Andrey Borzenkov <[email protected]>
Subject: [PATCH] add GRUB_WINDOWS_EXTRA_DIST to allow shipping runtime files

Not all toolkits provide static libraries. This patch enables creation of self contained distribution that does not require pre-existing runtime libraries. Intended usage is

export GRUB_WINDOWS_EXTRA_DIST="/path/to/liblzma.dll /path/to/libintl.dll" make
make windowszip

As those libraries and locations are dependent on toolchain in use, trying to autodetect them is likely impossible. So just provide a simple way to package everything in one step.

Also remove $(windowsdir) after ZIP was created same as other "make dist" targets.

---
 Makefile.am | 4 ++++
 1 file changed, 4 insertions(+)
Makefile.am +4 -0
index 97c062d..f02ae0a 100644
@@ -420,10 +420,14 @@ windowsdir: $(PROGRAMS) $(starfield_DATA) $(platform_DATA)
 	for x in $(starfield_DATA); do \
 		cp -fp $$x $(windowsdir)/themes/starfield/$$(basename $$x); \
 	done
+	for x in $(GRUB_WINDOWS_EXTRA_DIST); do \
+		cp -fp $$x $(windowsdir); \
+	done
 
 windowszip=$(top_builddir)/$(PACKAGE)-$(VERSION)-for-windows.zip
 windowszip: windowsdir
 	test -f $(windowszip) && rm $(windowszip) || true
 	zip -r $(windowszip) $(windowsdir)
+	rm -rf $(windowsdir)
 
 EXTRA_DIST += linguas.sh

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel