Skip to content

Commit

Permalink
Merge pull request #4 from Arisamiga/amiga3.9-compatability
Browse files Browse the repository at this point in the history
Amiga3.x Compatibility
  • Loading branch information
Arisamiga authored Oct 27, 2023
2 parents 2f3c2f6 + 7a4d38e commit d715d2a
Show file tree
Hide file tree
Showing 28 changed files with 271 additions and 252 deletions.
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif
INCLUDES = -I$(NDK32_INC)

# Object files
OBJ = src/funcs.o src/main.o src/scan.o src/window.o src/aboutWin.o
OBJ = src/funcs.o src/main.o src/scan.o src/window.o

# Build command for .o -> Executable
Mnemosyne: $(OBJ)
Expand All @@ -30,14 +30,12 @@ Mnemosyne: $(OBJ)

# Files and Dependances
src/funcs.o: src/funcs.h src/funcs.c

src/main.o: src/main.c src/scan.h src/window.h

src/scan.o: src/scan.h src/scan.c src/funcs.h

src/window.o: src/window.h src/window.c src/funcs.h src/aboutWin.h

src/aboutWin.o: src/aboutWin.h src/aboutWin.c src/funcs.h src/window.h
src/window.o: src/window.h src/window.c src/funcs.h

# Clean command for .o files and current Executable
clean:
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/3b631c69049a4d60880cead7b419e0a0)](https://app.codacy.com/gh/Arisamiga/Mnemosyne/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)

Mnemosyne is an open source disk utility application for AmigaOS 3.2, which can be used to show you what files and folders are taking up space on your disk.
Mnemosyne is an open source disk utility application for AmigaOS 3.x, which can be used to show you what files and folders are taking up space on your disk.

It is written in C and utilizes NDK 3.2 and ReAction.

Expand All @@ -24,11 +24,9 @@ It is written in C and utilizes NDK 3.2 and ReAction.

## Requirements

- AmigaOS 3.2
- AmigaOS 3.1 or higher

> If you want to use the GUI you will need at least AmigaOS 3.2.1
- ReAction
- ReAction ( **AmigaOS 3.1 and 3.1.4 require [ClassAct33](https://aminet.net/package/dev/gui/classact33) to work** )

## Installation

Expand Down
20 changes: 14 additions & 6 deletions aminet.readme
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ Short: Disk usage statistics+file/folder utility
Uploader: arisamiga@gmail.com (Aris Sokianos)
Author: Aris (arisamiga) Sokianos
Type: util/misc
Version: 1.0.1
Architecture: m68k-amigaos >= 3.2.1
Version: 1.0.2
Architecture: m68k-amigaos >= 3.0.0
Distribution: Aminet
Replaces: util/misc/Mnemosyne.lha

Mnemosyne is an open source disk utility application for AmigaOS 3.2,
Mnemosyne is an open source disk utility application for AmigaOS 3.x
which can be used to to see how much disk space your files and folders are taking up.

Features
Expand All @@ -28,9 +28,8 @@ Mnemosyne is coded in C and uses the NDK 3.2 and ReAction (For the GUI).

Requirements:

* AmigaOS 3.2
* If you want to use the GUI you will need at least AmigaOS 3.2.1
* ReAction
* AmigaOS 3.1 or higher
* ReAction ( AmigaOS 3.1 and 3.1.4 require [ClassAct33](https://aminet.net/package/dev/gui/classact33) to work)

You can find the source code of Mnemosyne on GitHub:
https://github.com/Arisamiga/Mnemosyne
Expand All @@ -42,6 +41,15 @@ https://github.com/Arisamiga/Mnemosyne/issues
------------------------------------------------------------------------------
**ChangeLog**

-> Update 1.0.2 (2023-10-27)
* Made Mnemosyne program able to be used on AmigaOS 3.1 and 3.1.4 and 3.9
(For AmigaOS 3.1 and 3.1.4 you need to install ClassAct33)
* Made Mnemosyne program from: 31.772B to 32.440B
* Changed layout to be more uniform across differnet AmigaOS versions
* Current version moving to 1.0.1 -> 1.0.2
* New Guide images updated to fit the version
* Replaced About window with a Requester.

-> Update 1.0.1 (2023-09-18)

* Fixed a lot of typos and grammar mistakes in the documentation and code. (Thanks to: @polluks)
Expand Down
Binary file modified build/Guide_Images/mnemosyne.iff
Binary file not shown.
Binary file modified build/Guide_Images/mnemosyne_back.iff
Binary file not shown.
Binary file modified build/Guide_Images/mnemosyne_folder_ready.iff
Binary file not shown.
Binary file modified build/Guide_Images/mnemosyne_ready.iff
Binary file not shown.
Binary file modified build/Guide_Images/mnemosyne_result.iff
Binary file not shown.
Binary file modified build/Guide_Images/mnemosyne_scanning.iff
Binary file not shown.
Binary file modified build/Guide_Images/pressdrawer.iff
Binary file not shown.
14 changes: 6 additions & 8 deletions build/Mnemosyne.guide
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@database Mnemosyne.guide

@author "Aris (Arisamiga) Sokianos"
@$VER: Mnemosyne.Guide 1.0.1
@$VER: Mnemosyne.Guide 1.0.2
@(c) 2023 Aris (Arisamiga) Sokianos
@Node "Main" "Mnemosyne"

Expand All @@ -15,11 +15,11 @@
|_| |_|_| |_|\\___|_| |_| |_|\\___/|___/\\___ |_| |_|\\___|
|___/

@{jright}Version 1.0.1
@{jright}Version 1.0.2

@{jcenter}

Mnemosyne is an open-source disk utility application for AmigaOS 3.2,
Mnemosyne is an open-source disk utility application for AmigaOS 3.x,
which can be used to see how much disk space your files and folders are taking up.


Expand All @@ -43,7 +43,7 @@ which can be used to see how much disk space your files and folders are taking u
@{b}About@{ub}
=====

Mnemosyne is an open-source disk utility application for AmigaOS 3.2,
Mnemosyne is an open-source disk utility application for AmigaOS 3.x,
which can be used to see how much disk space
Your files and folders are taking up.

Expand Down Expand Up @@ -79,13 +79,11 @@ Thank you so much for using Mnemosyne <3
@{b}Requirements@{ub}
==========

Mnemosyne requires AmigaOS 3.2 with at least 1MB of RAM.
Mnemosyne requires AmigaOS 3.1 or higher with at least 1MB of RAM.

(Note not all processors have been tested, but it should work on all)

Mnemosyne's GUI requires at least AmigaOS 3.2.1 to Correctly work.

Mnemosyne's CLI will work normally on AmigaOS 3.2.
( AmigaOS 3.1 and 3.1.4 require ClassAct33 to work )


@EndNode
Expand Down
Binary file modified images/mnemosyne.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/mnemosyneG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/mnemosyne_Gresult.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/mnemosyne_back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/mnemosyne_folder_ready.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/mnemosyne_ready.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/mnemosyne_result.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/mnemosyne_scanning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/pressdrawer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
93 changes: 0 additions & 93 deletions src/aboutWin.c

This file was deleted.

6 changes: 0 additions & 6 deletions src/aboutWin.h

This file was deleted.

19 changes: 18 additions & 1 deletion src/funcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ STRPTR floatToString(float num)
STRPTR ULongToString(ULONG num)
{
STRPTR buffer = AllocVec(64, MEMF_ANY);
SNPrintf(buffer, 64, "%lu", num);
snprintf(buffer, 64, "%lu", num);
return buffer;
}

Expand Down Expand Up @@ -218,3 +218,20 @@ char* getLastTwoChars(const char* str) {
return (char*)(str + length - 2);
}

char *string_to_lower(const char *text, size_t len)
{
char *result = AllocVec(len + 1, MEMF_ANY);
for (size_t i = 0; i < len; i++)
result[i] = tolower(text[i]);
result[len] = '\0';
return result;
}

size_t safeStrlen(const char *str)
{
size_t len = 0;
while (str[len] != '\0') {
len++;
}
return len;
}
2 changes: 2 additions & 0 deletions src/funcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ float stringToFloat(STRPTR);
char getLastCharSafely(const char*);
char* getLastTwoChars(const char*);
size_t strlcpy(char *dest, const char *source, size_t size);
char *string_to_lower(const char *, size_t);
size_t safeStrlen(const char *str);
#endif
48 changes: 27 additions & 21 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "window.h"

// Mnemosyne Version
char *vers = "\0$VER: Mnemosyne 1.0.1";
char *vers = "\0$VER: Mnemosyne 1.0.2";

struct IntuitionBase *IntuitionBase;
struct Library *UtilityBase;
Expand All @@ -14,51 +14,55 @@ struct Library *LayoutBase;
struct Library *ListBrowserBase;
struct Library *ButtonBase;
struct Library *GetFileBase;
struct Library *TextFieldBase;
struct Library *GadToolsBase;
struct Library *WorkbenchBase;

// Declare functions after main
void info(void);

BOOL openLibraries(void)
{
if (!(IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library", 47)))
if (!(IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library", 39)))
{
printf("Failed to open intuition.library! Make sure the version is above v47.\n");
printf("Failed to open intuition.library! Make sure the version is above v39.\n");
return FALSE;
}
if (!(UtilityBase = OpenLibrary("utility.library", 47)))
if (!(UtilityBase = OpenLibrary("utility.library", 39)))
{
printf("Failed to open utility.library! Make sure the version is above v47.\n");
printf("Failed to open utility.library! Make sure the version is above v39.\n");
return FALSE;
}
if (!(WindowBase = OpenLibrary("window.class", 47)))
if (!(WindowBase = OpenLibrary("window.class", 39)))
{
printf("Failed to open window.class! Make sure the version is above v47.\n");
printf("Failed to open window.class! Make sure the version is above v39.\n");
return FALSE;
}
if (!(LayoutBase = OpenLibrary("gadgets/layout.gadget", 47)))
if (!(LayoutBase = OpenLibrary("gadgets/layout.gadget", 39)))
{
printf("Failed to open gadgets/layout.gadget! Make sure the version is above v47.\n");
printf("Failed to open gadgets/layout.gadget! Make sure the version is above v39.\n");
return FALSE;
}
if (!(ListBrowserBase = OpenLibrary("gadgets/listbrowser.gadget", 47)))
if (!(ListBrowserBase = OpenLibrary("gadgets/listbrowser.gadget", 39)))
{
printf("Failed to open gadgets/listbrowser.gadget! Make sure the version is above v47.\n");
printf("Failed to open gadgets/listbrowser.gadget! Make sure the version is above v39.\n");
return FALSE;
}
if (!(ButtonBase = OpenLibrary("gadgets/button.gadget", 47)))
if (!(ButtonBase = OpenLibrary("gadgets/button.gadget", 39)))
{
printf("Failed to open gadgets/button.gadget! Make sure the version is above v47.\n");
printf("Failed to open gadgets/button.gadget! Make sure the version is above v39.\n");
return FALSE;
}
if (!(GetFileBase = OpenLibrary("gadgets/getfile.gadget", 47)))
if (!(GetFileBase = OpenLibrary("gadgets/getfile.gadget", 39)))
{
printf("Failed to open gadgets/getfile.gadget! Make sure the version is above v47.\n");
printf("Failed to open gadgets/getfile.gadget! Make sure the version is above v39.\n");
return FALSE;
}
if (!(TextFieldBase = OpenLibrary("gadgets/texteditor.gadget", 47)))
{
printf("Failed to open gadgets/texteditor.gadget! Make sure the version is above v47.\n");
if ((GadToolsBase = OpenLibrary("gadtools.library", 39)) == NULL) {
printf( "Failed to open gadtools.library! Make sure the version is above v39.\n");
return FALSE;
}
if ((WorkbenchBase = OpenLibrary("workbench.library", 39)) == NULL) {
printf( "Failed to open workbench.library! Make sure the version is above v39.\n");
return FALSE;
}

Expand All @@ -81,8 +85,10 @@ void closeLibraries(void)
CloseLibrary(ButtonBase);
if (GetFileBase)
CloseLibrary(GetFileBase);
if (TextFieldBase)
CloseLibrary(TextFieldBase);
if (GadToolsBase)
CloseLibrary(GadToolsBase);
if (WorkbenchBase)
CloseLibrary(WorkbenchBase);
}


Expand Down
Loading

0 comments on commit d715d2a

Please sign in to comment.