forked from chylex/Discord-History-Tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split browser-only version into a separate branch & update README
- Loading branch information
Showing
34 changed files
with
23 additions
and
5,251 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,48 +1,32 @@ | ||
# Welcome | ||
|
||
All you need to **use Discord History Tracker** is either an up-to-date browser, or the [Discord desktop client](https://discord.com/download). Visit the [official website](https://dht.chylex.com) for instructions. | ||
For instructions on how to **use Discord History Tracker**, visit the [official website](https://dht.chylex.com). | ||
|
||
To **report an issue or suggestion**, first please see the [issues](https://github.com/chylex/Discord-History-Tracker/issues) page and make sure someone else hasn't already created a similar issue report. If you do find an existing issue, comment on it or add a reaction. Otherwise, either click [New Issue](https://github.com/chylex/Discord-History-Tracker/issues/new), or contact me via email [[email protected]](mailto:[email protected]) or Twitter [@chylexmc](https://twitter.com/chylexmc). | ||
|
||
If you are interested in **creating your own version** from the source code, continue reading the [build instructions](#Build-Instructions) below. | ||
If you are interested in **building from source code**, continue reading the [build instructions](#Build-Instructions) below. | ||
|
||
# Build Instructions | ||
This branch is dedicated to the Discord History Tracker desktop app. If you are looking for the older browser-only version, visit the [master-browser-only](https://github.com/chylex/Discord-History-Tracker/tree/master-browser-only) branch. | ||
|
||
Follow the steps below to create your own version of Discord History Tracker. | ||
# Build Instructions | ||
|
||
### Setup | ||
|
||
Fork the repository and clone it to your computer (if you've never used git, you can download the [GitHub Desktop](https://desktop.github.com) client to get started quickly). | ||
|
||
Now you can modify the source code: | ||
* `src/tracker/` contains JS files that are automatically combined into the **tracker bookmark/script** | ||
* `src/viewer/` contains HTML, CSS, JS files that are then combined into the **offline viewer page** | ||
Folder organization: | ||
* `app/` contains a Visual Studio solution for the desktop app | ||
* `lib/` contains utilities required to build the project | ||
* `web/` contains source code of the [official website](https://dht.chylex.com), which can be used as a template when making your own website | ||
|
||
### Building | ||
To start editing source code for the desktop app, open `app/DiscordHistoryTracker.sln` in [Visual Studio](https://visualstudio.microsoft.com/downloads/) or [Rider](https://www.jetbrains.com/rider/). | ||
|
||
After you've done changes to the source code, you will need to build it. Before that, download and install: | ||
* (**required**) [Python 3](https://www.python.org/downloads) | ||
* Use to run the build script | ||
* (optional) [Node + npm](https://nodejs.org/en) & command line [uglify-js](https://www.npmjs.com/package/uglify-js) | ||
* Not required on Windows | ||
* Only required for optional [JS minification](#Minification) on Linux/Mac | ||
|
||
Now open the folder that contains `build.py` in a command line, and run `python build.py` to create a build with default settings. The following files will be created: | ||
* `bld/track.js` is the raw tracker script that can be pasted into a browser console | ||
* `bld/track.html` is the tracker script but sanitized for inclusion in HTML (see `web/index.php` for examples) | ||
* `bld/viewer.html` is the complete offline viewer | ||
### Building | ||
|
||
You can tweak the build process using the following flags: | ||
* `python build.py --nominify` to disable [minification](#Minification) | ||
To build a `Debug` version of the desktop app, there are no additional requirements. | ||
|
||
### Minification | ||
To build a `Release` version of the desktop app, you will need [Python 3](https://www.python.org/downloads), which is used by the build process to launch `app/Resources/minify.py` script. | ||
|
||
The build process automatically minifies JS using `UglifyJS@3`, and CSS using a custom minifier. | ||
When creating `Release` builds on systems other than 64-bit Windows, you will also need [Node + npm](https://nodejs.org/en), and [uglify-js](https://www.npmjs.com/package/uglify-js) installed globally (`npm install uglify-js -g`). On 64-bit Windows, both Node and uglify-js are already included in the `lib/` folder for convenience. | ||
|
||
* If the `--nominify` flag is used, minification will be completely disabled | ||
* If `uglify-js` is not available from the command line, JS minification will be skipped | ||
* When building on Windows 64-bit, the build script will use the included Node runner and packages | ||
* When building on Windows 32-bit, you will need to download [Node 32-bit](https://nodejs.org/en/download) and replace the included one in `lib/` | ||
* When building on Linux/Mac, the build script will attempt to find `uglifyjs` in the command line | ||
To create `Release` builds ready for distribution, run the `app/build.bat` script on Windows, or `app/build.sh` script on other operating systems. This will create self-contained executables for each major operating system, and a portable version that works on all other systems but requires .NET 5 to be installed. All builds are placed in the `app/bin` folder. |
Oops, something went wrong.