Ticket #8525: aos4_changes.patch
File aos4_changes.patch, 5.7 KB (added by , 18 years ago) |
---|
-
configure
78 78 _zip="zip -q" 79 79 _cp=cp 80 80 _win32path="C:/scummvm" 81 _aos4path="Games:ScummVM_Snapshot" 81 82 _sdlconfig=sdl-config 82 83 _sdlpath="$PATH" 83 84 _nasmpath="$PATH" … … 1419 1424 ZIP := $_zip 1420 1425 CP := $_cp 1421 1426 WIN32PATH=$_win32path 1427 AOS4PATH=$_aos4path 1422 1428 1423 1429 BACKEND := $_backend 1424 1430 MODULES += $MODULES -
backends/fs/amigaos4/amigaos4-fs.cpp
39 39 #include "base/engine.h" 40 40 #include "backends/fs/fs.h" 41 41 42 #define ENTER() /* debug(6, "Enter \n") */43 #define LEAVE() /* debug(6, "Leave \n") */42 #define ENTER() /* debug(6, "Enter") */ 43 #define LEAVE() /* debug(6, "Leave") */ 44 44 45 45 46 46 const uint32 kExAllBufferSize = 40960; // TODO: is this okay for sure? … … 120 120 121 121 struct FileInfoBlock *fib = (struct FileInfoBlock *)IDOS->AllocDosObject(DOS_FIB, NULL); 122 122 if (!fib) { 123 debug(6, " fib == 0\n");123 debug(6, "FileInfoBlock is NULL"); 124 124 LEAVE(); 125 125 return; 126 126 } 127 127 128 BPTR pLock = IDOS->Lock( (char *)_sPath.c_str(), SHARED_LOCK);128 BPTR pLock = IDOS->Lock((STRPTR)_sPath.c_str(), SHARED_LOCK); 129 129 if (pLock) { 130 130 if (IDOS->Examine(pLock, fib) != DOSFALSE) { 131 131 if (fib->fib_EntryType > 0) … … 155 155 156 156 while (1) { 157 157 char *name = new char[bufSize]; 158 if (IDOS->NameFromLock(pLock, name, bufSize) != DOSFALSE) {158 if (IDOS->NameFromLock(pLock, (STRPTR)name, bufSize) != DOSFALSE) { 159 159 _sPath = name; 160 _sDisplayName = pDisplayName ? pDisplayName : IDOS->FilePart( name);160 _sDisplayName = pDisplayName ? pDisplayName : IDOS->FilePart((STRPTR)name); 161 161 delete [] name; 162 162 break; 163 163 } 164 164 165 165 if (IDOS->IoErr() != ERROR_LINE_TOO_LONG) { 166 166 _bIsValid = false; 167 debug(6, " Error\n");167 debug(6, "IoErr() != ERROR_LINE_TOO_LONG"); 168 168 LEAVE(); 169 169 delete [] name; 170 170 return; … … 177 177 178 178 struct FileInfoBlock *fib = (struct FileInfoBlock *)IDOS->AllocDosObject(DOS_FIB, NULL); 179 179 if (!fib) { 180 debug(6, " fib == 0\n");180 debug(6, "FileInfoBlock is NULL"); 181 181 LEAVE(); 182 182 return; 183 183 } … … 226 226 FSList myList; 227 227 228 228 if (!_bIsValid) { 229 debug(6, "Invalid node \n");229 debug(6, "Invalid node"); 230 230 LEAVE(); 231 231 return myList; // Empty list 232 232 } 233 233 234 234 if (!_bIsDirectory) { 235 debug(6, "Not a directory \n");235 debug(6, "Not a directory"); 236 236 LEAVE(); 237 237 return myList; // Empty list 238 238 } 239 239 240 240 if (_pFileLock == 0) { 241 debug(6, "Root node \n");241 debug(6, "Root node"); 242 242 LEAVE(); 243 243 return listVolumes(); 244 244 } 245 245 246 //FSList *myList = new FSList();247 248 246 struct ExAllControl *eac = (struct ExAllControl *)IDOS->AllocDosObject(DOS_EXALLCONTROL, 0); 249 247 if (eac) { 250 248 struct ExAllData *data = (struct ExAllData *)IExec->AllocVec(kExAllBufferSize, MEMF_ANY); … … 252 250 BOOL bExMore; 253 251 eac->eac_LastKey = 0; 254 252 do { 253 // Examine directory 255 254 bExMore = IDOS->ExAll(_pFileLock, data, kExAllBufferSize, ED_TYPE, eac); 256 255 257 256 LONG error = IDOS->IoErr(); 258 257 if (!bExMore && error != ERROR_NO_MORE_ENTRIES) 259 break; 258 break; // Abnormal failure 260 259 261 260 if (eac->eac_Entries == 0) 262 continue; 261 continue; // Normal failure, no entries 263 262 264 263 struct ExAllData *ead = data; 265 264 do { 266 if ((mode == kListAll) || (EAD_IS_DRAWER(ead) && (mode == kListDirectoriesOnly)) || 265 if ((mode == kListAll) || 266 (EAD_IS_DRAWER(ead) && (mode == kListDirectoriesOnly)) || 267 267 (EAD_IS_FILE(ead) && (mode == kListFilesOnly))) { 268 268 String full_path = _sPath; 269 269 full_path += (char*)ead->ed_Name; 270 270 271 BPTR lock = IDOS->Lock(( char *)full_path.c_str(), SHARED_LOCK);271 BPTR lock = IDOS->Lock((STRPTR)full_path.c_str(), SHARED_LOCK); 272 272 if (lock) { 273 273 AmigaOSFilesystemNode *entry = new AmigaOSFilesystemNode(lock, (char *)ead->ed_Name); 274 274 if (entry) { … … 298 298 ENTER(); 299 299 300 300 if (!_bIsDirectory) { 301 debug(6, "No directory\n");301 debug(6, "Not a directory"); 302 302 LEAVE(); 303 303 return 0; 304 304 } 305 305 306 306 if (_pFileLock == 0) { 307 debug(6, "Root node \n");307 debug(6, "Root node"); 308 308 LEAVE(); 309 309 return new AmigaOSFilesystemNode(*this); 310 310 } … … 325 325 326 326 FSList AmigaOSFilesystemNode::listVolumes(void) const { 327 327 ENTER(); 328 //FSList *myList = new FSList(); 328 329 329 FSList myList; 330 330 331 331 const uint32 kLockFlags = LDF_READ | LDF_VOLUMES; … … 333 333 334 334 struct DosList *dosList = IDOS->LockDosList(kLockFlags); 335 335 if (!dosList) { 336 debug(6, "Cannot lock dos list\n");336 debug(6, "Cannot lock the DOS list"); 337 337 LEAVE(); 338 338 return myList; 339 339 } … … 350 350 strcpy(name, volName); 351 351 strcat(name, ":"); 352 352 353 BPTR volumeLock = IDOS->Lock( name, SHARED_LOCK);353 BPTR volumeLock = IDOS->Lock((STRPTR)name, SHARED_LOCK); 354 354 if (volumeLock) { 355 355 sprintf(name, "%s (%s)", volName, devName); 356 356 AmigaOSFilesystemNode *entry = new AmigaOSFilesystemNode(volumeLock, name); -
Makefile
141 141 cp /usr/local/bin/SDL.dll $(WIN32PATH) 142 142 u2d $(WIN32PATH)/*.txt 143 143 144 # Special target to create an AmigaOS snapshot installation 145 aos4dist: scummvm 146 mkdir -p $(AOS4PATH) 147 strip -R.comment $< -o $(AOS4PATH)/$< 148 cp aos4icon.info $(AOS4PATH)/$<.info 149 cp gui/themes/default-theme.ini $(AOS4PATH) 150 cp gui/themes/default-theme.zip $(AOS4PATH) 151 cp AUTHORS $(AOS4PATH)/AUTHORS.txt 152 cp COPYING $(AOS4PATH)/COPYING.txt 153 cp NEWS $(AOS4PATH)/NEWS.txt 154 cp README $(AOS4PATH)/README.txt 155 cp /sdk/local/documentation/SDL-1.2.9/README-SDL.txt $(AOS4PATH) 144 156 145 157 .PHONY: deb bundle osxsnap win32dist dist install uninstall