Browse Source

Basic cleanup

tags/0.1.0
Jake Wakeling 5 months ago
parent
commit
c23b093008
7 changed files with 37 additions and 49 deletions
  1. 2
    1
      .gitignore
  2. 7
    14
      CMakeLists.txt
  3. 3
    3
      README.md
  4. 21
    0
      include/liboar.h
  5. 0
    28
      include/oar.h
  6. 2
    2
      src/oar.c
  7. 2
    1
      src/oar.h

+ 2
- 1
.gitignore View File

@@ -1,3 +1,4 @@
bin/*
build/*
!build/CMAKE_WIN64.bat
!build/CMAKE_WIN64.bat
lib/*

+ 7
- 14
CMakeLists.txt View File

@@ -6,21 +6,14 @@ project(OmegaARc) # Project
set(CMAKE_C_STANDARD 11) # C Standard

# Output Directories
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/bin)

file(GLOB SOURCES src/*) # Add Source Files
add_library(oar ${SOURCES}) # Build Target
file(GLOB SOURCES src/* include/*) # Add Source Files
add_library(liboar ${SOURCES}) # Build Target

# Visual Studio Startup Project
set_property(
set_property( # Visual Studio Startup Project
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
PROPERTY VS_STARTUP_PROJECT oar
)
PROPERTY VS_STARTUP_PROJECT liboar
)

+ 3
- 3
README.md View File

@@ -1,7 +1,7 @@
# OmegaARc

OmegaARc or OAR is an experimental archive file format. Designed initially as a
modern replacement for the TAR archive format without unecesary bloat.
OmegaARc or OAR is an experimental archive file format. Intended initially as a
modern replacement for the TAR archive format without bloat.

The OAR archive format is designed for archival purposes, as such it does not
include support for file system permissions or system links. This makes the OAR
@@ -20,4 +20,4 @@ The OmegaARc archive file format specification can be found in the doc folder >
## Meta
Copyright (C) 2019, Jakob Wakeling
All rights reserved.
[OMKOV Open Source Licence](https://www.omkov.net/licences/ooss)
[OMKOV Open Source Licence](https://www.omkov.net/licences/ooss)

+ 21
- 0
include/liboar.h View File

@@ -0,0 +1,21 @@
// liboar.h
// Public header file for OmegaARc
// Copyright (c) 2019, Jakob Wakeling
// All rights reserved.

#ifndef LIBOAR_H
#define LIBOAR_H

#define OAR_H_VERSION 0x4F415200

#ifdef __cplusplus
extern "C" {
#endif

int oarCompress(char *oarPath, int fileCount, char *fileName[]);
int oarExtract(char *oarPath, char *extractPath);

#ifdef __cplusplus
}
#endif
#endif // LIBOAR_H

+ 0
- 28
include/oar.h View File

@@ -1,28 +0,0 @@
// oar.h
// Public header file for OmegaARc
// Copyright (c) 2019, Jake Wakeling
// All rights reserved.

#ifndef OAR_H
#define OAR_H

#define OAR_H_VERSION 0x4F415200
#define OAR_H_SIZE 128

#ifdef __cplusplus
extern "C" {
#endif

typedef struct oarHeader { // OmegaARc Header (128 Bytes)
char name[96]; // File Name (96 Bytes)
char size[24]; // File Size (24 Bytes)
char checksum[8]; // Header Checksum (8 Bytes)
} oarHeader;

int oarCompress(char *oarPath, int fileCount, char *fileName[]);
int oarExtract(char *oarPath, char *extractPath);

#ifdef __cplusplus
}
#endif
#endif

+ 2
- 2
src/oar.c View File

@@ -1,6 +1,6 @@
// main.h
// oar.c
// Main source file for OmegaARc
// Copyright (c) 2019, Jake Wakeling
// Copyright (c) 2019, Jakob Wakeling
// All rights reserved.

#define _CRT_SECURE_NO_WARNINGS

+ 2
- 1
src/oar.h View File

@@ -1,6 +1,6 @@
// oar.h
// Main header file for OmegaARc
// Copyright (c) 2019, Jake Wakeling
// Copyright (c) 2019, Jakob Wakeling
// All rights reserved.

#ifndef OAR_H
@@ -26,6 +26,7 @@ int oarExtract(char *oarPath, char *extractPath);

int fileAdd(FILE *oarFile, char *file, char *fileName);
oarHeader fileDecode(FILE *oarFile, uint headerSize);
int fileExtract(FILE *oarFile, char *file, int fileSize);
int fileExpand(FILE *oarFile, int amount, char value);

void WriteSignature(FILE *oarFile);

Loading…
Cancel
Save