Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.

Commit 1dabcf6

Browse files
committed
Merge branch 'release/0312'
2 parents 8f6c8d9 + 7b8025a commit 1dabcf6

32 files changed

Lines changed: 2446 additions & 411 deletions

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

README.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,39 @@
33
LoGiVi is a git-repository visualisation tool inspired by [Gource](https://code.google.com/p/gource/) and __currently in development__. It was written from scratch using [Lua](http://www.lua.org/) and the [LÖVE](https://love2d.org/) framework.
44

55
# Instructions
6-
LoGiVi can't read from a .git repository directly ([yet](https://github.com/rm-code/logivi/issues/3)). Instead you will have to create a git-log which needs to have a specific format. Please use this command to create the file:
6+
When you run LoGiVi for the first time it will set up all necessary folders, an example git log and a config file in the save directory on your harddrive. A dialog will pop up which allows you to view the save directory.
77

8-
```bash
9-
git log --reverse --numstat --pretty=format:"author: %an|%ae%ndate: %ct%n" --name-status --no-merges > log.txt
8+
## Generating git logs automatically
9+
LoGiVi can generate git logs automatically when you specify a path to a git repository on your harddrive. Open the _settings.cfg_ file in the LoGiVi save directory and look for the _[repositories]_ section. Add the absolute path to the folder containing the git repository like this:
10+
11+
```
12+
[repositories]
13+
logivi = /Users/Robert/Coding/Lua/LÖVE/LoGiVi/
1014
```
15+
The name on the left side of the equals sign will be used as the project name to identify this repository so make sure you use unique names here.
1116

12-
This will create a log file in the same directory as the .git repository (If you want to write the log to a different location add its path after the '>' in the command above).
17+
LoGiVi can also handle Windows paths:
1318

14-
When you run LoGiVi for the first time it will automatically open the folder in which you need to place the log. Depending on your operating system this can be one of the following locations:
19+
```
20+
[repositories]
21+
logivi = C:\Users\rmcode\Documents\Coding Projects\LoGiVi\
22+
```
23+
After you have added the paths of your project to the config file, the log and info files will be created the next time you run LoGiVi (this may take a few seconds depending on how large the repositories are).
1524

16-
- Windows XP: C:\Documents and Settings\user\Application Data\LOVE\rmcode_logivi
17-
- Windows Vista and 7: C:\Users\user\AppData\Roaming\LOVE\rmcode_logivi
18-
- Linux: $XDG_DATA_HOME/love/ or ~/.local/share/love/rmcode_logivi
19-
- Mac: /Users/user/Library/Application Support/LOVE/rmcode_logivi
25+
## Generating git logs manually
26+
If you don't want the logs to be generated automatically, or if you don't have git in your PATH, you can also generate the git logs manually.
2027

21-
For more information about the filesystem check the [LÖVE wiki](https://love2d.org/wiki/love.filesystem).
28+
Open your terminal and type in the following command (replace the path with your own path leading to a git repository):
2229

23-
As soon as the file is in the correct folder you can start LoGiVi and watch as it creates a visual representation of your git repository.
30+
```bash
31+
git -C "Path/To/Your/Repository" log --reverse --numstat --pretty=format:"info: %an|%ae|%ct" --name-status --no-merges > log.txt
32+
```
33+
This will create the file _log.txt_ in the folder you are currently in. Take this newly created file and drop it into a folder in the _logs_ subfolder in the LoGiVi save directory:
2434

25-
Check the [wiki](https://github.com/rm-code/logivi/wiki) for instructions and further information.
35+
```
36+
/Users/Robert/Library/Application Support/LOVE/rmcode_LoGiVi/logs/yourProject/log.txt
37+
```
38+
LoGiVi will use the folder's name to identify the log so make it informative.
2639

2740
# License
2841

@@ -46,4 +59,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4659
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4760
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
4861
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
49-
SOFTWARE.
62+
SOFTWARE.

conf.lua

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,15 @@
2222

2323
local PROJECT_TITLE = "LoGiVi";
2424

25-
local PROJECT_VERSION = "0204";
25+
local PROJECT_VERSION = "0312";
2626

2727
local PROJECT_IDENTITY = "rmcode_LoGiVi";
2828

2929
local LOVE_VERSION = "0.9.2";
3030

31-
-- ------------------------------------------------
32-
-- Global Functions
33-
-- ------------------------------------------------
34-
3531
---
3632
-- Initialise löve's config file.
37-
-- @param _conf
33+
-- @param t
3834
--
3935
function love.conf(t)
4036
t.identity = PROJECT_IDENTITY;

lib/screenmanager/ScreenManager.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
--===============================================================================--
2222

2323
local ScreenManager = {
24-
_VERSION = '1.3.1',
24+
_VERSION = '1.4.1',
2525
_DESCRIPTION = 'Screen/State Management for the LÖVE framework',
2626
_URL = 'https://github.com/rm-code/screenmanager/',
2727
};
@@ -69,9 +69,9 @@ end
6969
--
7070
-- @param nscreen
7171
--
72-
function ScreenManager.switch(screen)
72+
function ScreenManager.switch(screen, ...)
7373
clear();
74-
ScreenManager.push(screen);
74+
ScreenManager.push(screen, ...);
7575
end
7676

7777
---
@@ -81,7 +81,7 @@ end
8181
--
8282
-- @param screen - The name of the screen to push on the stack.
8383
--
84-
function ScreenManager.push(screen)
84+
function ScreenManager.push(screen, ...)
8585
-- Deactivate the previous screen if there is one.
8686
if ScreenManager.peek() then
8787
ScreenManager.peek():setActive(false);
@@ -100,7 +100,7 @@ function ScreenManager.push(screen)
100100
end
101101

102102
-- Create the new screen and initialise it.
103-
stack[#stack]:init();
103+
stack[#stack]:init(...);
104104
end
105105

106106
---

main.lua

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ local function checkSupport()
5151
print("\n---- RENDERER ---- ");
5252
local name, version, vendor, device = love.graphics.getRendererInfo()
5353
print(string.format("Name: %s \nVersion: %s \nVendor: %s \nDevice: %s", name, version, vendor, device));
54+
55+
print("\n---- SYSTEM ---- ");
56+
print(love.system.getOS());
5457
end
5558

5659
local function drawStats()
@@ -88,10 +91,11 @@ function love.load()
8891
print("===================")
8992

9093
local screens = {
94+
selection = require('src.screens.SelectionScreen');
9195
main = require('src.screens.MainScreen');
9296
};
9397

94-
ScreenManager.init(screens, 'main');
98+
ScreenManager.init(screens, 'selection');
9599
end
96100

97101
function love.draw()
@@ -110,7 +114,17 @@ function love.quit(q)
110114
ScreenManager.quit(q);
111115
end
112116

117+
function love.resize(x, y)
118+
ScreenManager.resize(x, y);
119+
end
120+
113121
function love.keypressed(key)
122+
if key == ' ' then
123+
key = 'space';
124+
elseif tonumber(key) then
125+
key = tonumber(key);
126+
end
127+
114128
if key == 'f1' then
115129
showDebug = not showDebug;
116130
end
@@ -128,4 +142,4 @@ end
128142

129143
function love.mousemoved(x, y, dx, dy)
130144
ScreenManager.mousemoved(x, y, dx, dy);
131-
end
145+
end

res/fonts/SourceCodePro-Bold.otf

90.5 KB
Binary file not shown.

res/img/avatar.png

6.91 KB
Loading

res/img/file.png

14.5 KB
Loading

res/img/user.png

-11.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)