summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2021-11-03 13:42:37 +0000
committerNick White <git@njw.name>2021-11-03 13:42:37 +0000
commit16e4a02c794d61137b2f175e958d274eb464656b (patch)
treeaed704ad366e466c12168651f86e3260dd79a012
parentba689997defb7be6c912934fe81d97465603415e (diff)
Simplify windows build instructions and package up all windows dependencies into a tarball
-rw-r--r--BUILDING29
-rw-r--r--Makefile6
-rw-r--r--config.mk5
3 files changed, 21 insertions, 19 deletions
diff --git a/BUILDING b/BUILDING
index 95019d9..9932d30 100644
--- a/BUILDING
+++ b/BUILDING
@@ -1,21 +1,22 @@
To cross compile for Windows, the following needs to be done:
-1) Uncomment the lines under "mingw" in config.mk, and comment any earlier CC & LDFLAGS lines.
+1) Download the needed build dependencies from
+ https://njw.name/getxbook/win-build-deps.20211103.tar.xz
+ and unpack them into the getxbook directory
-2) Compile a copy of openssl for mingw.
- Download OpenSSL from openssl.org, then run:
+2) Uncomment all lines under 'mingw' in config.mk
+
+Then 'make' and 'make dist-win' should all work as expected
+
+---
+
+# More information about the necessary files for Windows builds
+
+OpenSSL is needed to link the windows builds to, as mingw doesn't include it. This needs to be cross compiled with mingw by running the following from an OpenSSL source directory:
./Configure mingw --cross-compile-prefix=i686-w64-mingw32-
make
-3) Set the OPENSSLDIR variable in config.mk to match where you compiled openssl
-
-4: Set up tcl Starkit prerequisites:
- Download tclkit from http://tclkits.rkeene.org/fossil/wiki/Downloads
- Download sdx from https://chiselapp.com/user/aspect/repository/sdx/index
- Create a shell script called sdx and put it in your path, containing something like this:
- #!/bin/sh
- d="$HOME/src/getxbook"
- "$d/tclkit-8.6.3-rhel5-x86_64" "$d/sdx-20110317.kit" "$@"
- Download a windows tclkit including tk from http://tclkits.rkeene.org/fossil/wiki/Downloads and ensure the adjust W32TCLKIT to the appropriate filename in config.mk if needed
+Tclkit and SDX are used to create a self contained executable with the GUI and all needed tools. Unfortunately these days working builds are difficult to find. Two different versions of Tclkit are required: a native one, to get the SDX packer to work, and a Windows version including Tk, to package into the final executable.
+ Both Tclkits can be downloaded from: http://tclkits.rkeene.org/fossil/wiki/Downloads
+ sdx can be downloaded from: https://chiselapp.com/user/aspect/repository/sdx/index
-Then 'make' and 'make dist-win' should all work as expected
diff --git a/Makefile b/Makefile
index 90d1241..c659ba6 100644
--- a/Makefile
+++ b/Makefile
@@ -89,11 +89,11 @@ getxbookgui.exe: getxbookgui.tcl
echo STARPACK $@
sed 's/ icons/ .. icons/' < getxbookgui.tcl > getxbookgui-win.tcl
sed -i '/^\tset cmd / i set cmdbin [file join tools $$cmdbin]' getxbookgui-win.tcl
- sdx qwrap getxbookgui-win.tcl getxbookgui
- sdx unwrap getxbookgui.kit
+ $(SDX) qwrap getxbookgui-win.tcl getxbookgui
+ $(SDX) unwrap getxbookgui.kit
cp -f getxbook.ico getxbookgui.vfs/tclkit.ico
echo 'FileDescription "Book downloader"' > getxbookgui.vfs/tclkit.inf
- sdx wrap $@ -runtime $(W32TCLKIT)
+ $(SDX) wrap $@ -runtime $(W32TCLKIT)
rm -r getxbookgui-win.tcl getxbookgui.kit getxbookgui.vfs
# needs config.mk set up to use mingw
diff --git a/config.mk b/config.mk
index e9505e9..3012d1f 100644
--- a/config.mk
+++ b/config.mk
@@ -20,8 +20,9 @@ LDFLAGS = $(LIBS)
#LDFLAGS = $(LIBS) -static #-s
# mingw
-#W32TCLKIT = tclkit-gui-8_6_11-twapi-4_5_2-x86-max.exe
-#OPENSSLDIR = $(HOME)/tmp/openssl-1.1.1l
+#W32TCLKIT = win-build-deps/tclkit-gui-8_6_11-twapi-4_5_2-x86-max.exe
+#OPENSSLDIR = win-build-deps/openssl-1.1.1l
+#SDX = ./win-build-deps/sdx
#CC = i686-w64-mingw32-gcc
#AR = i686-w64-mingw32-ar
#CFLAGS = -ansi -Wall -DVERSION=\"$(VERSION)\" -DWINVER=0x0501 -I$(OPENSSLDIR)/include