The following will be a guide on how to use JaxCore's powerful version control tool! You can find a copy of this guide on JaxCore's wiki
What's CoreInstaller?
CoreInstaller allows users to install your skin even without Rainmeter installed, and allows your skin to self-update with a single click. This does not require JaxCore to be installed.
This is meant for advanced skin publishers only. If you're new to releasing skins, consider adding this later down your development schedule.
Complete a 3-step process for basic setup, and another 3-step process to allow your module to self-update.
Basic setup
The following section expects basic knowledge on how to setup a Github repository. If you're having trouble with this, Google's your best friend.
- Create a Github Repository with your skin name as the repository name
- Clone local skin folder to Github Repository. Have your skin folder as the root folder. (Optional)
- The releases section is where you'll upload new versions of your skin. When uploading your .rmskin file, make sure to give the release a version tag.
Now your skin can be installed via the following command:
Code: Select all
$o_NoPostActions=$true;$o_InstallModule='MyUser/MySkin';iwr -useb 'https://raw.githubusercontent.com/Jax-Core/JaxCore/master/CoreInstaller.ps1' | iex
You can also add the installation guide to your README.md file so it's easier for users to install your module:Make sure to replace any occurances of MySkin and MyUser with your Github Repo's name and your username in the sections following.
Example: If your Github username is timmy and your repo name is my-first-skin: MyUser/MySkin --> timmy/my-first-skin
The slash must be forward!
- Create a README.md file in the root of your skins folder
- Put the following contents into it.
Code: Select all
## How to install
Run the following command in Powershell to install the latest version.
```
$o_NoPostActions=$true;$o_InstallModule='MyUser/MySkin';iwr -useb 'https://raw.githubusercontent.com/Jax-Core/JaxCore/master/CoreInstaller.ps1' | iex
```
Complete the following setups to allow your skin to self-update. You'll need the following things in your module for it to work.
- PowershellRM Plugin
- A way to allow users to click on something to update
- A powershell script located in the resources folder (or anywhere within the skin)
Replace path_to_powershell_script with corresponding path
Code: Select all
[CoreInstallHandler]
Measure=Plugin
Plugin=PowershellRM
DynamicVariables=1
ScriptFile=#path_to_powershell_script#
ExecutionPolicy=Unrestricted
Make sure to replace MyUser/MySkin
Code: Select all
function Install($Version) {
# ---------------------------------- Command --------------------------------- #
$command = "-command `"`$o_NoPostActions=`$true;`$o_InstallModule='MyUser/MySkin';"
$rminstalledat = join-path "$($RmAPI.VariableStr('SETTINGSPATH'))" ""
# If installation is portable
If (!((join-path "$Env:APPDATA\Rainmeter\" "") -eq ($rminstalledat))) {
$rminstalledat = Split-path "$rminstalledat"
$command += "`$o_Location='$rminstalledat';"
}
# If specific version is requested
If ($Version) {
$Version = $Version -replace 'v', ''
$command += "`$o_Version='$Version';"
}
$command += "iwr -useb 'https://raw.githubusercontent.com/Jax-Core/JaxCore/master/CoreInstaller.ps1' | iex`""
# --------------------------------- Fallback --------------------------------- #
# Put any bangs here that should be ran everytime that you run the local updater, to let the user know what they should do if the installer doesn't work.
# ---------------------------- Launch PS instance ---------------------------- #
If (Test-Path "C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe") {
Start-Process "C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe" -ArgumentList "-ExecutionPolicy Bypass", $command
} else {
Start-Process powershell.exe -ArgumentList "-ExecutionPolicy Bypass", $command
}
}
Code: Select all
# To get the latest version
LeftMouseUpAction=[!CommandMeasure CoreInstallHandler 'Install']
# To get a specific version
LeftMouseUpAction=[!CommandMeasure CoreInstallHandler 'Install v1.5']
Now your skin can be updated with just running a single bang! If you have any questions or if you have encountered any issues, feel free to leave a comment