Initial Commit - Copy from Altus Metrum AltOS
This commit is contained in:
102
contrib/arch-linux/PKGBUILD-git.altos
Normal file
102
contrib/arch-linux/PKGBUILD-git.altos
Normal file
@@ -0,0 +1,102 @@
|
||||
# Original contributor: Bob Finch <w9ya@qrpqrci.net>
|
||||
pkgname=altos-git
|
||||
pkgver=20101125
|
||||
pkgrel=1
|
||||
pkgdesc="Software solutions for high powered rocketry avionics"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://www.altusmetrum.org/AltOS/"
|
||||
license=('GPL')
|
||||
provides=('altos')
|
||||
conflicts=('altos')
|
||||
depends=('openssl>=1.0.0' 'libusb1' 'plplot-svn' 'nickle' 'flite' 'kernel26>=2.6.33' 'fop'\
|
||||
'gconf' 'alsa-oss' 'swig' 'libglade' 'freetts' 'jdk>=6u21' 'jfreechart' 'jcommon')
|
||||
makedepends=('git' 'docbook-xsl=1.76.0' 'sdcc=2.9.0-2_patched' 'nsis' 'tar' 'gzip' 'zip')
|
||||
optdepends=('uucp: cu is included & is a bare boned terminal 2 serial program'
|
||||
'cutemon: gui-based minimal terminal to serial program'
|
||||
'google-earth: useful for viewing the kml files of the flight path')
|
||||
options=('docs')
|
||||
|
||||
_gitroot="git://git.gag.com/fw/altos"
|
||||
_gitname="altos"
|
||||
_pkgname="altosui"
|
||||
_libname="libaltos"
|
||||
|
||||
build() {
|
||||
cd "$srcdir"
|
||||
msg "Connecting to GIT server...."
|
||||
|
||||
if [ -d $_gitname ] ; then
|
||||
cd $_gitname && git pull origin
|
||||
msg "The local files are updated."
|
||||
else
|
||||
git clone $_gitroot
|
||||
fi
|
||||
|
||||
msg "GIT checkout done or server timeout"
|
||||
msg "Starting make..."
|
||||
|
||||
rm -rf "$srcdir/$_gitname-build"
|
||||
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
|
||||
|
||||
#
|
||||
# BUILD HERE
|
||||
#
|
||||
|
||||
sh /etc/profile.d/jdk.sh
|
||||
|
||||
cd "$srcdir/$_gitname-build"
|
||||
./autogen.sh --prefix=/usr --with-jvm=/opt/java/include/\
|
||||
--with-freetts=/usr/share/java/freetts/lib --with-jcommon=/usr/share/java/jcommon/lib\
|
||||
--with-jfreechart=/usr/share/java/jfreechart/lib\
|
||||
# --with-fat-dir=$srcdir
|
||||
# Use this ^ for placing all 3 "fat" packages (linux,mac,windows) into a numbered dir.
|
||||
|
||||
cd "$srcdir/$_gitname-build/$_pkgname/"
|
||||
sed -i 's:\$(datadir)/java:\$(datadir)/java/altos:' Makefile
|
||||
# This ^ places altosui.jar in an 'altos' subdirectory.
|
||||
sed -i 's:\${exec_prefix}/bin:\${exec_prefix}/share/java/altos:' Makefile
|
||||
# This ^ relocates altosui to allow for an aoss wrapper script.
|
||||
sed -i 's|:/usr/share/java/\*|:/usr/share/java/*:$(JCOMMON)/*:$(JFREECHART)/*|' Makefile
|
||||
# This ^ fixes compilation to include reference to jcommon.jar .
|
||||
sed -i 's:cp -p $(JFREECHART_CLASS):cp -p $(JFREECHART_CLASS) $(JCOMMON_CLASS):' Makefile
|
||||
# This ^ includes jcommon.jar in the macosx fat package.
|
||||
|
||||
cd "$srcdir/$_gitname-build/$_pkgname/$_libname/"
|
||||
sed -i 's:$(JVM_INCLUDE):/opt/java/include\ -I/opt/java/include/linux:' Makefile
|
||||
# This ^ enables both jni.h and jni_md.h to be found as required.
|
||||
|
||||
cd "$srcdir/$_gitname-build/doc"
|
||||
sed -i 's:stylesheet/docbook-xsl:xsl-stylesheets-1.76.0:' Makefile
|
||||
# This ^ fixes archlinux's use of a specfic reference.
|
||||
|
||||
cd "$srcdir/$_gitname-build"
|
||||
make || return 1
|
||||
|
||||
cd "$srcdir/$_gitname-build/doc"
|
||||
make all
|
||||
|
||||
cd "$srcdir/$_gitname-build/$_pkgname"
|
||||
make fat
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/$_gitname-build"
|
||||
make DESTDIR="$pkgdir/" install
|
||||
|
||||
mkdir -p $startdir/pkg/usr/share/altos
|
||||
install -m 644 src/telemetrum-v1.0-* $startdir/pkg/usr/share/altos/
|
||||
install -m 644 src/teledongle-v0.2-* $startdir/pkg/usr/share/altos/
|
||||
|
||||
mkdir -p $startdir/pkg/usr/share/pixmaps
|
||||
mkdir -p $startdir/pkg/usr/share/applications
|
||||
install -m644 debian/*.xpm $startdir/pkg/usr/share/pixmaps
|
||||
install -m644 debian/*.desktop $startdir/pkg/usr/share/applications
|
||||
|
||||
echo "#!/bin/sh" > holding.bin
|
||||
echo ". aoss /usr/share/java/altos/altosui" >> holding.bin
|
||||
install -D -m 755 holding.bin $startdir/pkg/usr/bin/$_pkgname
|
||||
|
||||
mkdir -p $startdir/pkg/usr/share/doc/altos
|
||||
install -m 644 doc/*.html $startdir/pkg/usr/share/doc/altos/
|
||||
install -m 644 doc/*.pdf $startdir/pkg/usr/share/doc/altos/
|
||||
}
|
38
contrib/arch-linux/PKGBUILD-git.freetts
Normal file
38
contrib/arch-linux/PKGBUILD-git.freetts
Normal file
@@ -0,0 +1,38 @@
|
||||
# Original contributor: Bob Finch <w9ya@qrpqrci.net>
|
||||
|
||||
pkgname=freetts
|
||||
_pkgname=FreeTTS
|
||||
pkgver=1.2.2
|
||||
_pkgver=1.2
|
||||
pkgrel=1
|
||||
pkgdesc="Sun's rewrite of flite for java"
|
||||
arch=('any')
|
||||
license=('custom')
|
||||
depends=('java-environment')
|
||||
makedepends=('junit' 'apache-ant')
|
||||
#source=(http://downloads.sourceforge.net/project/\
|
||||
#$pkgname/$_pkgname/$_pkgname%20$pkgver/$pkgname-$pkgver-src.zip)
|
||||
source=(http://downloads.sourceforge.net/project/\
|
||||
$pkgname/$_pkgname/$_pkgname%20$pkgver/$pkgname-$pkgver-bin.zip)
|
||||
url="http://freetts.sourceforge.net/"
|
||||
#md5sums=('692b5ece251fed88539736e55af5f391')
|
||||
md5sums=('cd751e5fd5c7ed29cf6879fc5200605d')
|
||||
|
||||
build() {
|
||||
# [ -z "${JAVA_HOME}" ] && . /etc/profile.d/jdk.sh
|
||||
# [ -z "${ANT_HOME}" ] && . /etc/profile.d/apache-ant.sh
|
||||
|
||||
# cd ${startdir}/src/$pkgname-$pkgver/lib
|
||||
cd ${startdir}/src/$pkgname-$_pkgver/lib
|
||||
rm README.txt jsapi.sh jsapi.exe
|
||||
|
||||
# cd ${startdir}/src/$pkgname-$pkgver
|
||||
# ln -s . src
|
||||
# /usr/share/java/apache-ant/bin/ant
|
||||
|
||||
cd $srcdir/$pkgname-$_pkgver
|
||||
install -d $pkgdir/usr/share/java/$pkgname/lib
|
||||
install -m644 lib/* $pkgdir/usr/share/java/$pkgname/lib/
|
||||
|
||||
# cp -a bld $pkgdir/usr/share/java/$pkgname/
|
||||
}
|
28
contrib/arch-linux/PKGBUILD-git.jcommon
Normal file
28
contrib/arch-linux/PKGBUILD-git.jcommon
Normal file
@@ -0,0 +1,28 @@
|
||||
# Original contributor: Bob Finch <w9ya@qrpqrci.net>
|
||||
|
||||
pkgname=jcommon
|
||||
_pkgname=JCommon
|
||||
_project=jfreechart
|
||||
pkgver=1.0.16
|
||||
pkgrel=1
|
||||
pkgdesc="Base routines for JFreeChart"
|
||||
arch=('any')
|
||||
license=('lgpl')
|
||||
depends=('java-environment')
|
||||
makedepends=('apache-ant' 'zip' 'gzip' 'tar')
|
||||
source=(http://downloads.sourceforge.net/project/\
|
||||
$_project/3.%20$_pkgname/$pkgver/$pkgname-$pkgver.tar.gz)
|
||||
url="http://www.jfree.org/jcommon/"
|
||||
md5sums=('5fb774c225cdc7d15a99c9702031ae05')
|
||||
|
||||
build() {
|
||||
[ -z "${JAVA_HOME}" ] && . /etc/profile.d/jdk.sh
|
||||
[ -z "${ANT_HOME}" ] && . /etc/profile.d/apache-ant.sh
|
||||
|
||||
cd ${startdir}/src/$pkgname-$pkgver/ant
|
||||
/usr/share/java/apache-ant/bin/ant
|
||||
|
||||
cd ${startdir}/src/$pkgname-$pkgver
|
||||
install -d $pkgdir/usr/share/java/$pkgname/lib
|
||||
install -m644 $pkgname-$pkgver.jar $pkgdir/usr/share/java/$pkgname/lib/$pkgname.jar
|
||||
}
|
27
contrib/arch-linux/PKGBUILD-git.jfreechart
Normal file
27
contrib/arch-linux/PKGBUILD-git.jfreechart
Normal file
@@ -0,0 +1,27 @@
|
||||
# Original contributor: Bob Finch <w9ya@qrpqrci.net>
|
||||
|
||||
pkgname=jfreechart
|
||||
_pkgname=JFreeChart
|
||||
pkgver=1.0.13
|
||||
pkgrel=1
|
||||
pkgdesc="Charting program for Java"
|
||||
arch=('any')
|
||||
license=('lgpl')
|
||||
depends=('java-environment' 'jcommon')
|
||||
makedepends=('apache-ant' 'zip' 'gzip' 'tar')
|
||||
source=(http://downloads.sourceforge.net/project/\
|
||||
$pkgname/1.%20$_pkgname/$pkgver/$pkgname-$pkgver.tar.gz)
|
||||
url="http://www.jfree.org/jfreechart/"
|
||||
md5sums=('c90e2f8f612b9aaf3f24a4afce219076')
|
||||
|
||||
build() {
|
||||
[ -z "${JAVA_HOME}" ] && . /etc/profile.d/jdk.sh
|
||||
[ -z "${ANT_HOME}" ] && . /etc/profile.d/apache-ant.sh
|
||||
|
||||
cd ${startdir}/src/$pkgname-$pkgver/ant
|
||||
/usr/share/java/apache-ant/bin/ant
|
||||
|
||||
cd ${startdir}/src/$pkgname-$pkgver
|
||||
install -d $pkgdir/usr/share/java/$pkgname/lib
|
||||
install -m644 lib/$pkgname-$pkgver.jar $pkgdir/usr/share/java/$pkgname/lib/$pkgname.jar
|
||||
}
|
46
contrib/arch-linux/PKGBUILD-git.nickle
Normal file
46
contrib/arch-linux/PKGBUILD-git.nickle
Normal file
@@ -0,0 +1,46 @@
|
||||
# Original contributor: Bob Finch <w9ya@qrpqrci.net>
|
||||
pkgname=nickle-git
|
||||
pkgver=20100518
|
||||
pkgrel=1
|
||||
pkgdesc="A desk calculator language with powerful programming and scripting capabilities."
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://keithp.com/git-repository/"
|
||||
license=('custom')
|
||||
provides=('nickle')
|
||||
conflicts=('nickle')
|
||||
depends=('readline')
|
||||
makedepends=('git')
|
||||
|
||||
_gitroot="git://keithp.com/git/nickle"
|
||||
_gitname="nickle"
|
||||
|
||||
build() {
|
||||
cd "$srcdir"
|
||||
msg "Connecting to GIT server...."
|
||||
|
||||
if [ -d $_gitname ] ; then
|
||||
cd $_gitname && git pull origin
|
||||
msg "The local files are updated."
|
||||
else
|
||||
git clone $_gitroot
|
||||
fi
|
||||
|
||||
msg "GIT checkout done or server timeout"
|
||||
msg "Starting make..."
|
||||
|
||||
rm -rf "$srcdir/$_gitname-build"
|
||||
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
|
||||
cd "$srcdir/$_gitname-build"
|
||||
|
||||
#
|
||||
# BUILD HERE
|
||||
#
|
||||
|
||||
./autogen.sh
|
||||
./configure --prefix=/usr
|
||||
make || return 1
|
||||
make DESTDIR="$pkgdir/" install
|
||||
|
||||
install -D -m 644 COPYING\
|
||||
$startdir/pkg/usr/share/licenses/$_gitname/COPYING.txt
|
||||
}
|
34
contrib/arch-linux/PKGBUILD-git.nsis.patched
Normal file
34
contrib/arch-linux/PKGBUILD-git.nsis.patched
Normal file
@@ -0,0 +1,34 @@
|
||||
# Contributor: Andre Klitzing <andre () incubo () de>
|
||||
# Contributor: mosra <mosra@centrum.cz>
|
||||
pkgname=nsis
|
||||
pkgver=2.46
|
||||
pkgrel=3
|
||||
pkgdesc='A professional open source system to create Windows installers'
|
||||
arch=('i686' 'x86_64')
|
||||
url='http://nsis.sourceforge.net'
|
||||
license='http://nsis.sourceforge.net/License'
|
||||
depends=('mingw32-runtime')
|
||||
makedepends=('scons' 'mingw32-gcc' 'mingw32-binutils' 'mingw32-w32api')
|
||||
source=(http://downloads.sourceforge.net/project/nsis/NSIS%202/$pkgver/$pkgname-$pkgver-src.tar.bz2
|
||||
nsis-2.43-64bit-fixes.patch)
|
||||
md5sums=('61c2e81739436b06d7cf7bcce1d533ac'
|
||||
'9eead3b78da54e3afda8f6a5b663aea9')
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname-$pkgver-src"
|
||||
|
||||
# Patch taken from
|
||||
# http://cvs.fedoraproject.org/viewvc/rpms/mingw32-nsis/F-11/nsis-2.43-64bit-fixes.patch
|
||||
patch -p1 -i "$srcdir/nsis-2.43-64bit-fixes.patch" || return 1
|
||||
|
||||
# Patch version from DD-MM-YYY.cvs to 2.46 (makes CPack working again)
|
||||
sed -i "s/'Version of NSIS', cvs_version)/'Version of NSIS', '${pkgver}')/" \
|
||||
"${srcdir}/${pkgname}-${pkgver}-src/SConstruct"
|
||||
|
||||
scons PREFIX_DEST="$pkgdir/" PREFIX=/usr/i486-mingw32 SKIPUTILS='NSIS Menu' install || return 1
|
||||
|
||||
# Add a symlink to 'makensis' for lazy people ;-)
|
||||
mkdir "$pkgdir/usr/bin/"
|
||||
cd "$pkgdir/usr/bin/"
|
||||
ln -s ../i486-mingw32/bin/makensis
|
||||
}
|
34
contrib/arch-linux/PKGBUILD-git.sdcc_patched
Normal file
34
contrib/arch-linux/PKGBUILD-git.sdcc_patched
Normal file
@@ -0,0 +1,34 @@
|
||||
# $Id: PKGBUILD 23526 2010-08-12 12:59:41Z spupykin $
|
||||
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
|
||||
# Maintainer: Jose Negron <josenj.arch@mailnull.net>
|
||||
# Patched w/ keith packard's patch for altos - RJF 26-aug-10
|
||||
|
||||
pkgname=sdcc
|
||||
pkgver=2.9.0
|
||||
pkgrel=2_patched
|
||||
pkgdesc="Retargettable ANSI C compiler (Intel 8051, Maxim 80DS390, Zilog Z80 and the Motorola 68HC08)"
|
||||
arch=('i686' 'x86_64')
|
||||
license=('GPL')
|
||||
depends=('bash' 'gcc-libs')
|
||||
makedepends=('gputils' 'flex' 'bison' 'patch')
|
||||
provides=('sdcc')
|
||||
conflicts=('sdcc')
|
||||
url="http://sdcc.sourceforge.net/"
|
||||
options=(!strip)
|
||||
#Patch file was taken from https://bugzilla.redhat.com/show_bug.cgi?id=488217
|
||||
source=(http://downloads.sourceforge.net/sourceforge/sdcc/$pkgname-src-$pkgver.tar.bz2
|
||||
http://aur.archlinux.org/packages/$pkgname/$pkgname/$pkgname-$pkgver.patch
|
||||
new.patch)
|
||||
md5sums=('a6151ed328fd3bc48305ffbc628dc122'
|
||||
'35313a8edca4f2c8a03ad57036da4e62'
|
||||
'65612bb094e719713bc477efd6000672')
|
||||
|
||||
build() {
|
||||
cd $srcdir/$pkgname
|
||||
patch -p1 -i ../$pkgname-$pkgver.patch
|
||||
patch -p0 -i ../new.patch
|
||||
./configure --prefix=$pkgdir/usr
|
||||
make
|
||||
make install
|
||||
strip $pkgdir/usr/bin/* || true
|
||||
}
|
5
contrib/arch-linux/README
Normal file
5
contrib/arch-linux/README
Normal file
@@ -0,0 +1,5 @@
|
||||
These files were contributed by Bob Finch <w9ya@qrpqrci.net>, and demonstrate
|
||||
how to build packages for the Arch Linux distribution:
|
||||
|
||||
http://www.archlinux.org/
|
||||
|
35
contrib/arch-linux/new.patch
Normal file
35
contrib/arch-linux/new.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
--- src/SDCCast.c
|
||||
+++ src/SDCCast.c
|
||||
@@ -863,6 +863,8 @@ processParms (ast *func,
|
||||
|
||||
ftype = (*actParm)->ftype;
|
||||
|
||||
+ resultType = RESULT_TYPE_NONE;
|
||||
+
|
||||
/* If it's a char, upcast to int. */
|
||||
if (IS_INTEGRAL (ftype)
|
||||
&& (getSize (ftype) < (unsigned) INTSIZE))
|
||||
@@ -874,12 +876,14 @@ processParms (ast *func,
|
||||
{
|
||||
newType = newAst_LINK (copyLinkChain(ftype));
|
||||
DCL_TYPE (newType->opval.lnk) = port->unqualified_pointer;
|
||||
+ resultType = RESULT_TYPE_GPTR;
|
||||
}
|
||||
|
||||
if (IS_AGGREGATE (ftype))
|
||||
{
|
||||
newType = newAst_LINK (copyLinkChain (ftype));
|
||||
DCL_TYPE (newType->opval.lnk) = port->unqualified_pointer;
|
||||
+ resultType = RESULT_TYPE_GPTR;
|
||||
}
|
||||
|
||||
if (newType)
|
||||
@@ -890,7 +894,7 @@ processParms (ast *func,
|
||||
(*actParm)->filename = (*actParm)->right->filename;
|
||||
(*actParm)->lineno = (*actParm)->right->lineno;
|
||||
|
||||
- decorateType (*actParm, RESULT_TYPE_NONE);
|
||||
+ decorateType (*actParm, resultType);
|
||||
}
|
||||
return 0;
|
||||
} /* vararg */
|
211
contrib/arch-linux/nsis-2.43-64bit-fixes.patch
Normal file
211
contrib/arch-linux/nsis-2.43-64bit-fixes.patch
Normal file
@@ -0,0 +1,211 @@
|
||||
diff -ur nsis-2.43-src/SCons/Config/gnu nsis-2.43-src-64bit-fixes/SCons/Config/gnu
|
||||
--- nsis-2.43-src/SCons/Config/gnu 2009-02-05 01:52:28.000000000 +0100
|
||||
+++ nsis-2.43-src-64bit-fixes/SCons/Config/gnu 2009-02-25 07:59:44.000000000 +0100
|
||||
@@ -95,8 +95,6 @@
|
||||
makensis_env.Append(CXXFLAGS = ['-Wall']) # all warnings
|
||||
|
||||
conf = FlagsConfigure(makensis_env)
|
||||
-conf.CheckCompileFlag('-m32') #
|
||||
-conf.CheckLinkFlag('-m32') #
|
||||
conf.CheckLinkFlag('$MAP_FLAG') # generate map file
|
||||
if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_CP']:
|
||||
TestStrip(conf) # strip
|
||||
@@ -149,8 +147,6 @@
|
||||
### cross-platform util environment adjustments
|
||||
|
||||
conf = FlagsConfigure(cp_util_env)
|
||||
-conf.CheckCompileFlag('-m32')
|
||||
-conf.CheckLinkFlag('-m32')
|
||||
if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_CP']:
|
||||
TestStrip(conf) # strip
|
||||
conf.Finish()
|
||||
@@ -160,8 +156,6 @@
|
||||
test_env = defenv.Clone()
|
||||
test_env.Append(CPPPATH = ['#$BUILD_CONFIG'])
|
||||
conf = FlagsConfigure(test_env)
|
||||
-conf.CheckCompileFlag('-m32')
|
||||
-conf.CheckLinkFlag('-m32')
|
||||
conf.Finish()
|
||||
|
||||
### weird GCC requirements
|
||||
diff -ur nsis-2.43-src/Source/DialogTemplate.cpp nsis-2.43-src-64bit-fixes/Source/DialogTemplate.cpp
|
||||
--- nsis-2.43-src/Source/DialogTemplate.cpp 2007-11-30 10:54:13.000000000 +0100
|
||||
+++ nsis-2.43-src-64bit-fixes/Source/DialogTemplate.cpp 2009-02-25 07:59:44.000000000 +0100
|
||||
@@ -74,7 +74,7 @@
|
||||
if (IS_INTRESOURCE(x)) { \
|
||||
*(WORD*)seeker = 0xFFFF; \
|
||||
seeker += sizeof(WORD); \
|
||||
- *(WORD*)seeker = ConvertEndianness(WORD(DWORD(x))); \
|
||||
+ *(WORD*)seeker = ConvertEndianness(WORD(long(x))); \
|
||||
seeker += sizeof(WORD); \
|
||||
} \
|
||||
else { \
|
||||
@@ -622,7 +622,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- assert((DWORD) seeker - (DWORD) pbDlg == dwSize);
|
||||
+ assert((long) seeker - (long) pbDlg == dwSize);
|
||||
|
||||
// DONE!
|
||||
return pbDlg;
|
||||
diff -ur nsis-2.43-src/Source/mmap.cpp nsis-2.43-src-64bit-fixes/Source/mmap.cpp
|
||||
--- nsis-2.43-src/Source/mmap.cpp 2009-02-01 15:44:30.000000000 +0100
|
||||
+++ nsis-2.43-src-64bit-fixes/Source/mmap.cpp 2009-02-25 07:59:44.000000000 +0100
|
||||
@@ -322,7 +322,7 @@
|
||||
if (!pView)
|
||||
return;
|
||||
|
||||
- unsigned int alignment = ((unsigned int)pView) % m_iAllocationGranularity;
|
||||
+ unsigned int alignment = ((unsigned long)pView) % m_iAllocationGranularity;
|
||||
pView = (char *)pView - alignment;
|
||||
size += alignment;
|
||||
#ifdef _WIN32
|
||||
diff -ur nsis-2.43-src/Source/Platform.h nsis-2.43-src-64bit-fixes/Source/Platform.h
|
||||
--- nsis-2.43-src/Source/Platform.h 2009-02-01 15:44:30.000000000 +0100
|
||||
+++ nsis-2.43-src-64bit-fixes/Source/Platform.h 2009-02-25 07:59:44.000000000 +0100
|
||||
@@ -166,7 +166,7 @@
|
||||
# define MAKEINTRESOURCE MAKEINTRESOURCEA
|
||||
# endif
|
||||
# ifndef IMAGE_FIRST_SECTION
|
||||
-# define IMAGE_FIRST_SECTION(h) ( PIMAGE_SECTION_HEADER( (DWORD) h + \
|
||||
+# define IMAGE_FIRST_SECTION(h) ( PIMAGE_SECTION_HEADER( (long) h + \
|
||||
FIELD_OFFSET(IMAGE_NT_HEADERS, OptionalHeader) + \
|
||||
FIX_ENDIAN_INT16(PIMAGE_NT_HEADERS(h)->FileHeader.SizeOfOptionalHeader) ) )
|
||||
# endif
|
||||
@@ -198,7 +198,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef ULONG_PTR
|
||||
-# define ULONG_PTR DWORD
|
||||
+# define ULONG_PTR ULONG
|
||||
#endif
|
||||
|
||||
#ifndef IDC_HAND
|
||||
@@ -703,7 +703,7 @@
|
||||
WORD e_oemid;
|
||||
WORD e_oeminfo;
|
||||
WORD e_res2[10];
|
||||
- LONG e_lfanew;
|
||||
+ DWORD e_lfanew;
|
||||
} IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER;
|
||||
# pragma pack()
|
||||
# pragma pack(4)
|
||||
diff -ur nsis-2.43-src/Source/Plugins.cpp nsis-2.43-src-64bit-fixes/Source/Plugins.cpp
|
||||
--- nsis-2.43-src/Source/Plugins.cpp 2009-02-01 15:44:30.000000000 +0100
|
||||
+++ nsis-2.43-src-64bit-fixes/Source/Plugins.cpp 2009-02-25 07:59:44.000000000 +0100
|
||||
@@ -136,7 +136,7 @@
|
||||
DWORD prd = FIX_ENDIAN_INT32(sections[i].PointerToRawData);
|
||||
PIMAGE_EXPORT_DIRECTORY exports = PIMAGE_EXPORT_DIRECTORY(&dlldata[0] + prd + ExportDirVA - va);
|
||||
DWORD na = FIX_ENDIAN_INT32(exports->AddressOfNames);
|
||||
- unsigned long *names = (unsigned long*)((unsigned long) exports + (char *) na - ExportDirVA);
|
||||
+ unsigned int *names = (unsigned int*)((unsigned long) exports + (char *) na - ExportDirVA);
|
||||
for (unsigned long j = 0; j < FIX_ENDIAN_INT32(exports->NumberOfNames); j++)
|
||||
{
|
||||
const string name = string((char*)exports + FIX_ENDIAN_INT32(names[j]) - ExportDirVA);
|
||||
diff -ur nsis-2.43-src/Source/ResourceEditor.cpp nsis-2.43-src-64bit-fixes/Source/ResourceEditor.cpp
|
||||
--- nsis-2.43-src/Source/ResourceEditor.cpp 2009-02-05 01:50:12.000000000 +0100
|
||||
+++ nsis-2.43-src-64bit-fixes/Source/ResourceEditor.cpp 2009-02-25 07:59:44.000000000 +0100
|
||||
@@ -684,7 +684,7 @@
|
||||
rdDir.NumberOfIdEntries = ConvertEndianness(rdDir.NumberOfIdEntries);
|
||||
|
||||
CopyMemory(seeker, &rdDir, sizeof(IMAGE_RESOURCE_DIRECTORY));
|
||||
- crd->m_dwWrittenAt = DWORD(seeker);
|
||||
+ crd->m_dwWrittenAt = long(seeker);
|
||||
seeker += sizeof(IMAGE_RESOURCE_DIRECTORY);
|
||||
|
||||
for (int i = 0; i < crd->CountEntries(); i++) {
|
||||
@@ -705,7 +705,7 @@
|
||||
rDirE.UName.NameString.NameIsString = (crd->GetEntry(i)->HasName()) ? 1 : 0;
|
||||
|
||||
CopyMemory(seeker, &rDirE, sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY));
|
||||
- crd->GetEntry(i)->m_dwWrittenAt = DWORD(seeker);
|
||||
+ crd->GetEntry(i)->m_dwWrittenAt = long(seeker);
|
||||
seeker += sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY);
|
||||
}
|
||||
qDirs.pop();
|
||||
@@ -721,7 +721,7 @@
|
||||
rDataE.Size = ConvertEndianness(cRDataE->GetSize());
|
||||
|
||||
CopyMemory(seeker, &rDataE, sizeof(IMAGE_RESOURCE_DATA_ENTRY));
|
||||
- cRDataE->m_dwWrittenAt = DWORD(seeker);
|
||||
+ cRDataE->m_dwWrittenAt = long(seeker);
|
||||
seeker += sizeof(IMAGE_RESOURCE_DATA_ENTRY);
|
||||
|
||||
qDataEntries.pop();
|
||||
@@ -733,7 +733,7 @@
|
||||
while (!qStrings.empty()) {
|
||||
CResourceDirectoryEntry* cRDirE = qStrings.front();
|
||||
|
||||
- PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(cRDirE->m_dwWrittenAt)->UName.NameString.NameOffset = ConvertEndianness(DWORD(seeker) - DWORD(pbRsrcSec));
|
||||
+ PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(cRDirE->m_dwWrittenAt)->UName.NameString.NameOffset = ConvertEndianness(long(seeker) - long(pbRsrcSec));
|
||||
|
||||
WCHAR* szName = cRDirE->GetName();
|
||||
WORD iLen = winchar_strlen(szName) + 1;
|
||||
@@ -764,7 +764,7 @@
|
||||
/*
|
||||
* Set all of the directory entries offsets.
|
||||
*/
|
||||
- SetOffsets(m_cResDir, DWORD(pbRsrcSec));
|
||||
+ SetOffsets(m_cResDir, long(pbRsrcSec));
|
||||
}
|
||||
|
||||
// Sets the offsets in directory entries
|
||||
@@ -887,7 +887,7 @@
|
||||
// Returns -1 if can not be found
|
||||
int CResourceDirectory::Find(WCHAR* szName) {
|
||||
if (IS_INTRESOURCE(szName))
|
||||
- return Find((WORD) (DWORD) szName);
|
||||
+ return Find((WORD) (long) szName);
|
||||
else
|
||||
if (szName[0] == '#')
|
||||
return Find(WORD(winchar_stoi(szName + 1)));
|
||||
@@ -965,7 +965,7 @@
|
||||
if (IS_INTRESOURCE(szName)) {
|
||||
m_bHasName = false;
|
||||
m_szName = 0;
|
||||
- m_wId = (WORD) (DWORD) szName;
|
||||
+ m_wId = (WORD) (long) szName;
|
||||
}
|
||||
else {
|
||||
m_bHasName = true;
|
||||
@@ -979,7 +979,7 @@
|
||||
if (IS_INTRESOURCE(szName)) {
|
||||
m_bHasName = false;
|
||||
m_szName = 0;
|
||||
- m_wId = (WORD) (DWORD) szName;
|
||||
+ m_wId = (WORD) (long) szName;
|
||||
}
|
||||
else {
|
||||
m_bHasName = true;
|
||||
diff -ur nsis-2.43-src/Source/util.cpp nsis-2.43-src-64bit-fixes/Source/util.cpp
|
||||
--- nsis-2.43-src/Source/util.cpp 2009-02-01 15:44:30.000000000 +0100
|
||||
+++ nsis-2.43-src-64bit-fixes/Source/util.cpp 2009-02-25 07:59:44.000000000 +0100
|
||||
@@ -77,9 +77,9 @@
|
||||
}
|
||||
|
||||
if (width != 0) {
|
||||
- LONG biWidth;
|
||||
+ DWORD biWidth;
|
||||
fseek(f, 18, SEEK_SET); // Seek to the width member of the header
|
||||
- fread(&biWidth, sizeof(LONG), 1, f);
|
||||
+ fread(&biWidth, sizeof(DWORD), 1, f);
|
||||
FIX_ENDIAN_INT32_INPLACE(biWidth);
|
||||
if (width != biWidth) {
|
||||
fclose(f);
|
||||
@@ -88,12 +88,12 @@
|
||||
}
|
||||
|
||||
if (height != 0) {
|
||||
- LONG biHeight;
|
||||
+ DWORD biHeight;
|
||||
fseek(f, 22, SEEK_SET); // Seek to the height member of the header
|
||||
- fread(&biHeight, sizeof(LONG), 1, f);
|
||||
+ fread(&biHeight, sizeof(DWORD), 1, f);
|
||||
FIX_ENDIAN_INT32_INPLACE(biHeight);
|
||||
// Bitmap height can be negative too...
|
||||
- if (height != abs(biHeight)) {
|
||||
+ if (height != abs((long int)biHeight)) {
|
||||
fclose(f);
|
||||
return -3;
|
||||
}
|
Reference in New Issue
Block a user