]> git.street.me.uk Git - andy/viking.git/blame - win32/README.txt
SF Bugs#146: Fix showing elevation gain/loss in track properties.
[andy/viking.git] / win32 / README.txt
CommitLineData
ba3695b5 1# License: CC0\r
0edf62b8
RN
2\r
3# Cross Build #\r
4\r
5## Using OpenSUSE Tumbleweed in a VM ##\r
6\r
7### Host Preparation ###\r
8\r
9On 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
13Generate help PDF\r
14 dblatex help/C/viking.xml\r
15This 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
b0678771 19In the guest ensure availability of build dependent mingw32 / mingw64 packages (not in standard Tumbleweed repo ATM)\r
0edf62b8
RN
20 # As root\r
21 zypper ar -f http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Tumbleweed windows\r
b0678771 22 zypper ar -f http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_Tumbleweed windows64\r
0edf62b8 23 zypper ar -f http://download.opensuse.org/repositories/home:/ecsos/openSUSE_Tumbleweed windows-extra-ecsos\r
b0678771 24 zypper ar -f http://download.opensuse.org/repositories/home:/ecsos:/pipelight/openSUSE_Tumbleweed windows-extra-ecsos2\r
0edf62b8
RN
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
29Install 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
33For the MSI generation you will need\r
34 zypper install mingw32-cross-nsis\r
35\r
36And ensure FindProcDLL is available for NSIS\r
37if [ ! -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
40fi\r
41\r
42Make code accessible via a shared folder\r
43So add a suitable Shared Folder to the virtual machine\r
44Remember 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
50Go to the code location\r
51 cd /media/sf_Code/viking\r
52\r
53Copy 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
58Now perform the build\r
59 rpmbuild -ba mingw-viking.spec\r
60\r
61Install locally\r
b0678771 62 sudo rpm -i /home/build/rpmbuild/RPMS/noarch/ming*-viking-*.noarch.rpm\r
0edf62b8
RN
63\r
64Generate .msi\r
65 cd win32\r
66 ./installer-mingw.sh\r
67\r
68Install .msi\r
c5a23c55 69 wine installer/viking-*.exe\r
0edf62b8
RN
70\r
71Run 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
26edf476
RN
79The 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
85There is a separate installer method using NSIS to generate the viking-1.X.Y.Z.exe installer file.\r
86\r
87To generate the installer (once the code has been compiled as above) run the installer.bat\r
88\r
89For further details (especially about how to set up the development dependencies) see:\r
90http://sourceforge.net/apps/mediawiki/viking/index.php?title=WindowsBuildInstructions\r
b1a8def8
RN
91\r
92These instructions have now been turned turned into a series of scripts to produce the Viking installer:\r
93\r
941. prepare.bat\r
952a. configure_and_make.bat\r
962b. make.bat\r
973. installer.bat\r
98\r
99The scripts are aimed at a pristine Windows XP installation.\r
100Using *prepare.bat* will attempt to *download* and *install* various Open Source software to aid this process.\r
101An administrator level account is needed to run this which will *modify* your system.\r
102\r
103The other scripts simply make use of these (assumed) available system programs.\r
104\r
105This setup is for dedicated usage to build Viking, primarily under Wine with:\r
106\r
107 ./generate_install.sh\r
108\r
109Such 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
0edf62b8
RN
111From 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
113Notionally the standard configure + make stages should still work, but the Cross build is now the supported method.\r
114Thus the prepare + installer scripts are no longer maintained and are for reference only.\r