]> git.street.me.uk Git - andy/viking.git/blob - win32/README.txt
Add YOURS online routing.
[andy/viking.git] / win32 / README.txt
1 # License: CC0\r
2 \r
3 # Cross Build #\r
4 \r
5 ## Using OpenSUSE Tumbleweed in a VM ##\r
6 \r
7 ### Host Preparation ###\r
8 \r
9 On the host need to ensure the viking-1.X.tar.gz file is available:\r
10         cd code/viking\r
11         make dist\r
12 \r
13 Generate help PDF\r
14         dblatex help/C/viking.xml\r
15 This could be done in the VM but installing dblatex requires ~650Mb install (so a waste if already available on the host).\r
16 \r
17 ### Guest Preparation (root) ###\r
18 \r
19 In the guest ensure availability of build dependent mingw32 / mingw64 packages (not in standard Tumbleweed repo ATM)\r
20         # As root\r
21         zypper ar -f http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Tumbleweed windows\r
22         zypper ar -f http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_Tumbleweed windows64\r
23         zypper ar -f http://download.opensuse.org/repositories/home:/ecsos/openSUSE_Tumbleweed windows-extra-ecsos\r
24         zypper ar -f http://download.opensuse.org/repositories/home:/ecsos:/pipelight/openSUSE_Tumbleweed windows-extra-ecsos2\r
25         # Ensure a standard user account is available for the build e.g:\r
26         #useradd -m build\r
27         #passwd build\r
28 \r
29 Install build packages as listed in the .spec file or when running the rpmbuild it will tell you what packages are required\r
30         zypper install mingw32-cross-gcc\r
31         #etc...\r
32 \r
33 For the MSI generation you will need\r
34         zypper install mingw32-cross-nsis\r
35 \r
36 And ensure FindProcDLL is available for NSIS\r
37 if [ ! -e /usr/share/nsis/Plugins/FindProcDLL.dll ];\r
38         wget http://nsis.sourceforge.net/mediawiki/images/3/3c/FindProc.zip\r
39         unzip FindProc.zip FindProcDLL.dll -d /usr/share/nsis/Plugins/\r
40 fi\r
41 \r
42 Make code accessible via a shared folder\r
43 So add a suitable Shared Folder to the virtual machine\r
44 Remember the build user will need mount access priviledges - if using VirtualBox then:\r
45         #As root\r
46         #usermod -a -G vboxsf <builduser>\r
47 \r
48 ### Guest Preparation (builduser) ###\r
49 \r
50 Go to the code location\r
51         cd /media/sf_Code/viking\r
52 \r
53 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
54         ln -s /media/sf_Code/viking/viking-1.6.1.tar.gz /home/build/rpmbuild/SOURCES/viking-1.6.1.tar.gz\r
55 \r
56 ### Build / Install / Run on Guest ###\r
57 \r
58 Now perform the build\r
59         rpmbuild -ba mingw-viking.spec\r
60 \r
61 Install locally\r
62         sudo rpm -i /home/build/rpmbuild/RPMS/noarch/ming*-viking-*.noarch.rpm\r
63 \r
64 Generate .msi\r
65         cd win32\r
66         ./installer-mingw.sh\r
67 \r
68 Install .msi\r
69         wine installer/viking-*.exe\r
70 \r
71 Run viking.exe with wine\r
72         cd ~/.wine/drive_c/Program\ Files/Viking/\r
73         wine viking.exe\r
74 \r
75 #########################################################################\r
76 \r
77 # Native Build #\r
78 \r
79 The build under Windows follows the same process as the traditional Linux build:\r
80 \r
81     cd ../src\r
82     sh configure <options>\r
83     make\r
84 \r
85 There is a separate installer method using NSIS to generate the viking-1.X.Y.Z.exe installer file.\r
86 \r
87 To generate the installer (once the code has been compiled as above) run the installer.bat\r
88 \r
89 For further details (especially about how to set up the development dependencies) see:\r
90 http://sourceforge.net/apps/mediawiki/viking/index.php?title=WindowsBuildInstructions\r
91 \r
92 These instructions have now been turned turned into a series of scripts to produce the Viking installer:\r
93 \r
94 1. prepare.bat\r
95 2a. configure_and_make.bat\r
96 2b. make.bat\r
97 3. installer.bat\r
98 \r
99 The scripts are aimed at a pristine Windows XP installation.\r
100 Using *prepare.bat* will attempt to *download* and *install* various Open Source software to aid this process.\r
101 An administrator level account is needed to run this which will *modify* your system.\r
102 \r
103 The other scripts simply make use of these (assumed) available system programs.\r
104 \r
105 This setup is for dedicated usage to build Viking, primarily under Wine with:\r
106 \r
107  ./generate_install.sh\r
108 \r
109 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
110 \r
111 From Viking 1.4 to 1.6.X this was how the Windows viking-W.X.Y.Z.exe installer file was produced.\r
112 \r
113 Notionally the standard configure + make stages should still work, but the Cross build is now the supported method.\r
114 Thus the prepare + installer scripts are no longer maintained and are for reference only.\r