[Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Discussion of development and patch submission.
User avatar
dns2kv2
Posts: 67
Joined: Sun 19 Feb, 2017 3:30 am

Re: [Feb 2018 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by dns2kv2 »

Just share an update from my previous test, might save the day for others.

got this hick cup while updating pcem:

Code: Select all

mingw32-make clean
CDPATH="${ZSH_VERSION+.}:" && cd . && C:/msys32/usr/bin/sh.exe /home/{your username}/pcem/missing aclocal-1.15
aclocal-1.15: error: aclocal: file '/msys32/usr/share/aclocal/xsize.m4' does not exist
mingw32-make: *** [Makefile:354: aclocal.m4] Error 1

The cure is easy, add another "autoreconf -i" command before "mingw32-make clean" command:

Code: Select all

#clean previous build, redownload & update pcem sources then recompile pcem
#open MSYS2 MinGW 32-bit shell (C:\msys32\mingw32.exe) and run below command:
cd ~/pcem
autoreconf -i
mingw32-make clean
hg pull && hg update default
autoreconf -i
./configure --enable-networking --enable-release-build
mingw32-make -j
Zilog
Posts: 51
Joined: Wed 13 May, 2015 8:01 pm

Re: [Feb 2018 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by Zilog »

Hi To,
i have this problem when compile pcem on Windows:

collect2.exe: error: ld returned 1 exit status
mingw32-make[1]: *** [Makefile:908: pcem.exe] Error 1
mingw32-make[1]: Leaving directory 'D:/_msys64/home/user/pcem/src'
mingw32-make: *** [Makefile:364: all-recursive] Error 1

Very Thanks a lot for all help.
shermanp
Posts: 175
Joined: Sat 18 Feb, 2017 2:09 am

Re: Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by shermanp »

Just made a few updates to the OP. No major changes, but I went through it again on the latest version of MSYS2 (still slow, sigh...).

Main changes are using an updated version of the npcap SDK, and using git to clone the github pcem repository.
A. Naim
Posts: 139
Joined: Thu 09 Jul, 2015 5:06 pm

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by A. Naim »

"error: perl: signature from "David Macek <david.macek.0@gmail.com>" is invalid
:: File /var/cache/pacman/pkg/perl-5.32.0-2-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature))."
shermanp
Posts: 175
Joined: Sat 18 Feb, 2017 2:09 am

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by shermanp »

Note, if you haven't updated MSYS2 in a while, there's been some package maintainer changes and corresponding signing key changes. I found it easier to restart from scratch with a fresh MSYS2 reinstall.
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by JosepMa »

I saw that there are some instructions in the news sections. But indeed, it can need multiple steps depending on when it was last updated
https://www.msys2.org/news/

I had to do this:
Follow instructions in the 2020-06-29 news.
Then follow instructions in the 2020-05-22 news.
In your case (problems with .zst), you might probably need to do 2020-05-31 news.
Then a package -Syu,
Then Follow 2020-06-15 news.

That got my msys2 up to date.
A. Naim
Posts: 139
Joined: Thu 09 Jul, 2015 5:06 pm

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by A. Naim »

shermanp wrote: Sun 27 Sep, 2020 9:39 pm Note, if you haven't updated MSYS2 in a while, there's been some package maintainer changes and corresponding signing key changes. I found it easier to restart from scratch with a fresh MSYS2 reinstall.
Thanks; it compiles now. :)
JosepMa wrote: Mon 28 Sep, 2020 8:19 pm I saw that there are some instructions in the news sections. But indeed, it can need multiple steps depending on when it was last updated
https://www.msys2.org/news/

I had to do this:
Follow instructions in the 2020-06-29 news.
Then follow instructions in the 2020-05-22 news.
In your case (problems with .zst), you might probably need to do 2020-05-31 news.
Then a package -Syu,
Then Follow 2020-06-15 news.

That got my msys2 up to date.
Thanks, but it's a little too late now. :)
JonyP27
Posts: 5
Joined: Sat 07 Mar, 2020 2:01 am

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by JonyP27 »

After I compiled the lastest v17 using this guide I cannot run the resulting .exe file and it gives the following errors:

"The procedure entry point _divmoddi4 could not be located in the DLL (dynamic-link library) C:\msys64\home\[user]\pcem\pcem.exe"
"The procedure entry point _divmoddi4 could not be located in the DLL (dynamic-link library) C:\msys64\home\[user]\pcem\libopenal-1.dll"

These errors appear even after copying all the necessary .dll files from the msys64 bin folder itself. Maybe it has to do with the OpenAL lib?
JonyP27
Posts: 5
Joined: Sat 07 Mar, 2020 2:01 am

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by JonyP27 »

Nvm, I updated MSYS2's files and copied the libraries again to the executable folder and it worked. There were libraries that wouldn't work and didn't have to do with the OpenAL one, I think.
User avatar
Will_27
Posts: 3
Joined: Tue 15 Feb, 2022 9:56 pm
Location: France

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by Will_27 »

Hi,

I try to compile the latest version of the emulator but it doesn't work. I have this error message :
CMake Error at /usr/share/cmake-3.22.1/Modules/FindwxWidgets.cmake:989 (message):
wxWidgets wx/version.h file not found in
D;/Installation/Applications/msys64/mingw32/lib/wx/include/msw-unicode-3.0;D;/Installation/Applications/msys64/mingw32/include/wx-3.0.
Call Stack (most recent call first):
CMakeLists.txt:93 (find_package)
I used the command 'cmake -G "Ninja" -DMSYS=TRUE -DCMAKE_BUILD_TYPE=Release .' instead of autoreconf and configure because these files are not found... I have followed the guide correctly but impossible to compile the file...

If you have any ideas, you are welcome.
Will
User avatar
Will_27
Posts: 3
Joined: Tue 15 Feb, 2022 9:56 pm
Location: France

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by Will_27 »

Thank you! I was finally able to compile the application correctly from your guide and information from you links.

Here is my detailed and complete procedure to compile PCem for Windows which can update this current guide and help someone who have difficulty.

Install MSYS2 then automatically launch MSYS2 64 bit once installed.

Type :

Code: Select all

pacman -Syu
Install : Yes / Complete Update : Yes
The application must close after installed the updates.

Start MSYS2 MSYS from Windows Start menu and type :

Code: Select all

pacman -Syu
Install : Yes
Install the default development tools :

Code: Select all

pacman -S --needed base-devel mingw-w64-x86_64-toolchain
Default=all (enter) / Install : Yes
Install the tools to get PCem sources from GitHub and for unzip :

Code: Select all

pacman -S git unzip
Install : Yes
Install the prerequisites to build PCem :

Code: Select all

pacman -Sy mingw-w64-{i686,x86_64}-ntldd-git mingw-w64-{i686,x86_64}-toolchain mingw-w64-{i686,x86_64}-SDL2 mingw-w64-{i686,x86_64}-openal mingw-w64-{i686,x86_64}-wxWidgets mingw-w64-{i686,x86_64}-libpcap mingw-w64-{i686,x86_64}-cmake
Default=all (enter) / Install : Yes

Get and download the latest updated sources of PCem from GitHub :

Code: Select all

git clone https://github.com/sarah-walker-pcem/pcem
Close MSYS2 MSYS with this command :

Code: Select all

exit
You can change or update the source code from this path "C:\msys64\home\%username%\pcem".

32 bit compilation

If you want to compile PCEm in 32 Bit then : Launch MSYS2 MinGW x86 from Windows Start menu.

Type :

Code: Select all

cd pcem
mkdir build_x86 && cd build_x86
cmake -G "MSYS Makefiles" -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release ..
make
Copy of 32 bit files libraries and compiled application to Release directory :

Code: Select all

cd src && mkdir release && cd release && cp ~/pcem/build_x86/src/pcem.exe ./ && cp /mingw32/bin/libcrypto-1_1.dll ./ && cp /mingw32/bin/libdeflate.dll ./ && cp /mingw32/bin/libexpat-1.dll ./ && cp /mingw32/bin/libgcc_s_dw2-1.dll ./ && cp /mingw32/bin/libjbig-0.dll ./ && cp /mingw32/bin/libjpeg-8.dll ./ && cp /mingw32/bin/libLerc.dll ./ && cp /mingw32/bin/liblzma-5.dll ./ && cp /mingw32/bin/libopenal-1.dll ./ && cp /mingw32/bin/libpcap.dll ./ && cp /mingw32/bin/libpng16-16.dll ./ && cp /mingw32/bin/libssl-1_1.dll ./ && cp /mingw32/bin/libstdc++-6.dll ./ && cp /mingw32/bin/libtiff-5.dll ./ && cp /mingw32/bin/libwebp-7.dll ./ && cp /mingw32/bin/libwinpthread-1.dll ./ && cp /mingw32/bin/libzstd.dll ./ && cp /mingw32/bin/SDL2.dll ./ && cp /mingw32/bin/wxbase30u_gcc_custom.dll ./ && cp /mingw32/bin/wxbase30u_xml_gcc_custom.dll ./ && cp /mingw32/bin/wxmsw30u_adv_gcc_custom.dll ./ && cp /mingw32/bin/wxmsw30u_core_gcc_custom.dll ./ && cp /mingw32/bin/wxmsw30u_html_gcc_custom.dll ./ && cp /mingw32/bin/wxmsw30u_xrc_gcc_custom.dll ./ && cp /mingw32/bin/zlib1.dll ./
Close MSYS2 MSYS with this command :

Code: Select all

exit
You can get the files of the release with Explorer or Run from this path : "C:\msys64\home\%username%\pcem\build_x86\src\release".

64 bit compilation

If you want to compile PCEm in 64 Bit then : Launch MSYS2 MinGW x64 from Windows Start menu.

Type :

Code: Select all

cd pcem
mkdir build_amd64 && cd build_amd64
cmake -G "MSYS Makefiles" -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release ..
make
Copy of 64 bit files libraries and compiled application to Release directory :

Code: Select all

cd src && mkdir release && cd release && cp ~/pcem/build_amd64/src/pcem.exe ./ && cp /mingw64/bin/libcrypto-1_1-x64.dll ./ && cp /mingw64/bin/libdeflate.dll ./ && cp /mingw64/bin/libexpat-1.dll ./ && cp /mingw64/bin/libgcc_s_seh-1.dll ./ && cp /mingw64/bin/libjbig-0.dll ./ && cp /mingw64/bin/libjpeg-8.dll ./ && cp /mingw64/bin/libLerc.dll ./ && cp /mingw64/bin/liblzma-5.dll ./ && cp /mingw64/bin/libopenal-1.dll ./ && cp /mingw64/bin/libpcap.dll ./ && cp /mingw64/bin/libpng16-16.dll ./ && cp /mingw64/bin/libssl-1_1-x64.dll ./ && cp /mingw64/bin/libstdc++-6.dll ./ && cp /mingw64/bin/libtiff-5.dll ./ && cp /mingw64/bin/libwebp-7.dll ./ && cp /mingw64/bin/libwinpthread-1.dll ./ && cp /mingw64/bin/libzstd.dll ./ && cp /mingw64/bin/SDL2.dll ./ && cp /mingw64/bin/wxbase30u_gcc_custom.dll ./ && cp /mingw64/bin/wxbase30u_xml_gcc_custom.dll ./ && cp /mingw64/bin/wxmsw30u_adv_gcc_custom.dll ./ && cp /mingw64/bin/wxmsw30u_core_gcc_custom.dll ./ && cp /mingw64/bin/wxmsw30u_html_gcc_custom.dll ./ && cp /mingw64/bin/wxmsw30u_xrc_gcc_custom.dll ./ && cp /mingw64/bin/zlib1.dll ./
Close MSYS2 MSYS with this command :

Code: Select all

exit
You can get the files of the release with Explorer or Run from this path : "C:\msys64\home\%username%\pcem\build_amd64\src\release".

And voilà, you can test your work !
Will
denman00000
Posts: 7
Joined: Sun 05 Jun, 2022 2:42 am

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by denman00000 »

Hi all

Could someone please help ?

What exactly does this mean ?
If you want to compile PCEm in 64 Bit then : Launch MSYS2 MinGW x64 from Windows Start menu.
This is not part of the start menu but can MinGW 64 does exist in the msys64 folder.
When I launch MinGW 64 it opens a shell but the following commands don't work since there is no pcem folder in this shell :-(

Code: Select all

cd pcem
mkdir build_amd64 && cd build_amd64
cmake -G "MSYS Makefiles" -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release ..
make
What must I do next in order to successfully compile ?

Really hoping someone can help me.

Thank you in advance
Denman
denman00000
Posts: 7
Joined: Sun 05 Jun, 2022 2:42 am

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by denman00000 »

denman00000 wrote: Sun 05 Jun, 2022 3:07 am Hi all

Could someone please help ?

What exactly does this mean ?
If you want to compile PCEm in 64 Bit then : Launch MSYS2 MinGW x64 from Windows Start menu.
This is not part of the start menu but can MinGW 64 does exist in the msys64 folder.
When I launch MinGW 64 it opens a shell but the following commands don't work since there is no pcem folder in this shell :-(

Code: Select all

cd pcem
mkdir build_amd64 && cd build_amd64
cmake -G "MSYS Makefiles" -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release ..
make
What must I do next in order to successfully compile ?

Really hoping someone can help me.

Thank you in advance
Denman
EDIT :
I've made some headway at least .. I found that once you launch (double click ) launch MinGW 64 it opens a shell but you are not place in the root directory of the shell.
So the step that may be missing is

Code: Select all

cd /
then

Code: Select all

cd pcem
mkdir build_amd64 && cd build_amd64
But typing the next command in :

Code: Select all

cmake -G "MSYS Makefiles" -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release ..
generates the following :

Code: Select all

$ cmake -G "MSYS Makefiles" -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release ..
CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_AR was not found, please set to archive program.
-- Configuring incomplete, errors occurred!

Please can someone help :-( ?\

Denman
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by JosepMa »

If you follow will_27 instructions, you wiinstalling the dependencies that will make that error go away.
philipjfry
Posts: 3
Joined: Mon 27 Mar, 2023 12:58 pm

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by philipjfry »

hi everyone!

i followed will_27's instructions and successfully created an exe, which i then put in the directory where my v17 exe is located, noticing that the self-built one is considerably smaller in size (8888 kb vs 14361 kb). upon launch, it required a few additional dlls (libgcc_s_seh-1.dll, libopenal-1.dll, libpcap.dll and libwinpthread-1.dll), which i gathered from various websites (using wpcap.dll as a substitute for libpcap.dll as i could not find libpcap.dll and it claims to implement the libpcap api).

however, i now get an application error upon launch (0xc000007b) and am wondering, if i did a) not provide the correct versions of the dlls, b) could not simply use wpcap.dll as a substitute for libpcap.dll or if maybe c) something else went wrong along the way.

is there anyone who could provide further insight on this issue?

thanks in advance!
User avatar
ruben_balea
Posts: 191
Joined: Mon 08 May, 2017 11:24 pm
Location: Spain

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by ruben_balea »

It is not necessary to download the dll's from the internet, which can also be dangerous if you download a copy infected with a virus.
If you have installed MSYS2 in C:\msys64 then all the needed dll's are in:
C:\msys64\mingw64\bin for MSYS2 MinGW 64-bit
and:
C:\msys64\mingw32\bin for MSYS2 MinGW 32-bit

If you have installed MSYS2 elsewhere, replace "C:\msys64" with the directory where you installed it.

You have to replace also the SDL2.dll that comes with PCem.

In my case I had to use the following dll's, you may need more or less depending on the options with which you have compiled PCem:

Code: Select all

libcrypto-1_1-x64.dll
libdeflate.dll
libexpat-1.dll
libgcc_s_seh-1.dll
libjbig-0.dll
libjpeg-8.dll
libLerc.dll
liblzma-5.dll
libopenal-1.dll
libpcap.dll
libpcem-plugin-api.dll
libpng16-16.dll
libssl-1_1-x64.dll
libstdc++-6.dll
libtiff-5.dll
libwebp-7.dll
libwinpthread-1.dll
libzstd.dll
SDL2.dll
wxbase30u_gcc_custom.dll
wxbase30u_xml_gcc_custom.dll
wxmsw30u_adv_gcc_custom.dll
wxmsw30u_core_gcc_custom.dll
wxmsw30u_html_gcc_custom.dll
wxmsw30u_xrc_gcc_custom.dll
zlib1.dll
I guess you'll find also libpcap.dll in the corresponding directory of your MSYS2 setup but if for some reason this is not the case simply reinstall the libpcap package.
To install libpcap for MSYS2 MinGW 64-bit run the following command:

Code: Select all

pacman -S mingw-w64-x86_64-libpcap
To install libpcap for MSYS2 MinGW 32-bit run the following command:

Code: Select all

pacman -S mingw-w64-i686-libpcap
philipjfry
Posts: 3
Joined: Mon 27 Mar, 2023 12:58 pm

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by philipjfry »

wow, thanks for responding so quickly and right on point, ruben!

i had no idea those dlls were right there already, how very convenient and of course much better than gathering random versions from wherever. :) thanks for the security warning too. as with all potentially fishy downloads, i did check them using virustotal and ran them (or rather, pcem) in a throwaway vm first to be as safe as possible.

for good measure and quick results, i went ahead and just grabbed all the dlls in the mingw64\bin folder. your guess was correct, libpcap was already in there. amazingly, i then still required some more (wxwidgets related) dlls, which i was able to gather via pacman, having just learned how it's done properly from you.

then, like lieutenant columbo, i just needed one more dll, libpcem-plugin-api.dll, which of course was in the same folder as my self-built pcem.exe.

then, i was seemingly back to the same application error as before, 0xc000007b. like lieutenant columbo, i now knew i was onto something though and thus did not let that apparent setback discourage me. sure enough, after some more fiddling around with the dlls, i managed to make the error go away! very much unlike lieutenant columbo, i'm not entirely sure what finally did the trick though. it must have been related to either libstdc++-6.dll or the wxwidgets libraries, possibly both.

however, even though my self-built exe launches now, there is (at least) one more issue: it immediately complains about no roms being present. roms\genxt\pcxt.rom definitely is present though, along with all the other roms. sadly, clearing the nvr and config folders (a course of action inspired by another thread which actually referenced one of your posts) did not help either and i am again stuck. worse yet, i'm fresh out of ideas on this one too!

this really is a tough nut to crack. :D any further insights or suggestions would again be highly appreciated! i'm just trying to get the newest possible build for phil from philscomputerlab on youtube by the way. i suggested making a video on pcem to him and he asked if i knew where to get/how to compile the newest version.

cheers and tia!
User avatar
ruben_balea
Posts: 191
Joined: Mon 08 May, 2017 11:24 pm
Location: Spain

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by ruben_balea »

Now on Windows PCem stores the ROMs, NVRs, configs, etc. in a subfolder called .pcem inside your Windows user folder, such as C:\Users\yourusername\.pcem (on Linux it's ~/.pcem)

.pcem.png
.pcem.png (41.14 KiB) Viewed 16740 times
philipjfry
Posts: 3
Joined: Mon 27 Mar, 2023 12:58 pm

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by philipjfry »

rubén, you da man!

i actually briefly considered the possibility of a change in that regard, but immediately discarded it as preposterous. some dll related file/directory handling issue seemed more likely to me. :D

seriously though, i much prefer the "traditional" way for applications like pcem, considering it more convenient and portable, and wonder why it was changed? i suppose because more and more applications started doing it that way on windows too lately, making quite a mess of what used to be a somewhat organized user folder in the past. oh well, first world problems. ;)

anyway, it works like a charm now, already blasted some zombiemen and imps in e1m1. thanks so much m8, can't wait to give phil the good news! :D
User avatar
ruben_balea
Posts: 191
Joined: Mon 08 May, 2017 11:24 pm
Location: Spain

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by ruben_balea »

You're welcome!
It will be portable again in the future, a lot of people requested that, but I don't know if it will be for the release of v18 or before... or later :?
jznomoney
Posts: 97
Joined: Sat 06 Dec, 2014 9:11 pm

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by jznomoney »

I have compiled the latest pcem on Windows 11 following the latest guide and pcap does not show up only slirp. If I run the v17 release pcap works as intended. Am I missing something?
User avatar
ruben_balea
Posts: 191
Joined: Mon 08 May, 2017 11:24 pm
Location: Spain

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by ruben_balea »

Same here, I created a new issue on GitHub. https://github.com/sarah-walker-pcem/pcem/issues/213
max_mantic
Posts: 1
Joined: Wed 10 May, 2023 10:45 pm

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by max_mantic »

Hi! I just followed Will_27's tutorial and successfully compiled the x64 version of PCem vNext, thanks! The compiled PCem runs and I can confirm it only has the slirp option.

I did run into a couple of problems with the final copy command to the release folder, a few of the DLLs weren't there but they did have updated versions, so using those seemed to work.
Here's a list of new names for the DLLs:

libcrypto-1_1-x64.dll (old) - libcrypto-3-x64.dll (new)
libssl-1_1-x64.dll (old) - libssl-3-x64.dll (new)
libtiff-5.dll (old) - libtiff-6.dll (new)

The copy command also seemed to skip two DLLs, so I just copied those manually from these folders:
libpcem-plugin-api.dll (found in c:\msys64\home\*USERNAME*\pcem\build_amd64\src\ )
lubsharpyuv-0.dll (found in c:\msys64\mingw64\bin\ )


Hopefully this helps someone that tries to follow that tutorial now.
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: [Sep 2020 ed.] PCem MSYS2 build guide (with wxWidgets)

Post by JosepMa »

About copying the required Dlls into a "release" folder, I was able to do so automatically adding this to the .sh file that I use for compiling:

ntldd -R pcem.exe|grep msys64 | cut -f2 -d\> | cut -f1 -d\( | tr \\\\ /| while read a; do ! [ -e "./`basename $a`" ] && cp -v "$a" ./; done

ntldd reports the files that it depends on, and then I only take the ones that are from msys . For each of them, I copy it into the current directory ( i.e. that line needs to be executed on the target directory).

This is the complete script for x64 compilation ( x86 is the same. it only creates it on a different folder)

Code: Select all

mkdir -p build_x64
cd build_x64
cmake -G "Ninja" -DMSYS=TRUE -DUSE_NETWORKING=ON -DUSE_PCAP_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release ..
ninja
cd src
mkdir -p release
cd release
cp ../pcem.exe ./ && cp ../libpcem-plugin-api.dll ./ 
ntldd -R pcem.exe|grep msys64 | cut -f2 -d\> | cut -f1 -d\( | tr \\\\ /| while read a; do ! [ -e "./`basename $a`" ] && cp -v "$a" ./; done
Post Reply