Skip to content

Commit

Permalink
Feature windows build fix (#9)
Browse files Browse the repository at this point in the history
* fix build for windows

code fixes and add regex lib files to project

* vcxproj for all platforms build

#define ZLIB_WINAPI commented due to win32 zlib linking error

* move regex to lib directory

* Add windows build workflow (#11)

* Test windows runner

* Add build-nzbget-vs22.bat. Update nzbget.vcxproj.

* Add build stage on runner

* Add upload artifacts

* Update success exit code

* Update hardcoded windows resource directory

* Update include and lib file paths

* Add version detect from nzbget.vcxproj

* Update branches for build

---------

Co-authored-by: phnzb <139914799+phnzb@users.noreply.github.com>
  • Loading branch information
ureyNZB and phnzb authored Sep 6, 2023
1 parent f982d89 commit 7db7402
Show file tree
Hide file tree
Showing 9 changed files with 11,541 additions and 38 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and upload NZBGet for Windows

on:
push:
branches:
- feature-*
- develop
- master

jobs:
build:
runs-on: [self-hosted, windows]

steps:

- name: Checkout
uses: actions/checkout@v3

- name: Build
run: |
.\windows\build-nzbget-vs22.bat
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: nzbget-installers
path: C:\nzbget\build\output\*.exe
retention-days: 5
2 changes: 1 addition & 1 deletion daemon/main/nzbget.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ compiled */

#ifndef DISABLE_GZIP
// Static linking to zlib library
#define ZLIB_WINAPI
//#define ZLIB_WINAPI
#endif

/* Suppress warnings */
Expand Down
2 changes: 1 addition & 1 deletion daemon/util/FileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ CString FileSystem::MakeExtendedPath(const char* path, bool force)
else
{
// local path
longpath.Format("\\\\?\\%s", canonicalPath);
longpath.Format("\\\\?\\%s", std::move(canonicalPath));
}
return *longpath;
}
Expand Down
2 changes: 1 addition & 1 deletion daemon/util/Script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ void ScriptController::StartProcess(int* pipein, int* pipeout)
}
if (wcslen(wideWorkingDir) > 260)
{
PrintMessage(Message::mkError, "Could not build short path for %s", workingDir);
PrintMessage(Message::mkError, "Could not build short path for %s", std::move(workingDir));
}
CloseHandle(readPipe);
CloseHandle(readProcPipe);
Expand Down
Loading

0 comments on commit 7db7402

Please sign in to comment.