]> git.street.me.uk Git - andy/viking.git/blobdiff - win32/README.txt
[WINDOWS] Cross build
[andy/viking.git] / win32 / README.txt
index 2fac07fdf6224ab305a66ebd034e1a27bd69efdd..4c2ffb6e409138bd5fc38eba17cd394a41143ce7 100644 (file)
@@ -1,5 +1,80 @@
 # License: CC0\r
-#\r
+\r
+# Cross Build #\r
+\r
+## Using OpenSUSE Tumbleweed in a VM ##\r
+\r
+### Host Preparation ###\r
+\r
+On the host need to ensure the viking-1.X.tar.gz file is available:\r
+       cd code/viking\r
+       make dist\r
+\r
+Generate help PDF\r
+       dblatex help/C/viking.xml\r
+This could be done in the VM but installing dblatex requires ~650Mb install (so a waste if already available on the host).\r
+\r
+### Guest Preparation (root) ###\r
+\r
+In the guest ensure availability of build dependent mingw32 packages (not in standard Tumbleweed repo ATM)\r
+       # As root\r
+       zypper ar -f http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Tumbleweed windows\r
+       zypper ar -f http://download.opensuse.org/repositories/home:/ecsos/openSUSE_Tumbleweed windows-extra-ecsos\r
+       zypper ar -f http://download.opensuse.org/repositories/home:/ecsos:/pipelight/openSUSE_Tumbleweed windows-extra-ecsos\r
+       # Ensure a standard user account is available for the build e.g:\r
+       #useradd -m build\r
+       #passwd build\r
+\r
+Install build packages as listed in the .spec file or when running the rpmbuild it will tell you what packages are required\r
+       zypper install mingw32-cross-gcc\r
+       #etc...\r
+\r
+For the MSI generation you will need\r
+       zypper install mingw32-cross-nsis\r
+\r
+And ensure FindProcDLL is available for NSIS\r
+if [ ! -e /usr/share/nsis/Plugins/FindProcDLL.dll ];\r
+       wget http://nsis.sourceforge.net/mediawiki/images/3/3c/FindProc.zip\r
+       unzip FindProc.zip FindProcDLL.dll -d /usr/share/nsis/Plugins/\r
+fi\r
+\r
+Make code accessible via a shared folder\r
+So add a suitable Shared Folder to the virtual machine\r
+Remember the build user will need mount access priviledges - if using VirtualBox then:\r
+       #As root\r
+       #usermod -a -G vboxsf <builduser>\r
+\r
+### Guest Preparation (builduser) ###\r
+\r
+Go to the code location\r
+       cd /media/sf_Code/viking\r
+\r
+Copy source package as generated by make dist on the host to the package build area, or even just link to it e.g.:\r
+       ln -s /media/sf_Code/viking/viking-1.6.1.tar.gz /home/build/rpmbuild/SOURCES/viking-1.6.1.tar.gz\r
+\r
+### Build / Install / Run on Guest ###\r
+\r
+Now perform the build\r
+       rpmbuild -ba mingw-viking.spec\r
+\r
+Install locally\r
+       rpm -i /home/build/rpmbuild/RPMS/noarch/viking-*.noarch.rpm\r
+\r
+Generate .msi\r
+       cd win32\r
+       ./installer-mingw.sh\r
+\r
+Install .msi\r
+       wine install/viking-*.exe\r
+\r
+Run viking.exe with wine\r
+       cd ~/.wine/drive_c/Program\ Files/Viking/\r
+       wine viking.exe\r
+\r
+#########################################################################\r
+\r
+# Native Build #\r
+\r
 The build under Windows follows the same process as the traditional Linux build:\r
 \r
     cd ../src\r
@@ -32,4 +107,7 @@ This setup is for dedicated usage to build Viking, primarily under Wine with:
 \r
 Such that any Windows system (or of course a Virtual Machine) can be simply deleted (e.g. rm -rf /.wine) and recreated fully via the scripts.\r
 \r
-From Viking 1.4 onwards this is how the Windows viking-W.X.Y.Z.exe installer file is produced.\r
+From Viking 1.4 to 1.6.X this was how the Windows viking-W.X.Y.Z.exe installer file was produced.\r
+\r
+Notionally the standard configure + make stages should still work, but the Cross build is now the supported method.\r
+Thus the prepare + installer scripts are no longer maintained and are for reference only.\r