5555 build-essential \
5656 pkg-config \
5757 make \
58+ cmake \
5859 git \
5960 zip \
6061 fuse \
@@ -98,10 +99,10 @@ jobs:
9899 libcurl-devel
99100 mingw-w64-x86_64-7zip
100101 mingw-w64-x86_64-directx-headers
101- mingw-w64-x86_64-ncurses
102+ mingw-w64-x86_64-make
102103 mingw-w64-x86_64-toolchain
103104 mingw-w64-x86_64-minizip
104- mingw-w64-x86_64-gcc
105+ mingw-w64-x86_64-cmake
105106 mingw-w64-x86_64-zbar
106107 mingw-w64-x86_64-make
107108 mingw-w64-x86_64-tesseract-ocr
@@ -116,19 +117,25 @@ jobs:
116117 - name : Build project (Linux)
117118 if : matrix.os != 'windows-latest'
118119 run : |
119- make all DEBUG=0 LDFLAGS="-Wl,--as-needed"
120+ #make all DEBUG=0 LDFLAGS="-Wl,--as-needed"
121+ mkdir -p build
122+ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
123+ cd build && make
120124
121125 - name : Build project (Windows)
122126 if : matrix.os == 'windows-latest'
123127 shell : msys2 {0}
124128 run : |
125- mingw32-make all DEBUG=0
129+ #mingw32-make all DEBUG=0 WINDOWS_CMD=0
130+ mkdir -p build
131+ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWINDOWS_CMD=OFF
132+ cd build && make
126133
127134 - name : Prepare Linux package
128135 if : matrix.os == 'ubuntu-latest'
129136 run : |
130137 mkdir -p package/oshot
131- cp ./build/release/ oshot ./launcher/oshot_launcher.py package/oshot/
138+ cp ./build/oshot ./launcher/oshot_launcher.py package/oshot/
132139 echo "#!/bin/bash" > package/oshot/install.sh
133140 echo "cp oshot /usr/local/bin/oshot" >> package/oshot/install.sh
134141 echo "cp oshot_launcher.py /usr/local/bin/oshot_launcher" >> package/oshot/install.sh
@@ -140,7 +147,7 @@ jobs:
140147 if : matrix.os == 'ubuntu-22.04'
141148 run : |
142149 mkdir -p package/oshot
143- ./scripts/create_appimage.sh ./build/release/ oshot oshot-x86_64.AppImage
150+ ./scripts/create_appimage.sh ./build/oshot oshot-x86_64.AppImage
144151 chmod +x oshot-x86_64.AppImage
145152 mv oshot-x86_64.AppImage package/oshot/
146153 cp ./launcher/oshot_launcher.py package/oshot/
@@ -153,7 +160,7 @@ jobs:
153160 run : |
154161 mkdir -p package/oshot
155162 sed -i 's|#!/bin/env python3|#!python|' launcher/oshot_launcher.py
156- cp ./build/release/ oshot.exe package/oshot/
163+ cp ./build/oshot.exe package/oshot/
157164 cp ./launcher/oshot_launcher.py package/oshot/oshot_launcher.pyw
158165 # Copy required DLLs
159166 ldd ./build/release/oshot.exe | grep -i mingw | awk '{print $3}' | xargs -I {} cp {} package/oshot/ || true
0 commit comments