summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2000-08-16 13:23:37 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2000-08-16 13:23:37 +0000
commitc0ab630768a09d54d15d2f4af026049fe46f3b90 (patch)
tree62d71e5765177fd5d260225f8548bad466919e3f
parent505a3e3a30cf660f6b1d719915444a590b7a7ed2 (diff)
downloadzsh-c0ab630768a09d54d15d2f4af026049fe46f3b90.tar.gz
zsh-c0ab630768a09d54d15d2f4af026049fe46f3b90.tar.xz
zsh-c0ab630768a09d54d15d2f4af026049fe46f3b90.zip
pws/Andrej: 12594, 12661: Windows resources and icon
-rw-r--r--ChangeLog4
-rw-r--r--Src/Makefile.in9
-rw-r--r--Src/zsh.icobin0 -> 766 bytes
-rw-r--r--Src/zsh.rc8
-rw-r--r--configure.in5
5 files changed, 24 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4176a6394..eb80cc0fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2000-08-16  Peter Stephenson  <pws@csr.com>
 
+	* pws/Andrej: 12594, 12661: Src/zsh.rc, Src/zsh.ico, Src/Makefile.in,
+	configure.in: basic support for Windows resources including icon,
+	will be built in for cygwin.
+
 	* Andrej: 12658: .cvsignore, Src/.cvsignore: cscope ignorance.
 
 2000-08-16  Sven Wischnowsky  <wischnow@zsh.org>
diff --git a/Src/Makefile.in b/Src/Makefile.in
index 7ddddeb9b..440254005 100644
--- a/Src/Makefile.in
+++ b/Src/Makefile.in
@@ -78,14 +78,19 @@ NNTRYOBJ   =
 LDRUNPATH = LD_RUN_PATH=$(libdir)/$(tzsh)
 NDRUNPATH =
 
-zsh$(EXEEXT): $(@L@IBZSH) $(@L@STMP) $(MAIN_OBJS) zsh.export
+EXTRAZSHOBJS = @EXTRAZSHOBJS@
+
+zsh$(EXEEXT): $(@L@IBZSH) $(@L@STMP) $(MAIN_OBJS) zsh.export $(EXTRAZSHOBJS)
 	rm -f $@
-	$(@L@DRUNPATH) $(LINK) $(MAIN_OBJS) $(@L@LIST) $(ZSH_@E@XPORT) $(@L@IBZSH) $(LIBS)
+	$(@L@DRUNPATH) $(LINK) $(MAIN_OBJS) $(EXTRAZSHOBJS) $(@L@LIST) $(ZSH_@E@XPORT) $(@L@IBZSH) $(LIBS)
 
 $(LIBZSH): $(LIBOBJS) $(NSTMP)
 	rm -f $@
 	$(DLLINK) $(LIBOBJS) $(NLIST) $(LIBS)
 
+zsh.res.o: $(sdir)/zsh.rc $(sdir)/zsh.ico
+	windres -O coff --include-dir $(sdir) -i $(sdir)/zsh.rc -o zsh.res.o
+
 stamp-modobjs: modobjs
 	@if cmp -s stamp-modobjs.tmp stamp-modobjs; then \
 	    rm -f stamp-modobjs.tmp; \
diff --git a/Src/zsh.ico b/Src/zsh.ico
new file mode 100644
index 000000000..64d822211
--- /dev/null
+++ b/Src/zsh.ico
Binary files differdiff --git a/Src/zsh.rc b/Src/zsh.rc
new file mode 100644
index 000000000..93c82ba1f
--- /dev/null
+++ b/Src/zsh.rc
@@ -0,0 +1,8 @@
+// Use this file as follows
+//
+// myapp.exe : myapp.o myapp.res
+// 	   gcc -mwindows myapp.o myapp.res -o $@
+// 
+// myapp.res : myapp.rc resource.h
+// 	   windres $< -O coff -o $@
+IDR_MAINFRAME           ICON    DISCARDABLE     "zsh.ico"
diff --git a/configure.in b/configure.in
index 6355655cc..4e93e340d 100644
--- a/configure.in
+++ b/configure.in
@@ -1693,6 +1693,10 @@ fi
 AC_SUBST(INSTLIB)dnl
 AC_SUBST(UNINSTLIB)dnl
 
+if test x"$ac_cv_cygwin" = xyes; then
+  EXTRAZSHOBJS="$EXTRAZSHOBJS zsh.res.o"
+fi
+
 AC_DEFINE_UNQUOTED(DL_EXT, "$DL_EXT")dnl
 AC_SUBST(D)dnl
 AC_SUBST(DL_EXT)dnl
@@ -1708,6 +1712,7 @@ AC_SUBST(LINKMODS)dnl
 AC_SUBST(MOD_EXPORT)dnl
 AC_SUBST(MOD_IMPORT_VARIABLE)dnl
 AC_SUBST(MOD_IMPORT_FUNCTION)dnl
+AC_SUBST(EXTRAZSHOBJS)dnl
 
 CLEAN_MK="${srcdir}/Config/clean.mk"
 CONFIG_MK="${srcdir}/Config/config.mk"