Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 51c043e

Browse files
Create windows_build.yml
1 parent 72065e4 commit 51c043e

File tree

2 files changed

+101
-8
lines changed

2 files changed

+101
-8
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: windows_build
4+
5+
env:
6+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
7+
BUILD_TYPE: Release
8+
9+
# Controls when the workflow will run
10+
on:
11+
# Triggers the workflow on push or pull request events but only for the main branch
12+
workflow_dispatch:
13+
14+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15+
jobs:
16+
build:
17+
runs-on: windows-2019
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
with:
22+
submodules: 'true'
23+
fetch-depth: 0
24+
25+
- name: Gets latest created release info
26+
id: latest_release_info
27+
uses: jossef/action-latest-release-info@v1.1.0
28+
env:
29+
GITHUB_TOKEN: ${{ github.token }}
30+
31+
- name: EASTL special treatment
32+
run: |
33+
cd lib/EASTL
34+
git submodule update --init
35+
36+
- name: Create Build Environment
37+
run: cmake -E make_directory ${{runner.workspace}}/build
38+
39+
- name: Configure CMake
40+
shell: bash
41+
working-directory: ${{runner.workspace}}/build
42+
# Note the current convention is to use the -S and -B options here to specify source
43+
# and build directories, but this is only available with CMake 3.13 and higher.
44+
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
45+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G "Visual Studio 16 2019" -A x64
46+
47+
- name: Build OFS
48+
working-directory: ${{runner.workspace}}/build
49+
shell: bash
50+
run: |
51+
cmake --build . --config $BUILD_TYPE --target "OpenFunscripter"
52+
53+
54+
- name: FFMPEG & Zip
55+
run: |
56+
choco install -y -r --no-progress 7zip
57+
choco install -y -r --no-progress InnoSetup
58+
powershell Invoke-WebRequest -Uri "https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-essentials.7z" -OutFile "${{runner.workspace}}\ffmpeg.7z"
59+
60+
mkdir "${{runner.workspace}}\ffmpeg"
61+
7z e "${{runner.workspace}}\ffmpeg.7z" -o${{runner.workspace}}\ffmpeg
62+
cp "${{runner.workspace}}\ffmpeg\ffmpeg.exe" "${{runner.workspace}}\OFS\bin\Release\ffmpeg.exe"
63+
powershell Compress-Archive "${{runner.workspace}}\OFS\bin\Release" "${{runner.workspace}}\OFS-64x_${{github.sha}}.zip"
64+
65+
# - uses: actions/upload-artifact@v2
66+
# with:
67+
# name: OFS-64x_${{github.sha}}.zip
68+
# path: ${{runner.workspace}}\OFS-64x_${{github.sha}}.zip
69+
70+
- name: Installer
71+
run: iscc "${{runner.workspace}}\OFS\ofs-installer.iss"
72+
73+
# - uses: actions/upload-artifact@v2
74+
# with:
75+
# name: OFS-64x_${{github.sha}}.exe
76+
# path: ${{runner.workspace}}\OFS\installer\ofs-installer.exe
77+
78+
- name: Upload Release Zip
79+
id: upload-release-zip
80+
uses: actions/upload-release-asset@v1
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
with:
84+
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
85+
asset_path: ${{runner.workspace}}\OFS-64x_${{github.sha}}.zip
86+
asset_name: OFS-64x_${{github.sha}}.zip
87+
asset_content_type: application/octet-stream
88+
89+
- name: Upload Release Installer
90+
id: upload-release-installer
91+
uses: actions/upload-release-asset@v1
92+
env:
93+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
with:
95+
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
96+
asset_path: ${{runner.workspace}}\OFS\installer\ofs-installer.exe
97+
asset_name: OFS-64x_${{github.sha}}.exe
98+
asset_content_type: application/octet-stream

ofs-installer.iss

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
#define Configuration "Release"
22

3-
#define Version GetEnv('appveyor_build_version')
4-
#if Version == ""
5-
#define Version ""
6-
#endif
7-
83
[Setup]
94
AppName=OpenFunscripter
10-
AppVersion={#Version}
5+
AppVersion=1.0
116
AppPublisher=OpenFunscripter
127
AppPublisherURL=www.github.com/OpenFunscripter/OFS
138
AppId=OpenFunscripter/OFS
14-
9+
ArchitecturesInstallIn64BitMode=x64
1510
DefaultDirName={pf}\OpenFunscripter
1611
DefaultGroupName=OpenFunscripter
1712
UninstallDisplayIcon={app}\OpenFunscripter.exe
@@ -23,7 +18,7 @@ OutputDir=.\installer
2318
[Files]
2419
Source: "bin\{#Configuration}\OpenFunscripter.exe"; DestDir: "{app}"
2520
Source: "bin\{#Configuration}\*.dll"; DestDir: "{app}"
26-
Source: "ffmpeg\ffmpeg.exe"; DestDir: "{app}"
21+
Source: "bin\{#Configuration}\ffmpeg.exe"; DestDir: "{app}"
2722
Source: "data\*"; Flags: recursesubdirs; DestDir: "{app}\data"
2823

2924
[Icons]

0 commit comments

Comments
 (0)