Skip to content

Commit

Permalink
better README, ps1 file hides its self, cmd file enables double click…
Browse files Browse the repository at this point in the history
… launch
  • Loading branch information
d3nd3 committed May 4, 2023
1 parent aaffa8f commit 2c60b1e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# Soldier Of Fortune 1 windows http map auto-downloader

Uses powershell to download a map zip and extract it. Extract this to your sof folder. http_listener.cmd launches http_listener.ps1.
**Extract this to your sof folder.**
**Open the SoF_HTTP.cmd file to launch SoF.**
**Make a desktop shortcut of it etc.**

Put http2.func in User/sofplus/addons dir.
Uses powershell to download a map zip and extract it.
SoF_HTTP.cmd *launches* http_listener.ps1.
http_listener.ps1 *starts* SoF.exe.

Use the SoF HTTP Launcher. It will launch SoF.exe. And handle downloads in background.
Put user/sofplus/addons/http2.func into SoF_Install/User/sofplus/addons dir.

It downloads zip files from https://github.com/plowsof/sof1maps.

Extracts them and then deletes them.

If mapfile.bsp already is present in your directory, it does not download the map.

Test by deleting your maps folder if you dare.
It *downloads* zip files from https://github.com/plowsof/sof1maps.
*Extracts* them.
Only downloads if .bsp does not exist already.
Test by deleting your maps folder if you dare.

Feedback welcome.

Binary file removed SoF HTTP Launcher.lnk
Binary file not shown.
1 change: 1 addition & 0 deletions SoF_HTTP.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
powershell.exe -ExecutionPolicy Bypass -File http_listener.ps1
6 changes: 6 additions & 0 deletions http_listener.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
if ( $args -contains "disappear" ) {

$ErrorActionPreference = 'Stop'

$HttpFile = ''
Expand Down Expand Up @@ -67,3 +69,7 @@ While ($true) {
}

}
} else {
$arguments = "-WindowStyle Hidden", "-File", $MyInvocation.MyCommand.Path, "disappear"
Start-Process "powershell.exe" -ArgumentList $arguments
}

0 comments on commit 2c60b1e

Please sign in to comment.