Skip to content

Commit 7c70276

Browse files
committed
v0.3.6
- Updated dev scripts
1 parent eb82a25 commit 7c70276

File tree

8 files changed

+165
-159
lines changed

8 files changed

+165
-159
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# 0.3.5
1+
# 0.3.6
22

33
- Fixed Magisk install issue
4-
- Added MMAR V2 to the default repos
4+
- Added MMAR V2 to the default repos
5+
- CLI handles now invalid repos

Cargo.lock

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "mmrl"
33
description = "MMRL comes now as command line interface, with multi module install support!"
4-
version = "0.3.5"
4+
version = "0.3.6"
55
edition = "2021"
66
author = "Der_Googler"
77

@@ -23,8 +23,8 @@ zip = "0.6.6"
2323
serde_ini = "0.2.0"
2424
regex = "1.10.2"
2525
async-recursion = "1.0.5"
26-
# openssl = { version = "0.10.45", features = ["vendored"] }
27-
openssl = "0.10.45"
26+
openssl = { version = "0.10.45", features = ["vendored"] }
27+
# openssl = "0.10.45"
2828
url = "2.2"
2929
walkdir = "2.4.0"
3030

build-module.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,7 @@ cat <<EOF >update.json
3535
"version": "$VER",
3636
"versionCode": "$VER_CODE",
3737
"zipUrl": "https://github.com/DerGoogler/MMRL-CLI/releases/download/v$VER/mmrl-$VER-module-aarch64.zip",
38-
"changelog": "https://raw.githubusercontent.com/DerGoogler/MMRL-CLI/master/CHANGELOG.md"
39-
}
40-
EOF
41-
42-
cat <<EOF >system/usr/share/mmrl/config/mmrl/info.json
43-
{
44-
"version": "$VER",
45-
"versionCode": "$VER_CODE",
38+
"changelog": "https://raw.githubusercontent.com/DerGoogler/MMRL-CLI/master/CHANGELOG.md",
4639
"author": "$AUT",
4740
"rustVersion": "$RUST_VER",
4841
"buildDate": "$BUILD_DATE"

module/module.prop

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
id=mmrl
22
name=MMRL CLI
3-
version=0.3.5
4-
versionCode=035
3+
version=0.3.6
4+
versionCode=036
55
author=Der_Googler
6-
description=MMRL Command Line Interface is a free tool to install Magisk/KernelSU modules. Build on 2024-06-24 with Rust 1.78.0.
6+
description=MMRL Command Line Interface is a free tool to install Magisk/KernelSU modules. Build on 2024-06-26 with Rust 1.78.0.
77
updateJson=https://raw.githubusercontent.com/DerGoogler/MMRL-CLI/master/module/update.json
Lines changed: 137 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -1,149 +1,155 @@
11
import React from "react"
22
import { Page, Toolbar } from "@mmrl/ui"
33
import { useActivity, useNativeFileStorage, useStrings } from "@mmrl/hooks"
4+
import { withRequireNewVersion } from "@mmrl/hoc"
45
import {
5-
ArrowBackIosRounded,
6-
DeleteRounded,
7-
AddRounded
8-
} from "@mui/icons-material";
6+
ArrowBackIosRounded,
7+
DeleteRounded,
8+
AddRounded
9+
} from "@mui/icons-material"
910
import {
10-
List,
11-
ListItem,
12-
ListItemText,
13-
ListSubheader,
14-
IconButton,
15-
Card,
16-
CardContent,
17-
Typography,
18-
Grid,
19-
Dialog,
20-
DialogActions,
21-
DialogContent,
22-
DialogContentText,
23-
DialogTitle,
24-
TextField,
25-
Button,
11+
List,
12+
ListItem,
13+
ListItemText,
14+
ListSubheader,
15+
IconButton,
16+
Card,
17+
CardContent,
18+
Typography,
19+
Grid,
20+
Dialog,
21+
DialogActions,
22+
DialogContent,
23+
DialogContentText,
24+
DialogTitle,
25+
TextField,
26+
Button,
2627
} from "@mui/material"
2728

28-
const info = include("info.json")
29+
const info = require(path.resolve(__modpath, "update.json"))
2930

30-
export default () => {
31-
const [repos, setRepos] = useNativeFileStorage("/data/adb/mmrl/repos.json", [
32-
"https://magisk-modules-alt-repo.github.io/json-v2/json/modules.json",
33-
"https://gr.dergoogler.com/gmr/json/modules.json"
34-
], { loader: "json" })
31+
const App = () => {
32+
const [repos, setRepos] = useNativeFileStorage("/data/adb/mmrl/repos.json", [
33+
"https://magisk-modules-alt-repo.github.io/json-v2/json/modules.json",
34+
"https://gr.dergoogler.com/gmr/json/modules.json"
35+
], { loader: "json" })
3536

36-
const { context } = useActivity()
37-
const { strings } = useStrings()
37+
const { context } = useActivity()
38+
const { strings } = useStrings()
3839

3940

40-
const [open, setOpen] = React.useState(false)
41-
const [repoLink, setRepoLink] = React.useState("")
42-
const handleDialogOpen = () => setOpen(true)
43-
const handleDialogClose = () => { setOpen(false), setRepoLink("") }
44-
const handleRepoLinkChange = (e) => setRepoLink(e.target.value)
41+
const [open, setOpen] = React.useState(false)
42+
const [repoLink, setRepoLink] = React.useState("")
43+
const handleDialogOpen = () => setOpen(true)
44+
const handleDialogClose = () => { setOpen(false), setRepoLink("") }
45+
const handleRepoLinkChange = (e) => setRepoLink(e.target.value)
4546

4647

47-
const renderToolbar = React.useCallback(() => {
48-
return (
49-
<Toolbar
50-
modifier="noshadow"
51-
sx={{
52-
background: "#ba420e",
53-
background: "linear-gradient(22deg, #a63012 0%, #fc9e58 100%)",
54-
}}>
55-
<Toolbar.Left>
56-
<Toolbar.Button icon={ArrowBackIosRounded} onClick={context.popPage} />
57-
</Toolbar.Left>
58-
<Toolbar.Center>Command line interface config</Toolbar.Center>
59-
<Toolbar.Right>
60-
<Toolbar.Button icon={AddRounded} onClick={handleDialogOpen} />
61-
</Toolbar.Right>
62-
</Toolbar>
63-
)
64-
}, [])
48+
const renderToolbar = React.useCallback(() => {
49+
return (
50+
<Toolbar
51+
modifier="noshadow"
52+
sx={{
53+
background: "#ba420e",
54+
background: "linear-gradient(22deg, #a63012 0%, #fc9e58 100%)",
55+
}}>
56+
<Toolbar.Left>
57+
<Toolbar.Button icon={ArrowBackIosRounded} onClick={context.popPage} />
58+
</Toolbar.Left>
59+
<Toolbar.Center>Command line interface config</Toolbar.Center>
60+
<Toolbar.Right>
61+
<Toolbar.Button icon={AddRounded} onClick={handleDialogOpen} />
62+
</Toolbar.Right>
63+
</Toolbar>
64+
)
65+
}, [])
6566

6667

67-
return (
68-
<Page renderToolbar={renderToolbar}>
69-
<Card sx={{ m: 1 }}>
70-
<CardContent>
71-
<Grid container rowSpacing={0} columnSpacing={0} fullWidth>
72-
<Grid item xs={5}>
73-
<Typography variant="caption">Author:</Typography>
74-
</Grid>
75-
<Grid item xs={5}>
76-
<Typography variant="caption">{info.author}</Typography>
77-
</Grid>
78-
<Grid item xs={5}>
79-
<Typography variant="caption">Version:</Typography>
80-
</Grid>
81-
<Grid item xs={5}>
82-
<Typography variant="caption">{info.version} ({info.versionCode})</Typography>
83-
</Grid>
84-
<Grid item xs={5}>
85-
<Typography variant="caption">Rust version:</Typography>
86-
</Grid>
87-
<Grid item xs={5}>
88-
<Typography variant="caption">{info.rustVersion}</Typography>
89-
</Grid>
90-
<Grid item xs={5}>
91-
<Typography variant="caption">Build date:</Typography>
92-
</Grid>
93-
<Grid item xs={5}>
94-
<Typography variant="caption">{info.buildDate}</Typography>
95-
</Grid>
96-
</Grid>
97-
</CardContent>
98-
</Card>
68+
return (
69+
<Page renderToolbar={renderToolbar}>
70+
<Card sx={{ m: 1 }}>
71+
<CardContent>
72+
<Grid container rowSpacing={0} columnSpacing={0} fullWidth>
73+
<Grid item xs={5}>
74+
<Typography variant="caption">Author:</Typography>
75+
</Grid>
76+
<Grid item xs={5}>
77+
<Typography variant="caption">{info.author}</Typography>
78+
</Grid>
79+
<Grid item xs={5}>
80+
<Typography variant="caption">Version:</Typography>
81+
</Grid>
82+
<Grid item xs={5}>
83+
<Typography variant="caption">{info.version} ({info.versionCode})</Typography>
84+
</Grid>
85+
<Grid item xs={5}>
86+
<Typography variant="caption">Rust version:</Typography>
87+
</Grid>
88+
<Grid item xs={5}>
89+
<Typography variant="caption">{info.rustVersion}</Typography>
90+
</Grid>
91+
<Grid item xs={5}>
92+
<Typography variant="caption">Build date:</Typography>
93+
</Grid>
94+
<Grid item xs={5}>
95+
<Typography variant="caption">{info.buildDate}</Typography>
96+
</Grid>
97+
</Grid>
98+
</CardContent>
99+
</Card>
99100

100-
<List subheader={<ListSubheader>Installed repositories</ListSubheader>}>
101-
{repos.map((repo) => {
102-
const handleDelete = () => {
103-
setRepos((rep) => rep.filter((remv) => remv != repo))
104-
}
105-
return (
106-
<ListItem secondaryAction={
107-
<IconButton edge="end" onClick={handleDelete}>
108-
<DeleteRounded />
109-
</IconButton>
110-
}>
111-
<ListItemText primary={repo} />
112-
</ListItem>
113-
)
114-
})}
115-
</List>
101+
<List subheader={<ListSubheader>Installed repositories</ListSubheader>}>
102+
{repos.map((repo) => {
103+
const handleDelete = () => {
104+
setRepos((rep) => rep.filter((remv) => remv != repo))
105+
}
106+
return (
107+
<ListItem secondaryAction={
108+
<IconButton edge="end" onClick={handleDelete}>
109+
<DeleteRounded />
110+
</IconButton>
111+
}>
112+
<ListItemText primary={repo} />
113+
</ListItem>
114+
)
115+
})}
116+
</List>
116117

117118

118-
<Dialog open={open} onClose={handleDialogOpen}>
119-
<DialogTitle>{strings("add_repository")}</DialogTitle>
120-
<DialogContent>
121-
<DialogContentText>{strings("add_repository_description")}</DialogContentText>
122-
<TextField
123-
autoFocus
124-
name="repo_link"
125-
fullWidth
126-
margin="dense"
127-
type="text"
128-
label={"Modules link"}
129-
value={repoLink}
130-
variant="outlined"
131-
onChange={handleRepoLinkChange}
132-
/>
133-
</DialogContent>
134-
<DialogActions>
135-
<Button onClick={handleDialogClose}>{strings("cancel")}</Button>
136-
<Button
137-
onClick={() => {
138-
if (!repos.some((r) => r === repoLink)) {
139-
setRepos((p) => [...p, repoLink])
140-
handleDialogClose()
141-
}
142-
}}>
143-
{strings("add")}
144-
</Button>
145-
</DialogActions>
146-
</Dialog>
147-
</Page>
148-
)
149-
}
119+
<Dialog open={open} onClose={handleDialogOpen}>
120+
<DialogTitle>{strings("add_repository")}</DialogTitle>
121+
<DialogContent>
122+
<DialogContentText>{strings("add_repository_description")}</DialogContentText>
123+
<TextField
124+
autoFocus
125+
name="repo_link"
126+
fullWidth
127+
margin="dense"
128+
type="text"
129+
label={"Modules link"}
130+
value={repoLink}
131+
variant="outlined"
132+
onChange={handleRepoLinkChange}
133+
/>
134+
</DialogContent>
135+
<DialogActions>
136+
<Button onClick={handleDialogClose}>{strings("cancel")}</Button>
137+
<Button
138+
onClick={() => {
139+
if (!repos.some((r) => r === repoLink)) {
140+
setRepos((p) => [...p, repoLink])
141+
handleDialogClose()
142+
}
143+
}}>
144+
{strings("add")}
145+
</Button>
146+
</DialogActions>
147+
</Dialog>
148+
</Page>
149+
)
150+
}
151+
152+
export default withRequireNewVersion({
153+
versionCode: 21918,
154+
component: App,
155+
});

module/system/usr/share/mmrl/config/mmrl/info.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

module/update.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
2-
"version": "0.3.5",
3-
"versionCode": "035",
4-
"zipUrl": "https://github.com/DerGoogler/MMRL-CLI/releases/download/v0.3.5/mmrl-0.3.5-module-aarch64.zip",
5-
"changelog": "https://raw.githubusercontent.com/DerGoogler/MMRL-CLI/master/CHANGELOG.md"
2+
"version": "0.3.6",
3+
"versionCode": "036",
4+
"zipUrl": "https://github.com/DerGoogler/MMRL-CLI/releases/download/v0.3.6/mmrl-0.3.6-module-aarch64.zip",
5+
"changelog": "https://raw.githubusercontent.com/DerGoogler/MMRL-CLI/master/CHANGELOG.md",
6+
"author": "Der_Googler",
7+
"rustVersion": "1.78.0",
8+
"buildDate": "2024-06-26"
69
}

0 commit comments

Comments
 (0)