/omf.make
/viking.spec
/mingw-viking.spec
+/mingw64-viking.spec
/xmldocs.make
/test-driver
/compile
ChangeLog.0 \
viking.spec \
mingw-viking.spec \
+ mingw64-viking.spec \
$(INTLTOOL)
.PHONY: generate-changelog
AC_CONFIG_FILES([
viking.spec
mingw-viking.spec
+ mingw64-viking.spec
Makefile
src/Makefile
src/icons/Makefile
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-# Only 32bit ATM
+# 32bit version only in this file. See mingw64-viking.spec for the 64bit version
# Programs to enable the cross build
BuildRequires: mingw32-filesystem
# Currently running makensis in seperate script - so you will need it then
#Requires: mingw32-cross-nsis
-
%description
Viking is a free/open source program to manage GPS data.
You can import, plot and create tracks, routes and waypoints, show OSM and other maps, see real-time GPS position, control items, etc.
Other advanced capabilities include Geotagging Images, generate Maps (using Mapnik), Upload and Download tracks from OSM, Routing from OSRM or Google, Name Searches from OSM Nominatim or Google and more.
It is written in mainly in C with some C++ and uses the GTK+2 toolkit.
-#
-# TODO 64bit version - possibly like this...
-#
-#%package -n mingw64-%{_pkg_name}
-#Summary: %{summary}
-#
-#%description -n mingw64-%{_pkg_name}
-#%{description}
%prep
%setup -q -n %{_pkg_name}-%{version}
--- /dev/null
+# Public Domain CC0
+%{?mingw_package_header}
+%define _pkg_name viking
+Name: mingw64-%{_pkg_name}
+Version: @VERSION@
+Release: 1
+Summary: GPS data editor and analyzer
+Group: Applications/Productivity
+License: GPLv2
+URL: http://sourceforge.net/projects/viking/
+Source0: %{_pkg_name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildArch: noarch
+
+# 64bit version only in this file. See mingw-viking.spec for the 32bit version
+
+# Programs to enable the cross build
+BuildRequires: mingw64-filesystem
+BuildRequires: mingw64-binutils
+BuildRequires: mingw64-runtime
+BuildRequires: mingw64-cross-binutils
+BuildRequires: mingw64-cross-gcc
+BuildRequires: mingw64-cross-pkg-config
+BuildRequires: mingw64-gettext-tools
+BuildRequires: mingw64-gnome-doc-utils-devel
+BuildRequires: intltool
+BuildRequires: gdk-pixbuf-devel
+# ^For gdk-pixbuf-csource
+
+# Code
+# Not worried about versions ATM
+BuildRequires: mingw64-gtk2-devel
+# ATM gtk2-devel auto includes at least devel versions of glib2, gobject, zlib and more
+
+# Mandatory libraries
+BuildRequires: mingw64-libexpat-devel
+BuildRequires: mingw64-libcurl-devel
+# Optional libraries
+BuildRequires: mingw64-libgexiv2-devel
+BuildRequires: mingw64-libbz2-devel
+BuildRequires: mingw64-file-devel
+BuildRequires: mingw64-libmagic1
+BuildRequires: mingw64-libbz2-1
+BuildRequires: mingw64-sqlite-devel
+BuildRequires: mingw64-libzip-devel
+
+# Libs for runtime (and thus also available for the NSIS installer to include the dependencies)
+Requires: mingw64-gtk2
+Requires: mingw64-libexpat1
+Requires: mingw64-libcurl4
+Requires: mingw64-libgexiv2
+Requires: mingw64-libstdc++6
+Requires: mingw64-libsqlite3-0
+Requires: mingw64-libzip4
+# Currently running makensis in seperate script - so you will need it then
+# NB No 64bit version available
+#Requires: mingw32-cross-nsis
+
+%description
+Viking is a free/open source program to manage GPS data.
+You can import, plot and create tracks, routes and waypoints, show OSM and other maps, see real-time GPS position, control items, etc.
+Other advanced capabilities include Geotagging Images, generate Maps (using Mapnik), Upload and Download tracks from OSM, Routing from OSRM or Google, Name Searches from OSM Nominatim or Google and more.
+It is written in mainly in C with some C++ and uses the GTK+2 toolkit.
+
+%prep
+%setup -q -n %{_pkg_name}-%{version}
+
+%build
+# Create Icon
+pushd win32/installer/pixmaps
+%{_mingw64_windres} viking_icon.rc -o viking_icon.o
+popd
+
+#
+# Specifics for Windows build - i.e. no Mapnik & no GPSD
+%{_mingw64_configure}\
+ --disable-realtime-gps-tracking \
+ --disable-mapnik \
+ --disable-scrollkeeper \
+ --enable-windows \
+ CFLAGS="-DWINDOWS -DWIN32 -mwindows"
+# NB not sure if '-DWIN32' is necessary/applicable for a 64bit build...
+
+%{_mingw64_make} %{?_smp_mflags}
+
+%install
+pushd src
+%{_mingw64_strip} -g %{_pkg_name}.exe
+popd
+
+%make_install
+
+%find_lang %{_pkg_name}
+
+%clean
+rm -rf %{buildroot}
+
+%files -f %{_pkg_name}.lang
+%defattr(-,root,root)
+%doc AUTHORS ChangeLog COPYING NEWS README doc/
+%{_mingw64_bindir}/*%{_pkg_name}.exe
+%{_mingw64_datadir}/applications/%{_pkg_name}.desktop
+%{_mingw64_datadir}/%{_pkg_name}
+%{_mingw64_datadir}/icons/hicolor/*/apps/%{_pkg_name}.*
+%exclude %{_mingw64_datadir}/icons/hicolor/icon-theme.cache
+
+%changelog
\r
### Guest Preparation (root) ###\r
\r
-In the guest ensure availability of build dependent mingw32 packages (not in standard Tumbleweed repo ATM)\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-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
rpmbuild -ba mingw-viking.spec\r
\r
Install locally\r
- rpm -i /home/build/rpmbuild/RPMS/noarch/viking-*.noarch.rpm\r
+ sudo rpm -i /home/build/rpmbuild/RPMS/noarch/ming*-viking-*.noarch.rpm\r
\r
Generate .msi\r
cd win32\r
if [ -z "$DESTINATION" ]; then
DESTINATION=installer/bin
fi
+# General clean out tmp copy location so 32v64 versions can't conflict
+if [ -z "$NOCLEAN" ]; then
+ rm -rf installer/bin
+fi
mkdir -p $DESTINATION
if [ -z "$MINGW" ]; then
- MINGW=/usr/i686-w64-mingw32/sys-root/mingw
+ if [ "$HOSTTYPE" == "x86_64" ]; then
+ MINGW=/usr/x86_64-w64-mingw32/sys-root/mingw
+ else
+ MINGW=/usr/i686-w64-mingw32/sys-root/mingw
+ fi
fi
MINGW_BIN=$MINGW/bin
echo MINGW=$MINGW
echo Copying Helper Apps
# Needed when spawning other programs (e.g. when invoking GPSBabel)
-cp $MINGW_BIN/gspawn-win32-helper.exe $DESTINATION
+if [ "$HOSTTYPE" == "x86_64" ]; then
+ cp $MINGW_BIN/gspawn-win64-helper.exe $DESTINATION
+else
+ cp $MINGW_BIN/gspawn-win32-helper.exe $DESTINATION
+fi
echo Copying Libraries
# Core libs
cp $MINGW_BIN/libplds*.dll $DESTINATION
cp $MINGW_BIN/nss*.dll $DESTINATION
cp $MINGW_BIN/ssl*.dll $DESTINATION
-cp /usr/share/doc/packages/mingw32-libcurl-devel/COPYING $DESTINATION/COPYING_curl.txt
+if [ "$HOSTTYPE" == "x86_64" ]; then
+ cp /usr/share/doc/packages/mingw64-libcurl-devel/COPYING $DESTINATION/COPYING_curl.txt
+else
+ cp /usr/share/doc/packages/mingw32-libcurl-devel/COPYING $DESTINATION/COPYING_curl.txt
+fi
cp $MINGW_BIN/libexiv2.dll $DESTINATION
cp $MINGW_BIN/libgexiv2*.dll $DESTINATION
# Speedier install generation when testing
makensis -X"SetCompress off" viking-installer.nsi
fi
+
+if [ "$HOSTTYPE" == "x86_64" ]; then
+ rename viking viking-win64 viking-[0-9].[0-9].[0-9].[0-9].exe
+else
+ rename viking viking-win32 viking-[0-9].[0-9].[0-9].[0-9].exe
+fi
popd
!include "Sections.nsh"
!include "WinVer.nsh"
!include "LogicLib.nsh"
+!include "x64.nsh"
;; http://nsis.sourceforge.net/File_Association
!include "FileAssociation.nsh"
; Common settings
WriteRegStr SHCTX ${VIKING_REG_KEY} "" "$INSTDIR"
WriteRegStr SHCTX ${VIKING_REG_KEY} "Version" "${VIKING_VERSION}"
- WriteRegStr SHCTX "${VIKING_UNINSTALL_KEY}" "DisplayName" "Viking"
+ ${If} ${RunningX64}
+ WriteRegStr SHCTX "${VIKING_UNINSTALL_KEY}" "DisplayName" "Viking (x86)"
+ ${Else}
+ WriteRegStr SHCTX "${VIKING_UNINSTALL_KEY}" "DisplayName" "Viking (x64)"
+ ${EndIf}
WriteRegStr SHCTX "${VIKING_UNINSTALL_KEY}" "DisplayVersion" "${VIKING_VERSION}"
WriteRegStr SHCTX "${VIKING_UNINSTALL_KEY}" "DisplayIcon" "$INSTDIR\viking_icon.ico"
WriteRegStr SHCTX "${VIKING_UNINSTALL_KEY}" "HelpLink" "http://sourceforge.net/p/viking/wikiallura"
Pop $R0
StrCmp $R0 "HKLM" 0 user_dir
- StrCpy $INSTDIR "$PROGRAMFILES\Viking"
- Goto instdir_done
+ ${If} ${RunningX64}
+ StrCpy $INSTDIR "$PROGRAMFILES64\Viking"
+ ${Else}
+ StrCpy $INSTDIR "$PROGRAMFILES\Viking" ; $PROGRAMFILES32 also works
+ ${EndIf}
+ Goto instdir_done
user_dir:
Push $SMPROGRAMS
${GetParent} $SMPROGRAMS $R2