Skip to content

Commit

Permalink
made everything (hopefully) a little less fucky
Browse files Browse the repository at this point in the history
  • Loading branch information
karwler committed May 14, 2018
1 parent a172971 commit 6e0006f
Show file tree
Hide file tree
Showing 94 changed files with 6,650 additions and 10,308 deletions.
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include/* linguist-vendored
jquery.js linguist-vendored=false
include/* linguist-vendored
jquery.js linguist-vendored=false
52 changes: 26 additions & 26 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
#directories
bin
build*
CMakeFiles

#hidden files and directories
.*

#files
*.o
*.obj
*.out
*.res
*.ilk
*.idb
*.pdb
*.log
*.autosave
*.user
*.sdf
*.sln
*.vcxproj
*.filters
*.cmake
*.opendb
Makefile
#directories
bin
build*
CMakeFiles

#hidden files and directories
.*

#files
*.o
*.obj
*.out
*.res
*.ilk
*.idb
*.pdb
*.log
*.autosave
*.user
*.sdf
*.sln
*.vcxproj
*.filters
*.cmake
*.opendb
Makefile
38 changes: 12 additions & 26 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,56 +1,43 @@
# project properties
cmake_minimum_required(VERSION 3.1.0)
cmake_policy(SET CMP0015 NEW)
cmake_policy(SET CMP0043 NEW)

project(VertiRead LANGUAGES CXX)
set(CMAKE_CONFIGURATION_TYPES "Debug" "Release")
set(CMAKE_BUILD_TYPE "Debug")
#set(CMAKE_CONFIGURATION_TYPES "Debug" "Release")

# source files
set(SRC_FILES
"src/engine/audioSys.cpp"
"src/engine/audioSys.h"
"src/engine/base.cpp"
"src/engine/base.h"
"src/engine/drawSys.cpp"
"src/engine/drawSys.h"
"src/engine/filer.cpp"
"src/engine/filer.h"
"src/engine/inputSys.cpp"
"src/engine/inputSys.h"
"src/engine/library.cpp"
"src/engine/library.h"
"src/engine/main.cpp"
"src/engine/scene.cpp"
"src/engine/scene.h"
"src/engine/windowSys.cpp"
"src/engine/windowSys.h"
"src/engine/world.cpp"
"src/engine/world.h"
"src/kklib/aliases.h"
"src/kklib/grid2.h"
"src/kklib/sptr.h"
"src/kklib/vec2.h"
"src/kklib/vec3.h"
"src/kklib/vec4.h"
"src/prog/browser.cpp"
"src/prog/browser.h"
"src/prog/defaults.h"
"src/prog/player.cpp"
"src/prog/player.h"
"src/prog/playlistEditor.cpp"
"src/prog/playlistEditor.h"
"src/prog/program.cpp"
"src/prog/program.h"
"src/utils/capturers.cpp"
"src/utils/capturers.h"
"src/utils/items.cpp"
"src/utils/items.h"
"src/utils/scrollAreas.cpp"
"src/utils/scrollAreas.h"
"src/prog/progs.cpp"
"src/prog/progs.h"
"src/utils/layouts.cpp"
"src/utils/layouts.h"
"src/utils/settings.cpp"
"src/utils/settings.h"
"src/utils/types.cpp"
"src/utils/types.h"
"src/utils/utils.cpp"
"src/utils/utils.h"
"src/utils/vec2.h"
"src/utils/widgets.cpp"
"src/utils/widgets.h")

Expand Down Expand Up @@ -117,7 +104,7 @@ endif()

# set main target
add_executable(VertiRead ${SRC_FILES})
target_compile_features(VertiRead PUBLIC cxx_nullptr cxx_enum_forward_declarations cxx_variadic_templates cxx_alias_templates cxx_raw_string_literals cxx_unicode_literals cxx_long_long_type cxx_rvalue_references)
target_compile_features(VertiRead PUBLIC cxx_aggregate_default_initializers cxx_alias_templates cxx_alignas cxx_alignof cxx_attributes cxx_constexpr cxx_contextual_conversions cxx_decltype cxx_default_function_template_args cxx_defaulted_functions cxx_defaulted_move_initializers cxx_delegating_constructors cxx_deleted_functions cxx_enum_forward_declarations cxx_explicit_conversions cxx_extended_friend_declarations cxx_extern_templates cxx_final cxx_func_identifier cxx_generalized_initializers cxx_inheriting_constructors cxx_inline_namespaces cxx_local_type_template_args cxx_long_long_type cxx_noexcept cxx_nonstatic_member_init cxx_nullptr cxx_override cxx_range_for cxx_raw_string_literals cxx_reference_qualified_functions cxx_right_angle_brackets cxx_rvalue_references cxx_sizeof_member cxx_strong_enums cxx_unicode_literals cxx_uniform_initialization cxx_unrestricted_unions cxx_user_literals cxx_variadic_macros cxx_variadic_templates cxx_template_template_parameters)

# linker flags
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
Expand Down Expand Up @@ -160,7 +147,7 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
endif()
add_custom_command(TARGET VertiRead POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/rsc/icon.ico ${EXECUTABLE_OUTPUT_PATH}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/data ${EXECUTABLE_OUTPUT_PATH})
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/rsc/data ${EXECUTABLE_OUTPUT_PATH})

# filter file for ms visual studio
foreach(source IN LISTS SRC_FILES)
Expand All @@ -177,4 +164,3 @@ foreach(source IN LISTS SRC_FILES)
endif()
source_group("${filter_path}" FILES ${source})
endforeach()

82 changes: 41 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
# VertiRead
A simple manga reader and music player for Linux and Windows.
So far it's usable for reading, playing music and basic playlist editing.
It still has some bugs and untested parts.

Used libraries are SDL2, SDL2_image, SDL2_ttf and SDL2_mixer.
The minimum required Cmake version is 3.1.0 and your compiler needs to support at least C++11.

Note: When setting the output directory in Qt, don’t name it ‘build’, cause it might mess up the executable’s location.

## Linux
All dependencies need to be installed manually.
Installing the packages "libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev" should do the trick. (Assuming that all necessary dependencies for those are installed automatically in the process.)
The default font is set to "Arial", so you probably need to install some kind of "ttf-ms-fonts" package.
If you don't want to install any new fonts, you can just change the default font in the "src/prog/defaults.h" file.

There’s a pre-made launcher, which is copied to the build directory after compilation.
If you want a menu entry for the program, just set the executable’s and icon’s path in the .desktop file and move it to either "/usr/share/applications" or "~/.local/share/applications".

Settings files are being saved in "~/.vertiread".
Note: It's possible that the mouse wheel won't work properly under Linux and I have no idea why.

## Windows
All necessary libraries are already included in the project. However they're built for the MSVC. If you're using a different compiler, you'll need to replace the existing library files or link the new ones.
Settings files are being saved in "%AppData%\VertiRead".

## How to use it
The idea is that you have a library directory in which you have your manga. The location of this directory can be viewed and/or changed in the general settings menu.
It is advised (but not necessary) to sort the files and directories by things like chapters, volumes, etc.
Left clicking on a book in the book list wil take you to the file explorer, while right clicking on a book will take you to the last viewed page.
Opening an image file opens the reader, which displays all images in the directory of the chosen file.
The reader has a hidden side pane on the left. The top two buttons are for switching between directories. (This doesn’t work recursively.)

You can create playlists and assign them to specific manga, using the editor. In the playlist editor you can add either single files or entire directories of songs to a playlist. The file browser can be a bit of a pain, so you can just use drag and drop instead.
All playlists are saved and looked up in the playlist directory, which can be viewed and/or changed in the general settings menu.
The reader has a hidden player at the bottom.

The program supports keyboard and controller bindings. DirectInput and XInput are handled separately. The key bindings can be viewed and/or edited in the controls settings menu.

To reset certain groups of settings, edit or delete the corresponding ini files in the settings directory.
Note: If the dead zone is set too low, lists might scroll on their own or the mouse cursor might move on its own.
# VertiRead
A simple manga reader and music player for Linux and Windows.
So far it's usable for reading, playing music and basic playlist editing.
It still has some bugs and untested parts.

Used libraries are SDL2, SDL2_image, SDL2_ttf and SDL2_mixer.
The minimum required Cmake version is 3.1.0 and your compiler needs to support at least C++11.

Note: When setting the output directory in Qt, don’t name it ‘build’, cause it might mess up the executable’s location.

## Linux
All dependencies need to be installed manually.
Installing the packages "libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev" should do the trick. (Assuming that all necessary dependencies for those are installed automatically in the process.)
The default font is set to "Arial", so you probably need to install some kind of "ttf-ms-fonts" package.
If you don't want to install any new fonts, you can just change the default font in the "src/prog/defaults.h" file.

There’s a pre-made launcher, which is copied to the build directory after compilation.
If you want a menu entry for the program, just set the executable’s and icon’s path in the .desktop file and move it to either "/usr/share/applications" or "~/.local/share/applications".

Settings files are being saved in "~/.vertiread".
Note: It's possible that the mouse wheel won't work properly under Linux and I have no idea why.

## Windows
All necessary libraries are already included in the project. However they're built for the MSVC. If you're using a different compiler, you'll need to replace the existing library files or link the new ones.
Settings files are being saved in "%AppData%\VertiRead".

## How to use it
The idea is that you have a library directory in which you have your manga. The location of this directory can be viewed and/or changed in the general settings menu.
It is advised (but not necessary) to sort the files and directories by things like chapters, volumes, etc.
Left clicking on a book in the book list wil take you to the file explorer, while right clicking on a book will take you to the last viewed page.
Opening an image file opens the reader, which displays all images in the directory of the chosen file.
The reader has a hidden side pane on the left. The top two buttons are for switching between directories. (This doesn’t work recursively.)

You can create playlists and assign them to specific manga, using the editor. In the playlist editor you can add either single files or entire directories of songs to a playlist. The file browser can be a bit of a pain, so you can just use drag and drop instead.
All playlists are saved and looked up in the playlist directory, which can be viewed and/or changed in the general settings menu.
The reader has a hidden player at the bottom.

The program supports keyboard and controller bindings. DirectInput and XInput are handled separately. The key bindings can be viewed and/or edited in the controls settings menu.

To reset certain groups of settings, edit or delete the corresponding ini files in the settings directory.
Note: If the dead zone is set too low, lists might scroll on their own or the mouse cursor might move on its own.
15 changes: 8 additions & 7 deletions TODO.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
arrow keys/hats navigation
horizontal scroll
more lineedit edit options
refactor item selection system
refactor draw calculations
animations?
event system?
check editor and playlists
adjust scroll speed
improve exception handling
test sdl_texteditingevent

advanced book adding
arrow keys/hats navigation
multiple scroll modes for reader
111 changes: 0 additions & 111 deletions VertiRead.pro

This file was deleted.

11 changes: 0 additions & 11 deletions data/themes.ini

This file was deleted.

20 changes: 0 additions & 20 deletions lib/COPYING_SDL2.txt

This file was deleted.

Loading

0 comments on commit 6e0006f

Please sign in to comment.