Adds initial support for Windows x64.

This commit is contained in:
Andrea Mazzoleni 2011-04-29 22:07:50 +02:00
parent a525a5d3be
commit 351beb96f3
5 changed files with 63 additions and 2 deletions

View file

@ -299,7 +299,7 @@ DISTWIN = \
snapraid.txt \
snapraid.exe
distwindows: $(DISTWIN)
distwindows-x86: $(DISTWIN)
rm -f $(PACKAGE)-$(VERSION)-windows-x86.zip
mkdir tmp
cp $(DISTWIN) tmp
@ -313,3 +313,17 @@ distwindows: $(DISTWIN)
cd tmp && zip -r ../$(PACKAGE)-$(VERSION)-windows-x86.zip *
rm -r tmp
distwindows-x64: $(DISTWIN)
rm -f $(PACKAGE)-$(VERSION)-windows-x64.zip
mkdir tmp
cp $(DISTWIN) tmp
cp snapraid.conf.example.windows tmp/snapraid.conf.example
cp INSTALL.windows tmp/install.txt
cp README tmp/readme.txt
cp AUTHORS tmp/authors.txt
cp HISTORY tmp/history.txt
cp COPYING tmp/copying.txt
cp TODO tmp/todo.txt
cd tmp && zip -r ../$(PACKAGE)-$(VERSION)-windows-x64.zip *
rm -r tmp

3
configure.windows-x64 Executable file
View file

@ -0,0 +1,3 @@
./configure --host=x86_64-w64-mingw32 --build=`./config.guess` $@

View file

@ -142,7 +142,7 @@ struct windows_stat {
static inline void windows_info2stat(const BY_HANDLE_FILE_INFORMATION* info, struct windows_stat* st)
{
/* Convert special attributes to a char device */
if ((info->dwFileAttributes & (FILE_ATTRIBUTE_DEVICE | FILE_ATTRIBUTE_TEMPORARY | FILE_ATTRIBUTE_OFFLINE | FILE_ATTRIBUTE_VIRTUAL | FILE_ATTRIBUTE_REPARSE_POINT)) != 0) {
if ((info->dwFileAttributes & (FILE_ATTRIBUTE_DEVICE | FILE_ATTRIBUTE_TEMPORARY | FILE_ATTRIBUTE_OFFLINE | FILE_ATTRIBUTE_REPARSE_POINT)) != 0) {
st->st_mode = S_IFCHR;
} else if ((info->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0) {
st->st_mode = S_IFDIR;

View file

@ -0,0 +1,44 @@
# Example configuration for snapraid for Windows
# Defines the file to use as Parity storage
# It must NOT be in a data disk
# Format: "parity FILE_PATH"
parity E:\par\parity
# Defines the file to use as Q-Parity storage
# If specified, it enables a double failures protection like RAID6
# It must NOT be in a data disk
# Format: "q-parity FILE_PATH"
#q-parity F:\qar\q-parity
# Defines the file to use as content list
# You can use multiple specification to store more copies of the file
# It's suggested to have at least N+1 copies of the file, where N is the number of parity files.
# It must NOT be in a data disk
# It can be in the disks used for parity storage
# Format: "content FILE_PATH"
content E:\par\content
#content F:\qar\content
content C:\snapraid\content
# Defines the data disks to use
# The order is relevant for parity, do not change it
# Format: "disk DISK_NAME DISK_MOUNT_POINT"
disk d1 G:\array\
disk d2 H:\array\
disk d3 I:\array\
# Defines files and directories to exclude
# Remember to use the forward slash -> /
# Format: "exclude FILE"
# Format: "exclude DIR/"
# Format: "exclude /PATH/FILE"
# Format: "exclude /PATH/DIR/"
exclude *.bak
exclude tmp/
# Defines the block size in kibi bytes (1024 bytes).
# Default value is 256 -> 256 kibi bytes -> 262144 bytes
# Format: "block_size SIZE_IN_KiB"
block_size 256