Skip to content

Commit

Permalink
Added support for dragging files into the program window to trigger p…
Browse files Browse the repository at this point in the history
…reset commands
  • Loading branch information
kerwin612 committed Dec 25, 2023
1 parent b535b24 commit c6cc39d
Show file tree
Hide file tree
Showing 57 changed files with 1,868 additions and 1,503 deletions.
File renamed without changes.
File renamed without changes.
75 changes: 0 additions & 75 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,78 +2,3 @@

**Mount the portable directory as a consistent user directory. Then, based on this user directory, run your program.**
>***Note, run with administrator privileges.***
**help**
```cmd
PortableRunner [Target Path] [Link Path] [Home Name]
args:
Target Path: Specifies the physical drive and path that you want to assign to a virtual drive.
Link Path: Specifies the virtual drive and path to which you want to assign a path.
Home Name: The subdirectory name of the <Link Path> directory, Will be specified as the value of %HOME%, which defaults to [.home].
```

**example**

* No parameters, double click to open
![1](./images/1.png)

* Input parameters
![2](./images/2.png)

* Enter to enter the main window
![3](./images/3.png)

* Enter the command and press Enter to execute it. The command running environment is based on:
```cmd
HOME=X:\work\.home
HOMEDRIVE=X:
HOMEPATH=X:\work\.home
LOCALAPPDATA=X:\work\.home\AppData\Local
PORTABLE_RUNNER_ENV_LINK_PATH=X:\work
PORTABLE_RUNNER_ENV_TARGET_PATH=E:\test
TEMP=X:\work\.home\AppData\Local\Temp
TMP=X:\work\.home\AppData\Local\Temp
USERPROFILE=X:\work\.home
...
```

### .profile
`%HOME%/[.profile.cmd|.profile.bat]`
> **One of these two files is automatically executed when the program starts (if the file exists)**
### .pd.json
`%HOME%/.pd.json`
> **Configuration file, currently supports shortcuts configuration**
**example**
```json
{
"shortcuts": [
{
"label": "重启",
"key": "reboot",
"cmd": "shutdown /r /f /t 0"
},
{
"label": "关机",
"key": "shutdown",
"cmd": "shutdown /s /f /t 0"
},
{
"key": "open",
"cmd": "explorer",
"parametersRequired": true,
"group": "open"
},
{
"key": "open-home",
"cmd": "explorer %HOME%",
"group": "open"
}
]
}
```
* entering [open-home], [explorer %HOME%] will be executed
* entering [open https://github.com], [explorer https://github.com] will be executed

**[sample](./gui/sample/)**
2 changes: 0 additions & 2 deletions env/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions env/Cargo.toml

This file was deleted.

115 changes: 0 additions & 115 deletions env/src/lib.rs

This file was deleted.

7 changes: 0 additions & 7 deletions gui/README.md

This file was deleted.

1 change: 0 additions & 1 deletion gui/sample/.gitignore

This file was deleted.

Binary file removed gui/sample/images/1.png
Binary file not shown.
Binary file removed gui/sample/images/2.png
Binary file not shown.
Binary file removed gui/sample/images/3.png
Binary file not shown.
Binary file removed gui/sample/images/4.png
Binary file not shown.
3 changes: 0 additions & 3 deletions gui/sample/portable_env/.home/.bin/hello.bat

This file was deleted.

12 changes: 0 additions & 12 deletions gui/sample/portable_env/.home/.bin/jd-gui.bat

This file was deleted.

37 changes: 0 additions & 37 deletions gui/sample/portable_env/.home/.bin/run-bat.vbs

This file was deleted.

29 changes: 0 additions & 29 deletions gui/sample/portable_env/.home/.env.bat

This file was deleted.

7 changes: 0 additions & 7 deletions gui/sample/portable_env/.home/.m2/settings.xml

This file was deleted.

84 changes: 0 additions & 84 deletions gui/sample/portable_env/.home/.pd.json

This file was deleted.

Loading

0 comments on commit c6cc39d

Please sign in to comment.