mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Add ConvertColorCursors to CMake, port to *nix
Also swaps \ for / in paths. This should still work fine on Windows.
This commit is contained in:
@@ -453,5 +453,20 @@ if(FREETYPE_FOUND)
|
||||
target_link_libraries(GenerateFonts PortabilityLayer GpFontHandler_FreeType2)
|
||||
endif()
|
||||
|
||||
add_executable(ConvertColorCursors
|
||||
ConvertColorCursors/ConvertColorCursors.cpp
|
||||
AerofoilPortable/GpAllocator_C.cpp
|
||||
stb/stb_image_write.c
|
||||
)
|
||||
target_include_directories(ConvertColorCursors PRIVATE
|
||||
Common
|
||||
GpCommon
|
||||
PortabilityLayer
|
||||
AerofoilPortable
|
||||
stb
|
||||
UnixCompat
|
||||
)
|
||||
target_link_libraries(ConvertColorCursors PortabilityLayer)
|
||||
|
||||
|
||||
install (TARGETS ${EXECNAME})
|
||||
|
@@ -10,6 +10,10 @@
|
||||
#include "PLDrivers.h"
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include "UnixCompat.h"
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -93,7 +97,7 @@ void ConvertIconFamily(PortabilityLayer::ResourceFile *resFile, int32_t iconBitm
|
||||
}
|
||||
|
||||
char outPath[256];
|
||||
sprintf_s(outPath, "Aerofoil\\ConvertedResources\\%s%i.ico", prefix, resID);
|
||||
sprintf_s(outPath, "Aerofoil/ConvertedResources/%s%i.ico", prefix, resID);
|
||||
|
||||
FILE *outF = nullptr;
|
||||
errno_t outErr = fopen_s(&outF, outPath, "wb");
|
||||
@@ -137,7 +141,7 @@ void ConvertIconFamily(PortabilityLayer::ResourceFile *resFile, int32_t iconBitm
|
||||
int main(int argc, const char **argv)
|
||||
{
|
||||
FILE *f = nullptr;
|
||||
errno_t err = fopen_s(&f, "Packaged\\ApplicationResources.gpr", "rb");
|
||||
errno_t err = fopen_s(&f, "Packaged/ApplicationResources.gpr", "rb");
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
Reference in New Issue
Block a user