[go: up one dir, main page]

Menu

Tree [1f9cef] viking-1.10 / windows /
 History

HTTPS access


File Date Author Commit
 installer 2021-11-27 Rob Norris Rob Norris [1f9cef] Releasing Viking 1.10
 .gitignore 2016-08-07 Rob Norris Rob Norris [a230cf] Rename directory win32 -> windows as it now 64b...
 Makefile.am 2016-08-07 Rob Norris Rob Norris [a230cf] Rename directory win32 -> windows as it now 64b...
 README.txt 2020-11-14 Rob Norris Rob Norris [1850e6] SF Bugs#149: [WINDOWS] Updated build
 configure_and_make-wine.sh 2016-08-07 Rob Norris Rob Norris [a230cf] Rename directory win32 -> windows as it now 64b...
 configure_and_make.bat 2016-08-07 Rob Norris Rob Norris [a230cf] Rename directory win32 -> windows as it now 64b...
 generate_install.sh 2016-08-07 Rob Norris Rob Norris [a230cf] Rename directory win32 -> windows as it now 64b...
 installer-mingw.sh 2021-11-27 Rob Norris Rob Norris [8aa0da] Windows build: handle multiple digits in build ...
 installer-wine.sh 2016-08-07 Rob Norris Rob Norris [a230cf] Rename directory win32 -> windows as it now 64b...
 installer.bat 2016-08-07 Rob Norris Rob Norris [a230cf] Rename directory win32 -> windows as it now 64b...
 make-wine.sh 2016-08-07 Rob Norris Rob Norris [a230cf] Rename directory win32 -> windows as it now 64b...
 make.bat 2016-08-07 Rob Norris Rob Norris [a230cf] Rename directory win32 -> windows as it now 64b...
 msys-pi-wine.sh 2016-08-07 Rob Norris Rob Norris [a230cf] Rename directory win32 -> windows as it now 64b...
 msys-pi.bat 2016-08-07 Rob Norris Rob Norris [a230cf] Rename directory win32 -> windows as it now 64b...
 msys-pi.sh 2016-08-07 Rob Norris Rob Norris [a230cf] Rename directory win32 -> windows as it now 64b...
 prepare.bat 2016-08-07 Rob Norris Rob Norris [a230cf] Rename directory win32 -> windows as it now 64b...

Read Me

# License: CC0

# Cross Build #

## Using OpenSUSE Tumbleweed in a VM ##

This is for 32 bit version, but very similar for 64 version.
Just use mingw64-viking.spec file instead, install the appropriate 64bit dependencies and it produce a viking-win64-*.exe file.

### Host Preparation ###

On the host need to ensure the viking-1.X.tar.gz file is available:
	cd code/viking
	make dist

Generate help PDF
	dblatex help/C/index.docbook -o viking.pdf
This could be done in the VM but installing dblatex requires ~650Mb install (so a waste if already available on the host).

### Guest Preparation (root) ###

In the guest ensure availability of build dependent mingw32 / mingw64 packages (not in standard Tumbleweed repo ATM)
	# As root
	zypper ar -f http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Tumbleweed windows
	zypper ar -f http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_Tumbleweed windows64
	# Ensure a standard user account is available for the build e.g:
	#useradd -m build
	#passwd build

Install build packages as listed in the .spec file or when running the rpmbuild it will tell you what packages are required
	zypper install mingw32-cross-gcc
	#etc...

For the MSI generation you will need
	zypper install mingw32-cross-nsis

And ensure FindProcDLL is available for NSIS
if [ ! -e /usr/share/nsis/Plugins/FindProcDLL.dll ];
	wget http://nsis.sourceforge.net/mediawiki/images/3/3c/FindProc.zip
	unzip FindProc.zip FindProcDLL.dll -d /usr/share/nsis/Plugins/
fi

Make code accessible via a shared folder
So add a suitable Shared Folder to the virtual machine
Remember the build user will need mount access priviledges - if using VirtualBox then:
	##As root: Enable shared folder - often needing to run guest additions (insert/add disk .iso image)
	#zypper install kernel-source kernel-syms
	#mount /dev/cdrom /media/cdrom
	#cd /media/cdrom/
	#./VBoxLinuxAdditions.run
	## Allow access
	#usermod -a -G vboxsf <builduser>

### Guest Preparation (builduser) ###

Go to the code location
	cd /media/sf_Code/viking

Copy source package as generated by make dist on the host to the package build area, or even just link to it e.g.:
	ln -s /media/sf_Code/viking/viking-1.6.1.tar.gz /home/build/rpmbuild/SOURCES/viking-1.6.1.tar.gz

### Build on Guest ###

Now perform the build (32bit):
	rpmbuild -ba mingw-viking.spec
# or for the 64bit build:
#   rpmbuild -ba mingw64-viking.spec

Install locally
	sudo rpm -i /home/build/rpmbuild/RPMS/noarch/ming*-viking-*.noarch.rpm

Generate .msi
	cd windows
	./installer-mingw.sh
	cd -

### Install + Run on Host (or guest) ###
Install the appropriate 64bit or 32bit executable:
	wine windows/installer/viking-win64-*.exe

Run viking.exe with wine
	cd ~/.wine/drive_c/Program\ Files/Viking/
	wine viking.exe

#########################################################################

# Native Build #

The build under Windows follows the same process as the traditional Linux build:

    cd ../src
    sh configure <options>
    make

There is a separate installer method using NSIS to generate the viking-1.X.Y.Z.exe installer file.

To generate the installer (once the code has been compiled as above) run the installer.bat

For further details (especially about how to set up the development dependencies) see:
http://sourceforge.net/apps/mediawiki/viking/index.php?title=WindowsBuildInstructions

These instructions have now been turned turned into a series of scripts to produce the Viking installer:

1. prepare.bat
2a. configure_and_make.bat
2b. make.bat
3. installer.bat

The scripts are aimed at a pristine Windows XP installation.
Using *prepare.bat* will attempt to *download* and *install* various Open Source software to aid this process.
An administrator level account is needed to run this which will *modify* your system.

The other scripts simply make use of these (assumed) available system programs.

This setup is for dedicated usage to build Viking, primarily under Wine with:

 ./generate_install.sh

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.

From Viking 1.4 to 1.6.X this was how the Windows viking-W.X.Y.Z.exe installer file was produced.

Notionally the standard configure + make stages should still work, but the Cross build is now the supported method.
Thus the prepare + installer scripts are no longer maintained and are for reference only.