Skip to content

Commit 04a4e46

Browse files
committed
Add windows build and adjust readme
1 parent 8c47498 commit 04a4e46

File tree

2 files changed

+55
-9
lines changed

2 files changed

+55
-9
lines changed

.github/workflows/compile.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on: [push, pull_request]
55
env:
66
FILE_PATH: src/*.c
77
OUTPUT_NAME: rpotool
8+
CURL_URL: https://curl.se/windows/dl-8.8.0_2/curl-8.8.0_2-win64-mingw.zip
9+
CURL_PATH: C:\curl-8.8.0_2-win64-mingw
810

911
jobs:
1012
compile:
@@ -16,7 +18,7 @@ jobs:
1618
- ubuntu-latest
1719
- macos-13
1820
- macos-latest
19-
# - windows-latest
21+
- windows-latest
2022

2123
steps:
2224
- name: Checkout repository
@@ -27,25 +29,27 @@ jobs:
2729
run: |
2830
sudo apt-get install libcurl4-gnutls-dev
2931
gcc -o ${{ env.OUTPUT_NAME }} ${{ env.FILE_PATH }} -lz -lcurl
30-
zip ${{ env.OUTPUT_NAME }}-linux-x64.zip ./${{ env.OUTPUT_NAME }}
32+
zip ${{ env.OUTPUT_NAME }}-linux-x64.zip ${{ env.OUTPUT_NAME }} README.md
3133
3234
- name: Compile with gcc on macOS ARM64
3335
if: matrix.os == 'macos-latest'
3436
run: |
3537
gcc -o ${{ env.OUTPUT_NAME }} ${{ env.FILE_PATH }} -lz -lcurl
36-
zip ${{ env.OUTPUT_NAME }}-macos-arm64.zip ./${{ env.OUTPUT_NAME }}
38+
zip ${{ env.OUTPUT_NAME }}-macos-arm64.zip ${{ env.OUTPUT_NAME }} README.md
3739
3840
- name: Compile with gcc on macOS x64
3941
if: matrix.os == 'macos-13'
4042
run: |
4143
gcc -o ${{ env.OUTPUT_NAME }} ${{ env.FILE_PATH }} -lz -lcurl
42-
zip ${{ env.OUTPUT_NAME }}-macos-x64.zip ./${{ env.OUTPUT_NAME }}
44+
zip ${{ env.OUTPUT_NAME }}-macos-x64.zip ${{ env.OUTPUT_NAME }} README.md
4345
4446
- name: Compile with gcc on Windows
4547
if: matrix.os == 'windows-latest'
4648
run: |
47-
gcc -o ${{ env.OUTPUT_NAME }}.exe ${{ env.FILE_PATH }} -lz -lwinhttp
48-
powershell Compress-Archive ${{ env.OUTPUT_NAME }}.exe ${{ env.OUTPUT_NAME }}-win-x64.zip
49+
curl -L ${{ env.CURL_URL }} -o curl.zip
50+
powershell Expand-Archive curl.zip -DestinationPath C:\
51+
gcc -o ${{ env.OUTPUT_NAME }}.exe ${{ env.FILE_PATH }} -I${{ env.CURL_PATH }}\include -L${{ env.CURL_PATH }}\lib -lcurl -lz
52+
powershell Compress-Archive ${{ env.OUTPUT_NAME }}.exe, ${{ env.CURL_PATH }}\bin\libcurl-x64.dll, README.md ${{ env.OUTPUT_NAME }}-win-x64.zip
4953
5054
- name: Upload artifact on Linux
5155
if: matrix.os == 'ubuntu-latest'

README.md

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,40 @@
55

66
- [Installation](#installation)
77
- [Usage](#usage)
8+
- [Overview](#overview)
9+
- [Commands](#commands)
810
- [Compiling](#compiling)
911
- [Blender Import](#blender-import)
12+
- [Installing libcurl](#installing-libcurl)
1013
- [License](#license)
1114

1215
## Installation
1316

14-
Get the latest version of `rpotool` from [GitHub releases](https://github.com/tylertms/rpotool/releases).
17+
1. Get the latest version of `rpotool` for your system from [GitHub releases](https://github.com/tylertms/rpotool/releases).
1518

16-
To obtain the default `.rpo` assets, unzip a `.apk` or `.ipa` game file and open the `/rpos` directory.
19+
2. Extract the `.zip` archive and `cd` into the folder.
20+
21+
3. If you are missing `libcurl` when using `rpotool fetch`, follow the instructions in [Installing libcurl](#installing-libcurl).
1722

18-
To obtain `.rpoz` shell assets, see the `fetch` command below.
1923

2024
## Usage
2125

26+
### Overview
27+
macOS/Linux:
28+
```
29+
./rpotool [command] [options]
30+
```
31+
32+
Windows:
33+
```
34+
rpotool.exe [command] [options]
35+
```
36+
37+
To obtain the default `.rpo` assets, unzip a `.apk` or `.ipa` game file and open the `/rpos` directory.
38+
39+
To obtain `.rpoz` shell assets, see the `fetch` command below.
40+
41+
### Commands
2242
To convert an .rpo or .rpoz file, use the `convert` command.
2343

2444
```
@@ -78,6 +98,28 @@ After importing your .obj file into blender, complete the following:
7898

7999
![step_3](./demo/blender/step3.png)
80100

101+
## Installing libcurl
102+
103+
Most systems come preinstalled with libcurl dynamic libraries.
104+
105+
However, if you face errors related to missing libcurl, try installing the corresponding library for your system.
106+
107+
macOS:
108+
```
109+
brew install curl
110+
```
111+
112+
Linux:
113+
```
114+
sudo apt-get install libcurl4-gnutls-dev
115+
```
116+
117+
Windows:
118+
```
119+
The Windows release comes packaged with libcurl-x64.dll.
120+
Either keep libcurl-x64.dll in the same directory as rpotool.exe, or move it to C:\Windows\System32.
121+
```
122+
81123
## License
82124

83125
`rpotool` is released under the [MIT license](https://github.com/tylertms/rpotool/blob/main/LICENSE).

0 commit comments

Comments
 (0)