Skip to content

Commit

Permalink
Updates to the project's documentation and logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mmponn committed Jan 3, 2022
1 parent bd0518a commit 382e185
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 11 deletions.
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -355,5 +355,4 @@ notice described in Exhibit B of this License must be attached.
License Addendum A
==================

This Source Code Form is COMPATIBLE With Secondary Licenses, as
described by the Mozilla Public License, v. 2.0.
This Source Code Form is COMPATIBLE With Secondary Licenses.
40 changes: 32 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,33 @@ Valbak is a work in progress, but it already works well enough to fulfill its in
Valheim is a challenging open world game where it is not uncommon for players to spend dozens of hours or more
building and customizing their individual game worlds and characters.

Thus any circumstance that results in the loss of a saved game file can be devastating.
Thus any circumstance that results in the loss of a saved game file can be emotionally devastating.

One such circumstance is, when used in conjunction with Steam Cloud, Valheim can occasionally lose many hours of saved
game play.
One such circumstance is, when used in conjunction with Steam Cloud Sync, Valheim can occasionally lose many hours of
saved game play.

After losing dozens of hours of saved game files several times, the author of Valbak felt that in order to continue
playing Valheim, a solution to this problem must be invented.
After, on several occasions, losing dozens of hours of saved game files, the author of Valbak felt that in order to
continue playing Valheim, a solution to this problem must be created.

Could another backup solution have worked without requiring the authoring of Valbak? Probably yes, however, at the time,
the problem seemed to present a convenient opportunity for learning and gaining firsthand experience developing software
using the [Rust programming language](https://www.rust-lang.org/) in a medium-small sized project.
Could another existing backup solution have worked without requiring the creation of Valbak? Probably yes, however at
the time the problem seemed to present a convenient opportunity to learn and gain firsthand experience developing
software using the [Rust programming language](https://www.rust-lang.org/) in a medium-small sized project.

## Installation

Find and download the latest stable [release](https://github.com/mmponn/valbak/releases). There is no installer, and so
the executable can be launched from any directory.

## Uninstall

To delete Valbak, simply delete the Valbak executable.

Valbak stores copies of game files to a directory specified by the user. The suggested default is a `Valbak` directory
in the user's `Documents` directory.

Valbak also stores configuration and logging files in `%APPDATA%\valbak`.

No other files or registry entries are touched.

## Architecture

Expand All @@ -35,6 +51,14 @@ out-of-the-box [File Chooser widget](https://www.fltk.org/doc-1.3/classFl__File_
This project is licensed under the [Mozilla Public License Version 2 with support for Secondary Licenses (e.g. GPL,
LGPL)](LICENSE).

Although the MPL license is not as common as the MIT or Apache licenses it is an important open source license that, in
a nutshell, permits this source code to be freely used in other projects. The biggest differentiator when compared to
other licenses is that the MPL uses a "file-level" copyleft/copyright that encourages contributors to share their
modifications to this project's files, while still allowing them to combine this project with code under other licenses
(open or proprietary) with minimal restrictions. For a better overview, refer to the
[MPL FAQ](https://www.mozilla.org/en-US/MPL/2.0/FAQ/). Regardless of this overview or the MPL FAQ, in all cases, this
project's actual license takes precedence.

## Contribution

Any contribution you intentionally submit for inclusion in Valbak shall be licensed under the same license used
Expand Down
6 changes: 6 additions & 0 deletions src/file.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

use std::fmt::{Display, Formatter};
use std::fs::Metadata;
use std::io::ErrorKind;
Expand Down
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

use std::path::Path;
use std::process::exit;
use std::sync::{Arc, mpsc, Mutex};
Expand Down Expand Up @@ -409,7 +415,7 @@ fn init_logging(main_state: Arc<Mutex<MainState>>, settings_folder_path: &Path)

if let Err(err) = CombinedLogger::init(
vec![
TermLogger::new(LevelFilter::Warn, log_config.clone(), TerminalMode::Mixed, ColorChoice::Auto),
TermLogger::new(LevelFilter::Info, log_config.clone(), TerminalMode::Mixed, ColorChoice::Auto),
WriteLogger::new(LevelFilter::Debug, log_config, rotating_log_writer)
],
) {
Expand Down
6 changes: 6 additions & 0 deletions src/main_win.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

use std::cmp::Ordering;
use std::path::PathBuf;

Expand Down
6 changes: 6 additions & 0 deletions src/settings.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

use std::fmt::{Display, Formatter};
use std::fs;
use std::io::ErrorKind;
Expand Down
6 changes: 6 additions & 0 deletions src/settings_win.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

use std::fmt::{Display, Formatter};
use std::path::PathBuf;

Expand Down
6 changes: 6 additions & 0 deletions src/watcher.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

use std::fmt::{Display, Formatter};
use std::path::PathBuf;
use std::sync::mpsc;
Expand Down
6 changes: 6 additions & 0 deletions src/win_common.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

use std::cmp::max;

use fltk::browser::MultiBrowser;
Expand Down

0 comments on commit 382e185

Please sign in to comment.