Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Man pages #11

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
885ce70
Include <string.h>
Traace Feb 12, 2019
f617564
Initial support for compiling from source.
hackerb9 Oct 10, 2019
7fef439
Don't include binaries in standard source code. (Should be in releases).
hackerb9 Oct 10, 2019
87f66f0
Fix recursive make to be conditional on cd
hackerb9 Oct 10, 2019
6619412
Fix up recursive make properly use $(MAKE), -k, and -C
hackerb9 Oct 10, 2019
f1ce18e
Fix 'make clean' to clean the right directory
hackerb9 Oct 10, 2019
5ad7c2e
make clean shouldn't return an error if .o files don't exist
hackerb9 Oct 10, 2019
1f8773b
make clean shouldn't return an error if .o files don't exist
hackerb9 Oct 10, 2019
b417a97
Don't include binaries in source code
hackerb9 Oct 10, 2019
5d299e9
.h files should not be executable.
hackerb9 Oct 10, 2019
5f51dc4
.c files should not be executable
hackerb9 Oct 10, 2019
f37ccc3
Don't call binary binhack32 (or 64). Just binhack.
hackerb9 Oct 10, 2019
b33e64d
Don't include upx binary in source.
hackerb9 Oct 10, 2019
60ed897
Use system upx if available. Ignore upx, if not.
hackerb9 Oct 10, 2019
1d757bf
Ignore upx in "all" target as well as "linux".
hackerb9 Oct 10, 2019
62ca7d3
"linux" target shouldn't duplicate code from "all"
hackerb9 Oct 10, 2019
c8a1b57
Add -Wno-narrowing to ignore C++ narrowing errors
hackerb9 Oct 10, 2019
585ff1c
Ignore BLOCKSIZE in du if user set it
hackerb9 Oct 10, 2019
de6b850
Upx is way to garrulous. Make it quieter with -qq.
hackerb9 Oct 11, 2019
8bcc403
Remove -Wno-narrowing ugliness. Fix C++ error by using UNSIGNED char …
hackerb9 Oct 11, 2019
465ddd7
Use cleaner sed syntax. No need to ignore errors from mkdir -p.
hackerb9 Oct 11, 2019
48bc65b
Add back in removing the build directory upon 'make clean'
hackerb9 Oct 11, 2019
2e2a559
Install binaries recursively
hackerb9 Oct 11, 2019
4545ce7
Use leading dash syntax instead of "|| true"
hackerb9 Oct 11, 2019
5fabf10
Rename 'build' target to 'compile'
hackerb9 Oct 11, 2019
3e6e7bb
Replace gets() with fgets()
hackerb9 Oct 11, 2019
b314209
#include common.h to define fwrite_as_big()
hackerb9 Oct 11, 2019
1d8b262
Add #include unistd.h for chdir()
hackerb9 Oct 11, 2019
686fea8
#include <stdio.h> for fgets
hackerb9 Oct 11, 2019
7a44779
Remove vestigal "compile_res" target
hackerb9 Oct 11, 2019
657e952
Don't recompile if the source files haven't changed.
hackerb9 Oct 11, 2019
6d3b49c
MacOS and Linux compiling are equivalent
hackerb9 Oct 11, 2019
b4790bb
Don't recompile if source hasn't changed.
hackerb9 Oct 11, 2019
7a57d9e
Don't recompile if source code hasn't changed
hackerb9 Oct 11, 2019
ba7011e
Ignore binary files in git
hackerb9 Oct 11, 2019
6d9bb5f
Use binhack, not binhack32
hackerb9 Oct 13, 2019
6981436
Use binhack, not binhack32
hackerb9 Oct 13, 2019
682c190
Don't wait for user to hit ENTER before exiting
hackerb9 Oct 13, 2019
72226a5
Don't wait for user to hit ENTER before exiting
hackerb9 Oct 13, 2019
ac2dc03
add 'make test' target to run the test script
hackerb9 Oct 13, 2019
45549d1
Don't wait for user to hit ENTER before exiting
hackerb9 Oct 13, 2019
f510dab
Don't wait for user to hit ENTER before exiting
hackerb9 Oct 13, 2019
c86e669
Make the build_linux and clean_linux scripts executable
hackerb9 Oct 13, 2019
c9708eb
Fixed debian package build to include binaries
hackerb9 Oct 13, 2019
82b8eac
Create new man page for cdirip.
hackerb9 Oct 13, 2019
5919fd9
cdirip was written by Nold, right?
hackerb9 Oct 14, 2019
c246a3d
Created man page for burncdi
hackerb9 Oct 14, 2019
bdd3cfc
fix double quotes within double quotes
hackerb9 Oct 14, 2019
ec971bc
Use a search path for the IP.BIN files
hackerb9 Oct 14, 2019
ec412fe
Add fallback if no directory with IP.BIN exists
hackerb9 Oct 14, 2019
ca85dde
Typos
hackerb9 Oct 14, 2019
2a6b3d7
Do not edit mksdiso script using sed from Makefile
hackerb9 Oct 14, 2019
c5c69f7
Created man page for mksdiso
hackerb9 Oct 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
build
src/binhack/bin/binhack
src/cdirip/cdirip
src/isofix/isofix
src/scramble/scramble
50 changes: 31 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,37 +1,49 @@
VERSION=$(shell gawk '/^VERSION/ {print $1}' bin/mksdiso | cut -f2 -d\")
BUILD_DIR=build/mksdiso-$(VERSION)-all

default:
default: compile

help:
@echo "Usage: make <package|install|clean>"
@echo " package | Build debian Package"
@echo " install | install to /usr/local/bin"
@echo " clean | cleanup package build directory"
@echo " clean | cleanup object files and package build directory"
exit 0

package:
compile:
$(MAKE) -C src

package: compile
mkdir -p $(BUILD_DIR)/usr/bin $(BUILD_DIR)/usr/share/mksdiso $(BUILD_DIR)/DEBIAN
cp debian/control $(BUILD_DIR)/DEBIAN/
cp bin/* $(BUILD_DIR)/usr/bin/
cp src/binhack/bin/binhack $(BUILD_DIR)/usr/bin/
cp src/cdirip/cdirip $(BUILD_DIR)/usr/bin/
cp src/isofix/isofix $(BUILD_DIR)/usr/bin/
cp src/makeip/makeip $(BUILD_DIR)/usr/bin/
cp src/scramble/scramble $(BUILD_DIR)/usr/bin/
cp -r mksdiso/* $(BUILD_DIR)/usr/share/mksdiso/
sed -i 's/^DATADIR=.*/DATADIR=\/usr\/share\/mksdiso/' $(BUILD_DIR)/usr/bin/mksdiso
sed -i 's/^Version:.*/Version:\ $(VERSION)/' $(BUILD_DIR)/DEBIAN/control
dpkg-deb --build $(BUILD_DIR)

# Local install, modifes mksdiso-data-path to /usr/local/share/mksdiso
install:
cp -r bin/* /usr/local/bin/
sed -i 's/^DATADIR=.*/DATADIR=\/usr\/local\/share\/mksdiso/' /usr/local/bin/mksdiso
mkdir -p /usr/local/share || true
# Local sysadmin install goes to /usr/local/
install: compile
$(MAKE) -C src install
mkdir -p /usr/local/share
cp -r mksdiso /usr/local/share/
cp -r bin/* /usr/local/bin/

uninstall:
rm -r /usr/local/share/mksdiso || true
rm /usr/local/bin/mksdiso || true
rm /usr/local/bin/cdirip || true
rm /usr/local/bin/isofix || true
rm /usr/local/bin/binhack32 || true
rm /usr/local/bin/burncdi || true
rm /usr/local/bin/scramble || true

clean:
rm -r build/
-rm -r /usr/local/share/mksdiso
-rm /usr/local/bin/mksdiso
-rm /usr/local/bin/cdirip
-rm /usr/local/bin/isofix
-rm /usr/local/bin/binhack
-rm /usr/local/bin/burncdi
-rm /usr/local/bin/scramble

clean-package:
-rm -r $(BUILD_DIR)

clean: clean-package
$(MAKE) -C src clean
Binary file removed bin/binhack32
Binary file not shown.
Binary file removed bin/binhack64
Binary file not shown.
1 change: 1 addition & 0 deletions bin/burncdi
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ if [ -d ${EXT_DIR} ] ; then
show_help "ERROR while unpacking CDI using cdirip!"
fi

unset BLOCKSIZE # In case user set blocksize=human for du.
if [ $(du -s ${EXT_DIR} 2> /dev/null | awk '{print $1}') -ge 700000 -a "$OVERBURN" == "" ] ; then
echo "---------------------------------------------------"
echo "CRITICAL_ERROR: Extracted files are too big, to fit on a CD-R..."
Expand Down
Binary file removed bin/cdirip
Binary file not shown.
Binary file removed bin/isofix
Binary file not shown.
44 changes: 28 additions & 16 deletions bin/mksdiso
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,35 @@ IFS=$'\n'
VERSION="0.9.2"
echo "mksdiso Ver. $VERSION | By Nold 2013-2017 | Visit: https://nold.in"

# Directory which includes the IP.BIN files included in mksdiso source git
DATADIR=$HOME/.mksdiso

# Set save defaults
DEL_IN_DIR=0

# Directory which includes the IP.BIN files included in mksdiso source git
DATADIR=$HOME/.mksdiso
for d in $HOME/.mksdiso {$HOME/.local,/usr/local,/usr}/share/mksdiso; do
if [[ -d "$d" ]]; then
if [[ -s "$d/katana/IP.BIN" || -s "$d/homebrew/IP.BIN" ]]; then
DATADIR="$d"
break
fi
fi
done

function usage() {
echo "Usage: $(basename $0) < -h | -k > <INPUT-DIR/-ISO/-CDI> [OUTPUT-DIR/-ISO]"
echo "This script convertes a "normal" Dreamcast game image into a SD-ISO-Image"
echo "For usage with Dreamshell ISO-Loader"
echo
echo "Paramaters:"
echo -e "\t-h | Create ISO from Homebrew"
echo -e "\t-k | Create ISO from Katana Image\n"
echo
echo "Supported Source-Files: CDI, ISO, Directory"
echo "Feel free to open issues/contribute at https://github.com/nold360/mksdiso"
cat <<EOF
Usage: $(basename $0) < -h | -k > <INPUT-DIR/-ISO/-CDI> [OUTPUT-DIR/-ISO]

This script converts a "normal" Dreamcast game image into a SD-ISO-Image
for usage with Dreamshell ISO-Loader.

Parameters:
-h | Create ISO from Homebrew
-k | Create ISO from Katana Image

Supported Source-Files: CDI, ISO, Directory

Feel free to open issues/contribute at https://github.com/nold360/mksdiso
EOF
}

# Check for needed binaries
Expand All @@ -36,7 +48,7 @@ function check_dependencies() {
ISOTOOL=mkisofs
fi

for bin in binhack32 cdirip isofix scramble 7z; do
for bin in binhack cdirip isofix scramble 7z; do
if ! type $bin &>/dev/null ; then
echo "Please install $bin or include it in \$PATH"
exit 1
Expand Down Expand Up @@ -71,9 +83,9 @@ function hack_lba() { #ARGs: target-dir
fi
fi

# FIXME: Copy IP.BIN, Workaround for binhack32 :/
# FIXME: Copy IP.BIN, Workaround for binhack :/
cp ${DATADIR}/katana/IP.BIN IP.BIN
echo -e -n "${1}/1ST_READ.BIN\nIP.BIN\n0\n" | binhack32
echo -e -n "${1}/1ST_READ.BIN\nIP.BIN\n0\n" | binhack
rm IP.BIN
return 0
}
Expand Down
Binary file removed bin/scramble
Binary file not shown.
113 changes: 113 additions & 0 deletions share/man/man1/burncdi.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
.TH BURNCDI 1
.SH NAME
burncdi \- Burn a DiscJuggler CDI image directly to a CD-R.
.
.
.\" ====================================================================
.SH SYNOPSIS
.\" ====================================================================
.
.SY burncdi
.I image.cdi
.OP \-f
.OP \-c CDRW-DRIVE
.I CDI-File
.YS
.
.
.\" ====================================================================
.SH DESCRIPTION
.\" ====================================================================
.
The
.B burncdi
program is part of the
.I mksdiso
free software collection of Sega Dreamcast utilities available at
.UR https://\:github.com/Nold360/mksdiso
Nold360's Github
.UE .
.
.P
The
.B burncdi
program is a wrapper around
.IR cdirip (1)
and
.IR wodim (1)
or
.IR cdrecord (1).
It both converts a file from DiscJuggler CDI format and burns the
result to a CD-R. Temporary files are automatically cleaned up.
.
.
.\" ====================================================================
.SH OPTIONS
.\" ====================================================================
.
.TP
.BI \-f
Force burning of image & enable overburning.
.
.TP
.B \-c \fICDRW-DRIVE\fR
Specify path to CD writer if not /dev/cdrw.
.
.TP
.I CDI-FIle
A file in DiscJuggler's CDI format. Often this will be a bootable
.I SEGA Dreamcast
disc.
.
.\" ====================================================================
.SH "USING BURNCDI"
.\" ====================================================================
.
Place a blank CD-R in the drive and simply run
.B burncdi
with the name of your .cdi file. After a short time, you should have a
usable disc written with proper audio and data sessions.
.IP
.EX
burncdi foo.cdi
.EE
.
.P
Note that you will need to have enough free space in /tmp to hold the
uncompressed disc image and audio files. Temporary files will be
deleted when
.BR burncdi
exits.
.
.\" ====================================================================
.SH BUGS
.\" ====================================================================
.
None?
.
.\" ====================================================================
.SH AUTHORS
.\" ====================================================================
.
.B burncdi
was written by
.UR https://nold.in/
Nold
.UE .
.
.\" ====================================================================
.SH "SEE ALSO"
.\" ====================================================================
.
.BR cdirip (1),
.BR wodim (1),
.BR cdrecord (1).
.
.\" ====================================================================
.\" Emacs setup
.\" ====================================================================
.
.\" Local Variables:
.\" mode: nroff
.\" End:
.\" vim: set filetype=groff:
Loading