Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Fyorl
« on: May 23, 2006, 06:59:12 AM »

ah right, I didn't even know that but then again I never had the inclination to find out...
Posted by: the bigg
« on: May 23, 2006, 06:41:36 AM »

The Linux executable format is called 'ELF': http://en.wikipedia.org/wiki/Executable_and_Linkable_Format
Posted by: Fyorl
« on: May 23, 2006, 06:38:44 AM »

Posted by: FredSRichardson
« on: May 22, 2006, 01:07:35 PM »

The default FAT file system on Linux is case-sensitive, BTW  :o
Whoah, really?  It seems like this would break if you mounted a Linux FAT partition on Windows.

I'll have to read up on Wine, I think I misunderstood what it is and does.
Posted by: the bigg
« on: May 22, 2006, 10:05:57 AM »

from within the emulator
Wine = Wine Is Not (an) Emulator. It allows you to run Windows executables pretty much like you run Linux executables (= from an interpreter, not from a virtual machine), and implements good portions of the Windows API (allowing you to load both dlls or drivers from the ones in your Windows installation when they are missing).

The default FAT file system on Linux is case-sensitive, BTW  :o
Posted by: FredSRichardson
« on: May 22, 2006, 10:00:02 AM »

I'll have to look into Wine a bit more, it always looked like a bear to install.  Linux has no problem with FAT file partitions (maybe even NTFS ones) which are always case-insensative.  I would think there'd be a problem with using native ext2/3, since the OS has to allow for case sensative files for any other process accessing the same partition.  I'm sure there's no trouble accessing the emulator in a bash script from outside, but having a native windows app access Linux from within the emulator would be a neat trick :)
Posted by: the bigg
« on: May 22, 2006, 09:45:03 AM »

Yes, I only wish we could assume WeiDU users all had Cygwin/Bash installed.  :)
Darwinism shall prevail in the end.

Quote
I've never tried Wine before, but I understand it's an emulater (sort of like VMWare) so it has to emulate the same Windows file-system symantics.  If you want to run Bash within the Wine emulator, do you have to install Cygwin? :D
IIRC, it allows Windows executables to be run at the same level of ELF files, and implements the Winows DLLs (or even allows you to use M$-ones instead), rather than emulating a full OS. There are also case-insensitive Ext2/3 and FAT/NTFS drivers for Linux, if you look around (although it should be able to avoid the problem).

Also, Elf executables should be launchable by Wine (with some exceptions, EG Avenger reported that you can't run an ELF file in pausing mode), but I'm not sure about Bash (although they probably use the default Linux executable handler, and thus they should work natively).
Posted by: FredSRichardson
« on: May 22, 2006, 09:40:23 AM »

gemRB can be compiled under Windows as well. It's really great but it's not up to the actual Infinity Engine standard

I haven't tried out gemRB in a long time.  I think it's a great project, and I hope it will succeed in the long term :)
Posted by: FredSRichardson
« on: May 22, 2006, 09:37:44 AM »

I know this is a silly question, but is the Linux support for GemRB?  Utility scripts like this really make me wish that Windows had a Bash shell (I never got the hange of bat file scripting -- yick! :P).
BG2 runs fine (and case-insensitive) under Wine  :)
For bash-under-Winows : http://www.cygwin.com
Yes, I only wish we could assume WeiDU users all had Cygwin/Bash installed.  :)

I've never tried Wine before, but I understand it's an emulater (sort of like VMWare) so it has to emulate the same Windows file-system symantics.  If you want to run Bash within the Wine emulator, do you have to install Cygwin? :D
Posted by: Fyorl
« on: May 22, 2006, 09:30:46 AM »

I know this is a silly question, but is the Linux support for GemRB?  Utility scripts like this really make me wish that Windows had a Bash shell (I never got the hange of bat file scripting -- yick! :P).

gemRB can be compiled under Windows as well. It's really great but it's not up to the actual Infinity Engine standard
Posted by: the bigg
« on: May 22, 2006, 09:20:04 AM »

I know this is a silly question, but is the Linux support for GemRB?  Utility scripts like this really make me wish that Windows had a Bash shell (I never got the hange of bat file scripting -- yick! :P).
BG2 runs fine (and case-insensitive) under Wine  :)
For bash-under-Winows : http://www.cygwin.com
Posted by: FredSRichardson
« on: May 22, 2006, 08:59:01 AM »

I know this is a silly question, but is the Linux support for GemRB?  Utility scripts like this really make me wish that Windows had a Bash shell (I never got the hange of bat file scripting -- yick! :P).
Posted by: Fyorl
« on: May 22, 2006, 06:09:35 AM »

slight fix (added quotes around the variable names to accomodate filepaths with spaces etc.). The next version of WeiDU will not need this but in the meantime:

Code: [Select]
#!/bin/sh
#
# drake127 (2006-03-15)
#
# Rename all files in current directory and all its subdirectories to lower-case.
# If lower-case filename already exists, more recent one is preserved.
# Support for filepaths with spaces added by Fyorl (2006-05-22)

for file in `find -depth | sed -e 's/\ /\\\ /g'`
do
replace=`dirname $file`/`basename $file | tr [:upper:] [:lower:]`
if test $file != $replace -a $file != .
then
mv -u $file `dirname $file`/`basename $file | tr [:upper:] [:lower:]`
rm -f $file
fi
done

UPDATE:
*sigh* scratch that, it doesn't work but give me a minute

UPDATE #2
I'm fighting a losing battle here, the damn 'for file' keeps assigning a new $file every time it hits a space, even if that space is escaped >_<.

UPDATE #3
I give up. If you want, you can use this PHP script that I wrote which will do the trick just fine, but I doubt many people have PHP installed.

Code: [Select]
#!/usr/bin/php
<?php
# by Fyorl
# makes all files in the current directory (recursive) lowercase

$dir = `dirname $argv[0]`;
$dir trim($dir);
to_lower($dir);

function 
to_lower($dir)
{
$handle opendir($dir);

while(false !== ($file readdir($handle)))
{
$fp $dir '/' $file;

if($file == '.' || $file == '..')
{
continue;
}

$fpl strtolower($fp);
if($fp != $fpl)
{
exec("mv -u '$fp' '$fpl'; rm -f '$fp'");
}

if(is_dir($fpl))
{
to_lower($fpl);
}
}
}
?>