Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
winseros committed Dec 1, 2021
2 parents fef2a9d + 3156647 commit b34fea6
Show file tree
Hide file tree
Showing 225 changed files with 3,796 additions and 2,095 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/artifcats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defaults:
jobs:
release:
name: Make artifacts
runs-on: windows-2019
runs-on: windows-2022
steps:
- name: Set Short Sha
run: |
Expand All @@ -33,19 +33,20 @@ jobs:
echo "pbom_build_number=${{github.run_number}} (${{env.git_sha}})" >> $env:GITHUB_ENV
echo "pbom_installer_version=0.0.${{github.run_number}}" >> $env:GITHUB_ENV
- name: Install MSVC 2019
- name: Install MSVC 2022
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

- name: Install Qt6
uses: jurplel/install-qt-action@v2
with:
version: '6.1.1'
version: '6.2.1'
host: windows
target: desktop
arch: win64_msvc2019_64
dir: ${{github.workspace}}
tools: tools_openssl_x64,1.1.1-10,qt.tools.openssl.win_x64

- name: Checkout
uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defaults:
jobs:
release:
name: Run tests
runs-on: windows-2019
runs-on: windows-2022
steps:
- name: Set Short Sha
run: |
Expand All @@ -26,15 +26,15 @@ jobs:
echo "pbom_version=$('${{github.ref}}' -replace 'refs/heads/','' -replace '[^\w\d]','_')" >> $env:GITHUB_ENV
echo "pbom_build_number=${{github.run_number}} (${{env.git_sha}})" >> $env:GITHUB_ENV
- name: Install MSVC 2019
- name: Install MSVC 2022
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

- name: Install Qt6
uses: jurplel/install-qt-action@v2
with:
version: '6.1.1'
version: '6.2.1'
host: windows
target: desktop
arch: win64_msvc2019_64
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# PBO Manager change log

## Version 1.1.0

- [Enhancement] UI no longer freezes when opening a PBO
- [Enhancement] UI no longer freezes when pasting files into a PBO from the file system
- [Enhancement] Progress operations are displayed in the Windows taskbar
- [Enhancement] The application now can check for a new version. See "Help->Check for updates"
- [Fix] If make any changes in a PBO while saving, the PBO got corrupted
- [Fix] If "Cancel" while saving a PBO had a chance to corrupt
- [Fix] The "pack" console command was interpreting "-o" option incorrectly
- [Fix] It was possible to rename a file inside a PBO, if there was a file with the same name in a different casing
- [Fix] The context menu "Extract to <folder_name>" had a superfluous file extension

## Version 1.0.0
- Support of normal PBOs
- Support of Mikero's mangled PBOs
- Windows explorer integration
- Windows explorer integration
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ cmake_minimum_required(VERSION 3.5)
project(pboman3 LANGUAGES CXX)

set(PBOM_BUILD_NUMBER "build \(ver\)" CACHE STRING "App build number")
set(PBOM_VERSION "version" CACHE STRING "App release version")
set(PBOM_VERSION "0.0.1" CACHE STRING "App release version")

add_definitions(-DPBOM_PROJECT_NAME="PBO Manager")
add_definitions(-DPBOM_BUILD_NUMBER="${PBOM_BUILD_NUMBER}")
add_definitions(-DPBOM_VERSION="${PBOM_VERSION}")
add_definitions(-DPBOM_PROJECT_SITE="https://github.com/winseros/pboman3")
add_definitions(-DPBOM_API_SITE="https://api.github.com/repos/winseros/pboman3")

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
1 change: 1 addition & 0 deletions Folder.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=ifolderopened/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=pboman/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=QTAPP/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Taskbar/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unregister/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
33 changes: 27 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,32 @@ A tool to open, pack and unpack ArmA PBO files.

## Building from source

```
# powershell
git clone --recurse-submodules git@github.com:winseros/pboman3.git
cmake -S <path_to_source_code> -B <path_to_build_files>
cmake --build <path_to_build_files>
```
1. Set the env variables:

| Variable | Description | Example |
|----------|-------------------------------------------------------------------|---------------------------------|
| QT_DIR | Where QT is located. Needed for CMAKE to build. | G:\Qt\6.1.1\msvc2019_64 |


2. Run the script:

```
# powershell
git clone --recurse-submodules git@github.com:winseros/pboman3.git
cmake -S <path_to_source_code> -B <path_to_build_files>
cmake --build <path_to_build_files>
```

Also, see [how CI builds](.github/workflows/artifcats.yaml).

## Open in IDE

1. Set the env variabls:

| Variable | Description | Example |
|----------|-------------------------------------------------------------------|---------------------------------|
| QT_DIR | Where QT is located. Needed for CMAKE to build. | G:\Qt\6.1.1\msvc2019_64 |
| PATH | Where QT binaries are located. Needed for the IDE to run/debug. | G:\Qt\6.1.1\msvc2019_64\bin |
| PATH | Where OpenSSL binaries are located. Needed for IDE to run/debug. | G:\Qt\Tools\OpenSSL\Win_x64\bin |

2. Open the the root folder in IDE
29 changes: 29 additions & 0 deletions installer/PBOManager.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<Directory Id="D_ImageFormats" Name="ImageFormats" />
<Directory Id="D_Platforms" Name="Platforms" />
<Directory Id="D_Styles" Name="Styles" />
<Directory Id="D_Tls" Name="Tls" />
</DirectoryRef>

<ComponentGroup Id="CG_MainFiles">
Expand All @@ -69,9 +70,13 @@
<ComponentRef Id="C_MainFiles__Qt6Core.dll" />
<ComponentRef Id="C_MainFiles__Qt6Gui.dll" />
<ComponentRef Id="C_MainFiles__Qt6Widgets.dll" />
<ComponentRef Id="C_MainFiles__Qt6Network.dll" />
<ComponentRef Id="C_MainFiles__LibCrypto.dll" />
<ComponentRef Id="C_MainFiles__LibSsl.dll" />
<ComponentRef Id="C_MainFiles__ImageFormats__qico.dll" />
<ComponentRef Id="C_MainFiles__Platforms__qwindows.dll" />
<ComponentRef Id="C_MainFiles__Styles__qwindowsvistastyle.dll" />
<ComponentRef Id="C_MainFiles__Tls__qopensslbackend.dll" />
</ComponentGroup>

<Feature Id="F_MainFiles" Title="Application" Level="1" InstallDefault="local" Absent="disallow"
Expand Down Expand Up @@ -152,6 +157,21 @@
<File Id="F_MainFiles__Qt6Widgets.dll" KeyPath="yes" Vital="yes"
Source="$(var.ArtifactsFolder)Qt6Widgets.dll" />
</Component>

<Component Id="C_MainFiles__Qt6Network.dll" Guid="789B6BB3-0304-4CEE-A675-D250A610F1BE" Win64="yes">
<File Id="F_MainFiles__Qt6Network.dll" KeyPath="yes" Vital="yes"
Source="$(var.ArtifactsFolder)Qt6Network.dll" />
</Component>

<Component Id="C_MainFiles__LibCrypto.dll" Guid="D20CBC68-368C-4B9C-A86B-0DC53656BAD4" Win64="yes">
<File Id="F_MainFiles__LibCrypto.dll" KeyPath="yes" Vital="yes"
Source="$(var.ArtifactsFolder)libcrypto-1_1-x64.dll" />
</Component>

<Component Id="C_MainFiles__LibSsl.dll" Guid="3F707811-31E4-4EAE-BB35-2F7013107C7C" Win64="yes">
<File Id="F_MainFiles__LibSsl.dll" KeyPath="yes" Vital="yes"
Source="$(var.ArtifactsFolder)libssl-1_1-x64.dll" />
</Component>
</DirectoryRef>

<DirectoryRef Id="D_ImageFormats">
Expand All @@ -176,6 +196,14 @@
Source="$(var.ArtifactsFolder)Styles\qwindowsvistastyle.dll" />
</Component>
</DirectoryRef>

<DirectoryRef Id="D_Tls">
<Component Id="C_MainFiles__Tls__qopensslbackend.dll" Guid="864E2C73-369B-42AF-88E4-989C858C04E2"
Win64="yes">
<File Id="F_MainFiles__Tls__qopensslbackend.dll" KeyPath="yes" Vital="yes"
Source="$(var.ArtifactsFolder)Tls\qopensslbackend.dll" />
</Component>
</DirectoryRef>
</Fragment>

<Fragment>
Expand Down Expand Up @@ -226,6 +254,7 @@
<Publish Dialog="MachineOrUserDlg" Control="Next" Property="MSIINSTALLPERUSER" Value="{}">PbomInstallPer = "machine"</Publish>
<Publish Dialog="MachineOrUserDlg" Control="Next" Property="INSTALLFOLDER" Value="[PbomMainFilesUserFolder]">PbomInstallPer = "user"</Publish>
<Publish Dialog="MachineOrUserDlg" Control="Next" Property="INSTALLFOLDER" Value="[PbomMainFilesMachineFolder]">PbomInstallPer = "machine"</Publish>
<Publish Dialog="MachineOrUserDlg" Control="Next" Event="DoAction" Value="FindRelatedProducts" Order="10">1</Publish>
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="MachineOrUserDlg">1</Publish>

<Dialog Id="MachineOrUserDlg" Width="370" Height="270" Title="!(loc.InstallScopeDlg_Title)"
Expand Down
135 changes: 19 additions & 116 deletions pbom/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,93 +11,19 @@ endif()
set(WIN32_VER 0x0A00) #https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-160

set(CMAKE_FIND_DEBUG_MODE FALSE)
find_package(QT NAMES Qt6 COMPONENTS Widgets Test REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets Test REQUIRED)
find_package(QT NAMES Qt6 COMPONENTS Widgets Network Test REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets Network Test REQUIRED)

set(PROJECT_SOURCES
io/bb/binarybackend.cpp
io/bb/execbackend.cpp
io/bb/nodefilesystem.cpp
io/bb/sanitizedstring.cpp
io/bb/tempbackend.cpp
io/bb/unpackbackend.cpp
io/bb/unpacktaskbackend.cpp
io/bs/binarysource.cpp
io/bs/fslzhbinarysource.cpp
io/bs/fsrawbinarysource.cpp
io/bs/pbobinarysource.cpp
io/lzh/compressionbuffer.cpp
io/lzh/compressionchunk.cpp
io/lzh/decompressioncontext.cpp
io/lzh/lzh.cpp
io/lzh/lzhdecompressionexception.cpp
io/pbodatastream.cpp
io/pbofile.cpp
io/pboheaderio.cpp
io/pboheaderreader.cpp
io/pboioexception.cpp
io/pbowriter.cpp
model/task/packtask.cpp
model/task/packwindowmodel.cpp
model/task/task.h
model/task/taskwindowmodel.cpp
model/task/unpacktask.cpp
model/task/unpackwindowmodel.cpp
model/conflictsparcel.cpp
model/diskaccessexception.cpp
model/headersmodel.cpp
model/interactionparcel.cpp
model/pboentry.cpp
model/pbofileformatexception.cpp
model/pboheader.cpp
model/pbomodel.cpp
model/pbonode.cpp
model/pbonodeevents.cpp
model/pbopath.cpp
model/rootreader.cpp
model/signaturemodel.cpp
ui/progresswidget/progresswidget.cpp
ui/treewidget/deleteop.cpp
ui/treewidget/treewidget.cpp
ui/treewidget/treewidgetbase.cpp
ui/treewidget/treewidgetitem.cpp
ui/win32/win32iconmgr.cpp
ui/win32/win32fileviewer.cpp
ui/aboutdialog.cpp
ui/aboutdialog.ui
ui/closedialog.cpp
ui/closedialog.ui
ui/compresslist.cpp
ui/conflictslist.cpp
ui/errordialog.ui
ui/errordialog.cpp
ui/fscollector.cpp
ui/headersdialog.cpp
ui/headersdialog.ui
ui/insertdialog.cpp
ui/insertdialog.ui
ui/insertdialogbuttons.cpp
ui/renamedialog.cpp
ui/renamedialog.ui
ui/mainwindow.cpp
ui/mainwindow.ui
ui/packwindow.cpp
ui/signaturedialog.cpp
ui/signaturedialog.ui
ui/statusbar.cpp
ui/statusbar.cpp
ui/taskwindow.cpp
ui/taskwindow.ui
ui/unpackwindow.cpp
util/exception.cpp
util/log.cpp
util/util.cpp
)
add_subdirectory(domain)
add_subdirectory(io)
add_subdirectory(model)
add_subdirectory(ui)
add_subdirectory(util)

qt_add_resources(PROJECT_SOURCES res/res.qrc)
qt_add_executable(pbom ${PROJECT_SOURCES} main.cpp res/winapp.rc)
qt_add_executable(pbom ${PROJECT_SOURCES} exception.cpp main.cpp res/winapp.rc)

target_link_libraries(pbom PRIVATE Qt${QT_VERSION_MAJOR}::Widgets CLI11)
target_link_libraries(pbom PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network CLI11)
target_include_directories(pbom PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(pbom PRIVATE WINVER=${WIN32_VER} NOMINMAX)

Expand All @@ -115,6 +41,7 @@ install(FILES
${QT_BINARIES_DIR}/bin/Qt6Core${QT_BINARIES_SUFFIX}.dll
${QT_BINARIES_DIR}/bin/Qt6Gui${QT_BINARIES_SUFFIX}.dll
${QT_BINARIES_DIR}/bin/Qt6Widgets${QT_BINARIES_SUFFIX}.dll
${QT_BINARIES_DIR}/bin/Qt6Network${QT_BINARIES_SUFFIX}.dll
DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES
${QT_BINARIES_DIR}/plugins/imageformats/qico${QT_BINARIES_SUFFIX}.dll
Expand All @@ -125,41 +52,17 @@ install(FILES
install(FILES
${QT_BINARIES_DIR}/plugins/styles/qwindowsvistastyle${QT_BINARIES_SUFFIX}.dll
DESTINATION ${CMAKE_INSTALL_BINDIR}/styles)
install(FILES
${QT_BINARIES_DIR}/plugins/tls/qopensslbackend${QT_BINARIES_SUFFIX}.dll
DESTINATION ${CMAKE_INSTALL_BINDIR}/tls)
install(FILES
${QT_BINARIES_DIR}/../../Tools/OpenSSL/Win_x64/bin/libssl-1_1-x64.dll
${QT_BINARIES_DIR}/../../Tools/OpenSSL/Win_x64/bin/libcrypto-1_1-x64.dll
DESTINATION ${CMAKE_INSTALL_BINDIR})

set(TEST_SOURCES
"io/bb/__test__/execbackend_test.cpp"
"io/bb/__test__/nodefilesystem_test.cpp"
"io/bb/__test__/sanitizedstring_test.cpp"
"io/bb/__test__/tempbackend_test.cpp"
"io/bb/__test__/unpackbackend_test.cpp"
"io/bs/__test__/fslzhbinarysource_test.cpp"
"io/bs/__test__/fsrawbinarysource_test.cpp"
"io/bs/__test__/pbobinarysource_test.cpp"
"io/lzh/__test__/compressionbuffer_test.cpp"
"io/lzh/__test__/compressionchunk_test.cpp"
"io/lzh/__test__/lzh_test.cpp"
"io/__test__/pbofile_test.cpp"
"io/__test__/pboheaderio_test.cpp"
"io/__test__/pboheaderreader_test.cpp"
"io/__test__/pbowriter_test.cpp"
"model/__test__/conflictsparcel_test.cpp"
"model/__test__/headersmodel_test.cpp"
"model/__test__/interactionparcel_test.cpp"
"model/__test__/pboentry_test.cpp"
"model/__test__/pboheader_test.cpp"
"model/__test__/pbonode_test.cpp"
"model/__test__/pbopath_test.cpp"
"model/__test__/rootreader_test.cpp"
"model/__test__/signaturemodel_test.cpp"
"ui/__test__/fscollector__test.cpp"
"ui/treewidget/__test__/treewidgetbase__test.cpp"
"util/__test__/qpointerlistiterator_test.cpp"
"util/__test__/util_test.cpp"
)

add_executable(pbom_test ${PROJECT_SOURCES} ${TEST_SOURCES} testmain.cpp)
add_executable(pbom_test ${PROJECT_SOURCES} ${TEST_SOURCES} exception.cpp testmain.cpp)
add_test(NAME pbom_test COMMAND pbom_test)
target_link_libraries(pbom_test PRIVATE Qt${QT_VERSION_MAJOR}::Widgets gtest gmock)
target_link_libraries(pbom_test PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network gtest gmock)
target_include_directories(pbom_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})

target_compile_definitions(pbom_test PRIVATE
Expand Down
25 changes: 25 additions & 0 deletions pbom/domain/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
list(APPEND PROJECT_SOURCES
"domain/binarysource.cpp"
"domain/documentheader.cpp"
"domain/documentheaders.cpp"
"domain/documentheaderstransaction.cpp"
"domain/func.cpp"
"domain/pbodocument.cpp"
"domain/pbonode.cpp"
"domain/pbonodetransaction.cpp"
"domain/pbopath.cpp"
"domain/validationexception.cpp")

set(PROJECT_SOURCES ${PROJECT_SOURCES} PARENT_SCOPE)

list(APPEND TEST_SOURCES
"domain/__test__/documentheader_test.cpp"
"domain/__test__/documentheaders_test.cpp"
"domain/__test__/documentheaderstransaction_test.cpp"
"domain/__test__/func_test.cpp"
"domain/__test__/pbodocument_test.cpp"
"domain/__test__/pbonode_test.cpp"
"domain/__test__/pbonodetransaction_test.cpp"
"domain/__test__/pbopath_test.cpp")

set(TEST_SOURCES ${TEST_SOURCES} PARENT_SCOPE)
Loading

0 comments on commit b34fea6

Please sign in to comment.