From 66ece23cf162e309dea8085f76617629d308d147 Mon Sep 17 00:00:00 2001 From: Tobias Predel Date: Fri, 15 Nov 2024 07:41:51 +0100 Subject: [PATCH] Put Windows-specific stuff into win directory --- .github/workflows/build.yml | 10 +++++----- README.md | 2 +- src/stdafx.h | 2 +- TS_installer.nsi => win/TS_installer.nsi | 14 +++++++------- {treesheets => win}/boar.aps | Bin {treesheets => win}/boar.rc | 0 {treesheets => win}/dot3inst.bmp | Bin {treesheets => win}/icon1.ico | Bin {treesheets => win}/resource.h | 0 {treesheets => win}/treesheets-16x16.png | Bin {treesheets => win}/treesheets-32x32.png | Bin {treesheets => win}/treesheets.sln | 0 {treesheets => win}/treesheets.vcxproj | 0 {treesheets => win}/treesheets.vcxproj.filters | 0 {treesheets => win}/treesheets.vcxproj.user | 0 {treesheets => win}/tsinst.bmp | Bin 16 files changed, 14 insertions(+), 14 deletions(-) rename TS_installer.nsi => win/TS_installer.nsi (92%) rename {treesheets => win}/boar.aps (100%) rename {treesheets => win}/boar.rc (100%) rename {treesheets => win}/dot3inst.bmp (100%) rename {treesheets => win}/icon1.ico (100%) rename {treesheets => win}/resource.h (100%) rename {treesheets => win}/treesheets-16x16.png (100%) rename {treesheets => win}/treesheets-32x32.png (100%) rename {treesheets => win}/treesheets.sln (100%) rename {treesheets => win}/treesheets.vcxproj (100%) rename {treesheets => win}/treesheets.vcxproj.filters (100%) rename {treesheets => win}/treesheets.vcxproj.user (100%) rename {treesheets => win}/tsinst.bmp (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 84cbd599..432a98ee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,7 +67,7 @@ jobs: run: msbuild.exe build/msw/wx_vc14.sln /p:Configuration=Release /p:Platform=x64 /p:RuntimeLibrary=MultiThreaded - name: build TreeSheets run: | - msbuild.exe TreeSheets\treesheets.sln /p:Configuration=Release /p:Platform=x64 + msbuild.exe win\treesheets.sln /p:Configuration=Release /p:Platform=x64 Remove-Item TS\*.pdb Remove-Item TS\*.ipdb Remove-Item TS\*.iobj @@ -80,7 +80,7 @@ jobs: - name: Create installer uses: joncloud/makensis-action@v4 with: - script-file: "TS_installer.nsi" + script-file: "win/TS_installer.nsi" arguments: "/V3" - name: upload build artifacts if: github.ref == 'refs/heads/master' @@ -109,9 +109,9 @@ jobs: - uses: actions/checkout@v4 - name: Prepare Plist run: | - /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $(date +'%Y%m%d%H%M%S')" osx/Info.plist - /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $(date +'%Y.%m.%d')" osx/Info.plist - /usr/libexec/PlistBuddy -c "Set :LSMinimumSystemVersion $minmac" osx/Info.plist + /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $(date +'%Y%m%d%H%M%S')" platforms/osx/Info.plist + /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $(date +'%Y.%m.%d')" platforms/osx/Info.plist + /usr/libexec/PlistBuddy -c "Set :LSMinimumSystemVersion $minmac" platforms/osx/Info.plist - name: cmake run: cmake -S . -B _build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="$minmac" -DCMAKE_INSTALL_PREFIX=macos-bundle - name: Build TreeSheets diff --git a/README.md b/README.md index 2ae7f2cc..35483128 100755 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ Windows: to Multithreaded 4. Build solution in both x64 Debug and Release 5. Close the wxWidgets solution -6. "treesheets" contains the Visual Studio 2022 files for treesheets, open the .sln. +6. `platforms/win32` contains the Visual Studio 2022 files for treesheets, open the .sln. If you've done the above correctly, TreeSheets will now compile and pick up the wxWidgets libraries. 7. To distribute, build an installer with `TS_installer.nsi` (requires nsis.sourceforge.net) diff --git a/src/stdafx.h b/src/stdafx.h index 28674b37..66c646b0 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -81,7 +81,7 @@ #include "tools.h" #ifdef _WIN32 - #include "..\treesheets\resource.h" + #include "..\win\resource.h" #include "StackWalker\StackWalkerHelpers.h" #endif diff --git a/TS_installer.nsi b/win/TS_installer.nsi similarity index 92% rename from TS_installer.nsi rename to win/TS_installer.nsi index 6ed90485..5da14783 100644 --- a/TS_installer.nsi +++ b/win/TS_installer.nsi @@ -2,11 +2,11 @@ !include "MUI2.nsh" !define MUI_FINISHPAGE_RUN "$INSTDIR\TreeSheets.exe" !define MUI_HEADERIMAGE -!define MUI_HEADERIMAGE_BITMAP "TreeSheets\tsinst.bmp" -!define MUI_ICON "TreeSheets\icon1.ico" +!define MUI_HEADERIMAGE_BITMAP "tsinst.bmp" +!define MUI_ICON "icon1.ico" /* doesn't show? -!define MUI_HEADERIMAGE_UNBITMAP "TreeSheets\tsinst.bmp" +!define MUI_HEADERIMAGE_UNBITMAP "tsinst.bmp" */ Unicode true @@ -49,12 +49,12 @@ SetCompressor /SOLID lzma AddBrandingImage top 65 Function ba - File TreeSheets\dot3.bmp - SetBrandingImage TreeSheets\dot3.bmp + File dot3.bmp + SetBrandingImage dot3.bmp FunctionEnd Function un.ba - SetBrandingImage TreeSheets\dot3.bmp + SetBrandingImage dot3.bmp FunctionEnd */ @@ -83,7 +83,7 @@ Section "TreeSheets (required)" SetOutPath $INSTDIR - File /r "TS\*.*" + File /r "..\..\TS\*.*" WriteRegStr HKCU SOFTWARE\TreeSheets "Install_Dir" "$INSTDIR" diff --git a/treesheets/boar.aps b/win/boar.aps similarity index 100% rename from treesheets/boar.aps rename to win/boar.aps diff --git a/treesheets/boar.rc b/win/boar.rc similarity index 100% rename from treesheets/boar.rc rename to win/boar.rc diff --git a/treesheets/dot3inst.bmp b/win/dot3inst.bmp similarity index 100% rename from treesheets/dot3inst.bmp rename to win/dot3inst.bmp diff --git a/treesheets/icon1.ico b/win/icon1.ico similarity index 100% rename from treesheets/icon1.ico rename to win/icon1.ico diff --git a/treesheets/resource.h b/win/resource.h similarity index 100% rename from treesheets/resource.h rename to win/resource.h diff --git a/treesheets/treesheets-16x16.png b/win/treesheets-16x16.png similarity index 100% rename from treesheets/treesheets-16x16.png rename to win/treesheets-16x16.png diff --git a/treesheets/treesheets-32x32.png b/win/treesheets-32x32.png similarity index 100% rename from treesheets/treesheets-32x32.png rename to win/treesheets-32x32.png diff --git a/treesheets/treesheets.sln b/win/treesheets.sln similarity index 100% rename from treesheets/treesheets.sln rename to win/treesheets.sln diff --git a/treesheets/treesheets.vcxproj b/win/treesheets.vcxproj similarity index 100% rename from treesheets/treesheets.vcxproj rename to win/treesheets.vcxproj diff --git a/treesheets/treesheets.vcxproj.filters b/win/treesheets.vcxproj.filters similarity index 100% rename from treesheets/treesheets.vcxproj.filters rename to win/treesheets.vcxproj.filters diff --git a/treesheets/treesheets.vcxproj.user b/win/treesheets.vcxproj.user similarity index 100% rename from treesheets/treesheets.vcxproj.user rename to win/treesheets.vcxproj.user diff --git a/treesheets/tsinst.bmp b/win/tsinst.bmp similarity index 100% rename from treesheets/tsinst.bmp rename to win/tsinst.bmp