-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from walkero-gr/selfupdate
Selfupdate
- Loading branch information
Showing
20 changed files
with
437 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,67 @@ | ||
<?xml version="1.0" ?> | ||
<CodeBench_Project name="MediaVault" path="Applications:Programming/workspace/MyProjects/mediavault/MediaVault.cbp" created="1353847454" lastmodified="1376952895"> | ||
<plugin name="PROGDIR:Plugins/AmigaOS4SDK.CCPlugin" flags="0"/> | ||
<target run="MediaVault"/> | ||
<homedir name="Applications:Programming/workspace/MyProjects/mediavault"/> | ||
<includedir name="Applications:Programming/workspace/MyProjects/mediavault/src"/> | ||
<compiler name="gcc:bin/gcc" switches="-Wall -Werror -Wwrite-strings -Wextra -O3" stack="131072"/> | ||
<linker switches="-lauto"/> | ||
<debugger name="SDK:c/gdb"/> | ||
<builder name="SDK:c/make -f"/> | ||
<environment tabsize="2"/> | ||
<CodeBench_Project name="MediaVault" path="Applications:Programming/workspace/MyProjects/mediavault/MediaVault.cbp" created="1353847454" lastmodified="1378293047"> | ||
<plugin name="PROGDIR:Plugins/AmigaOS4SDK.CCPlugin" flags="0" /> | ||
<target run="MediaVault" /> | ||
<homedir name="Applications:Programming/workspace/MyProjects/mediavault" /> | ||
<includedir name="Applications:Programming/workspace/MyProjects/mediavault/src" /> | ||
<compiler name="gcc:bin/gcc" switches="-Wall -Werror -Wwrite-strings -Wextra -O3" stack="131072" /> | ||
<linker switches="-lauto" /> | ||
<debugger name="SDK:c/gdb"/> | ||
<builder name="SDK:c/make -f" /> | ||
<environment tabsize="2" /> | ||
<headers> | ||
<file name="Applications:Programming/workspace/MyProjects/mediavault/src/libshandler.h" open="0"/> | ||
<file name="Applications:Programming/workspace/MyProjects/mediavault/src/mediavault.h" open="0"/> | ||
<file name="src/globals.h" open="1" top="0" left="0" line="24" row="28"/> | ||
<file name="src/upnpfuncs.h" open="0"/> | ||
<file name="Applications:Programming/workspace/MyProjects/mediavault/src/guifuncs.h" open="0"/> | ||
<file name="Applications:Programming/workspace/MyProjects/mediavault/src/version.h" open="1" top="0" left="0" line="35" row="24"/> | ||
<file name="Applications:Programming/workspace/MyProjects/mediavault/src/httpfuncs.h" open="0"/> | ||
<file name="src/gui.h" open="1" top="28" left="0" line="28" row="31"/> | ||
<file name="src/mainWin.h" open="0"/> | ||
<file name="src/aboutWin.h" open="0"/> | ||
<file name="src/radiofuncs.h" open="0"/> | ||
<file name="src/stringfuncs.h" open="1" top="0" left="0" line="22" row="28"/> | ||
<file name="Applications:Programming/workspace/MyProjects/mediavault/src/libshandler.h" open="0" /> | ||
<file name="Applications:Programming/workspace/MyProjects/mediavault/src/mediavault.h" open="0" /> | ||
<file name="src/globals.h" open="1" top="0" left="0" line="24" row="28" /> | ||
<file name="src/upnpfuncs.h" open="0" /> | ||
<file name="Applications:Programming/workspace/MyProjects/mediavault/src/guifuncs.h" open="0" /> | ||
<file name="Applications:Programming/workspace/MyProjects/mediavault/src/version.h" open="1" top="0" left="0" line="35" row="24" /> | ||
<file name="Applications:Programming/workspace/MyProjects/mediavault/src/httpfuncs.h" open="0" /> | ||
<file name="src/gui.h" open="1" top="28" left="0" line="28" row="31" /> | ||
<file name="src/mainWin.h" open="0" /> | ||
<file name="Applications:Programming/workspace/MyProjects/mediavault/src/fsfuncs.h" open="0" /> | ||
<file name="src/aboutWin.h" open="0" /> | ||
<file name="src/radiofuncs.h" open="0" /> | ||
<file name="src/stringfuncs.h" open="1" top="0" left="0" line="22" row="28" /> | ||
</headers> | ||
<sources> | ||
<file name="src/mediavault.c" open="0"/> | ||
<file name="src/libshandler.c" open="1" top="58" left="0" line="88" row="24"/> | ||
<file name="src/upnpfuncs.c" open="0"/> | ||
<file name="src/gui.c" open="1" top="84" left="0" line="110" row="0"/> | ||
<file name="src/httpfuncs.c" open="1" current="1" top="0" left="0" line="12" row="2"/> | ||
<file name="src/guifuncs.c" open="0"/> | ||
<file name="src/mainWin.c" open="1" top="139" left="0" line="147" row="26"/> | ||
<file name="src/aboutWin.c" open="0"/> | ||
<file name="src/radiofuncs.c" open="1" top="211" left="0" line="270" row="0"/> | ||
<file name="src/stringfuncs.c" open="1" top="10" left="0" line="26" row="84"/> | ||
<file name="src/mediavault.c" open="0" /> | ||
<file name="src/libshandler.c" open="1" top="58" left="0" line="88" row="24" /> | ||
<file name="src/upnpfuncs.c" open="0" /> | ||
<file name="src/gui.c" open="1" top="0" left="0" line="110" row="0" /> | ||
<file name="src/httpfuncs.c" open="0" /> | ||
<file name="src/fsfuncs.c" open="1" top="0" left="0" line="32" row="0" /> | ||
<file name="src/guifuncs.c" open="1" current="1" top="550" left="0" line="593" row="8" /> | ||
<file name="src/mainWin.c" open="0" /> | ||
<file name="src/aboutWin.c" open="0" /> | ||
<file name="src/radiofuncs.c" open="0" /> | ||
<file name="src/stringfuncs.c" open="0" /> | ||
</sources> | ||
<others> | ||
<file name="CHANGELOG.md" open="0"/> | ||
<file name="README.md" open="0"/> | ||
<file name="os4depot.readme" open="0"/> | ||
<file name="Makefile" open="0"/> | ||
<file name=".gitignore" open="0"/> | ||
<file name="CHANGELOG.md" open="0" /> | ||
<file name="README.md" open="0" /> | ||
<file name="os4depot.readme" open="0" /> | ||
<file name="Makefile" open="0" /> | ||
<file name=".gitignore" open="0" /> | ||
</others> | ||
<flags value="0x0000000000068005"/> | ||
<buildscript name="Makefile" depth="3" open="0"/> | ||
<projectnotes open="0"/> | ||
<buildwindow open="0"/> | ||
<flags value="0x0000000000068001" /> | ||
<buildscript name="Makefile" depth="3" open="0" /> | ||
<projectnotes open="0" /> | ||
<buildwindow open="1" /> | ||
<targets> | ||
<target name="MediaVault" linker="gcc:bin/gcc" switches="-lcurl -lrtmp -lssl -lcrypto -lz -lpthread" flags="0x00000002"> | ||
<file name="src/mediavault.c"/> | ||
<file name="src/libshandler.c"/> | ||
<file name="src/gui.c"/> | ||
<file name="src/mainWin.c"/> | ||
<file name="src/guifuncs.c"/> | ||
<file name="src/aboutWin.c"/> | ||
<file name="src/httpfuncs.c"/> | ||
<file name="src/radiofuncs.c"/> | ||
<file name="src/stringfuncs.c"/> | ||
<target name="MediaVault" linker="gcc:bin/gcc" switches="-lcurl -lrtmp -lssl -lcrypto -lz -lpthread" flags="0x00000002" > | ||
<file name="src/mediavault.c" /> | ||
<file name="src/libshandler.c" /> | ||
<file name="src/gui.c" /> | ||
<file name="src/mainWin.c" /> | ||
<file name="src/guifuncs.c" /> | ||
<file name="src/aboutWin.c" /> | ||
<file name="src/httpfuncs.c" /> | ||
<file name="src/radiofuncs.c" /> | ||
<file name="src/stringfuncs.c" /> | ||
<file name="src/fsfuncs.c" /> | ||
</target> | ||
</targets> | ||
<logfile name="RAM Disk:Build.log"/> | ||
<logfile name="RAM Disk:Build.log" /> | ||
<search lastsearch="unicode" sensecase="1" replace_state="0"/> | ||
</CodeBench_Project> | ||
</CodeBench_Project> |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
|
||
|
||
|
||
|
||
#include "globals.h" | ||
#include "httpfuncs.h" | ||
|
||
STRPTR getFilePath(STRPTR filename) | ||
{ | ||
STRPTR appPath = IExec->AllocVecTags(sizeof(char) * 255, | ||
AVT_Type, MEMF_SHARED, | ||
AVT_ClearWithValue, "\0", | ||
TAG_DONE); | ||
|
||
BPTR fileLock = IDOS->Lock(filename, SHARED_LOCK); | ||
if (fileLock) | ||
{ | ||
IDOS->NameFromLock(fileLock, appPath, sizeof(char) * 255); | ||
|
||
IDOS->UnLock(fileLock); | ||
//IExec->FreeVec(appPath); | ||
return appPath; | ||
} | ||
|
||
return NULL; | ||
} | ||
|
||
STRPTR getParentPath(STRPTR filename) | ||
{ | ||
STRPTR appPath = IExec->AllocVecTags(sizeof(char) * 255, | ||
AVT_Type, MEMF_SHARED, | ||
AVT_ClearWithValue, "\0", | ||
TAG_DONE); | ||
|
||
BPTR fileLock = IDOS->Lock(filename, SHARED_LOCK); | ||
if (fileLock) | ||
{ | ||
BPTR folderLock = IDOS->ParentDir(fileLock); | ||
BPTR parentLock = IDOS->ParentDir(folderLock); | ||
IDOS->NameFromLock(parentLock, appPath, sizeof(char) * 255); | ||
|
||
IDOS->UnLock(parentLock); | ||
IDOS->UnLock(folderLock); | ||
IDOS->UnLock(fileLock); | ||
//IExec->FreeVec(appPath); | ||
return appPath; | ||
} | ||
|
||
return NULL; | ||
|
||
} | ||
|
||
BOOL downloadLatestUpdate(STRPTR releaseUrl) | ||
{ | ||
return downloadFile(releaseUrl, (STRPTR)"mediavault_update", (STRPTR)"RAM:"); | ||
} | ||
|
||
int32 unarcFile(STRPTR filename, STRPTR targetFolder) | ||
{ | ||
BPTR fileLock = IDOS->Lock(filename, SHARED_LOCK); | ||
if (fileLock) | ||
{ | ||
STRPTR cmd = IUtility->ASPrintf("c:xadUnFile FROM \"%s\" DESTDIR %s OW Q ", filename, targetFolder); | ||
|
||
int32 result = IDOS->SystemTags( cmd, | ||
SYS_Input, ZERO, | ||
SYS_Output, NULL, | ||
SYS_Error, ZERO, | ||
SYS_Asynch, FALSE, | ||
TAG_DONE); | ||
|
||
IDOS->UnLock(fileLock); | ||
return result; | ||
} | ||
|
||
return -2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
************************************************************ | ||
** | ||
** Created by: codebench 0.55 (19.10.2017) | ||
** | ||
** Project: MediaVault | ||
** | ||
** File: fsfuncs.h | ||
** | ||
** Date: 17-04-2021 10:59:22 | ||
** | ||
************************************************************ | ||
*/ | ||
|
||
|
||
#ifndef _FSFUNCS_H | ||
#define _FSFUNCS_H | ||
|
||
STRPTR getFilePath(STRPTR); | ||
STRPTR getParentPath(STRPTR); | ||
BOOL downloadLatestUpdate(STRPTR); | ||
int32 unarcFile(STRPTR, STRPTR); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.