Skip to content

Commit

Permalink
#1490: fixed export game for win7
Browse files Browse the repository at this point in the history
  • Loading branch information
nesbox committed Jul 20, 2021
1 parent 5e1f93a commit 4fdbdec
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
shell: cmd
run: |
cd build
cmake -G "Visual Studio 16 2019" -A Win32 -T v141_xp -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ..
cmake -G "Visual Studio 16 2019" -A Win32 -T v141_xp -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_STUB=On ..
cmake --build . --config %BUILD_TYPE% --parallel
- name: Deploy
Expand All @@ -30,6 +30,12 @@ jobs:
name: 'tic80-winxp-sdl'
path: build/bin/tic80.exe

- name: Deploy stubs
uses: actions/upload-artifact@v2
with:
name: 'tic80-winxp-sdl-stub'
path: build/bin/tic80*.exe

# === Windows SDL2 ===
windows-sdl:
runs-on: windows-latest
Expand Down Expand Up @@ -493,10 +499,16 @@ jobs:
# === Export ===
export:
needs: [windows-sdl, linux-sdl, rpi, macos-sdl, wasm]
needs: [winxp-sdl, windows-sdl, linux-sdl, rpi, macos-sdl, wasm]
runs-on: ubuntu-latest

steps:
- name: Download Windows XP artifact
uses: actions/download-artifact@v2
with:
name: tic80-winxp-sdl
path: winxpdir

- name: Download Windows artifact
uses: actions/download-artifact@v2
with:
Expand Down Expand Up @@ -528,6 +540,7 @@ jobs:

- name: Rename
run: |
cp winxpdir/* winxp
cp windir/* win
cp linuxdir/* linux
cp macdir/* mac
Expand All @@ -540,6 +553,7 @@ jobs:
with:
name: 'tic80-export'
path: |
winxp
win
linux
mac
Expand All @@ -555,6 +569,12 @@ jobs:
script: [lua, moon, fennel, js, wren, squirrel]

steps:
- name: Download Windows XP artifact
uses: actions/download-artifact@v2
with:
name: tic80-winxp-sdl-stub
path: winxpdir

- name: Download Windows artifact
uses: actions/download-artifact@v2
with:
Expand Down Expand Up @@ -586,6 +606,7 @@ jobs:

- name: Rename
run: |
cp winxpdir/tic80${{ matrix.script }}.exe winxp${{ matrix.script }}
cp windir/tic80${{ matrix.script }}.exe win${{ matrix.script }}
cp linuxdir/tic80${{ matrix.script }} linux${{ matrix.script }}
cp rpidir/tic80${{ matrix.script }} rpi${{ matrix.script }}
Expand All @@ -599,6 +620,7 @@ jobs:
with:
name: 'tic80-export'
path: |
winxp${{ matrix.script }}
win${{ matrix.script }}
linux${{ matrix.script }}
rpi${{ matrix.script }}
Expand All @@ -617,6 +639,7 @@ jobs:
name: |
tic80-rpi
tic80-macos-sdl
tic80-winxp-sdl-stub
tic80-windows-sdl-stub
tic80-linux-sdl-stub
tic80-rpi-stub
Expand Down
6 changes: 6 additions & 0 deletions src/studio/screens/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@

#define EXPORT_CMD_LIST(macro) \
macro(win) \
macro(winxp) \
macro(linux) \
macro(rpi) \
macro(mac) \
Expand Down Expand Up @@ -1969,6 +1970,11 @@ static void onExport_win(Console* console, const char* param, const char* filena
exportNativeGame(console, getFilename(filename, ".exe"), param, params);
}

static void onExport_winxp(Console* console, const char* param, const char* filename, ExportParams params)
{
exportNativeGame(console, getFilename(filename, ".exe"), param, params);
}

static void onExport_linux(Console* console, const char* param, const char* filename, ExportParams params)
{
exportNativeGame(console, filename, param, params);
Expand Down

0 comments on commit 4fdbdec

Please sign in to comment.