]> git.street.me.uk Git - andy/viking.git/blobdiff - win32/README.txt
Merge pull request #14 from apre/master
[andy/viking.git] / win32 / README.txt
index 542aa59189781a8d75d9e0e4f71e7050bf3d22be..0bb03cfa263b1575f097efd48afe6bb38bc6f8c9 100644 (file)
@@ -1,3 +1,80 @@
+# License: CC0\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 / mingw64 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/windows:/mingw:/win64/openSUSE_Tumbleweed windows64\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-ecsos2\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
+       sudo rpm -i /home/build/rpmbuild/RPMS/noarch/ming*-viking-*.noarch.rpm\r
+\r
+Generate .msi\r
+       cd win32\r
+       ./installer-mingw.sh\r
+\r
+Install .msi\r
+       wine installer/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
@@ -11,3 +88,27 @@ To generate the installer (once the code has been compiled as above) run the ins
 \r
 For further details (especially about how to set up the development dependencies) see:\r
 http://sourceforge.net/apps/mediawiki/viking/index.php?title=WindowsBuildInstructions\r
+\r
+These instructions have now been turned turned into a series of scripts to produce the Viking installer:\r
+\r
+1. prepare.bat\r
+2a. configure_and_make.bat\r
+2b. make.bat\r
+3. installer.bat\r
+\r
+The scripts are aimed at a pristine Windows XP installation.\r
+Using *prepare.bat* will attempt to *download* and *install* various Open Source software to aid this process.\r
+An administrator level account is needed to run this which will *modify* your system.\r
+\r
+The other scripts simply make use of these (assumed) available system programs.\r
+\r
+This setup is for dedicated usage to build Viking, primarily under Wine with:\r
+\r
+ ./generate_install.sh\r
+\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 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