Skip to content

Building newflasher.exe on Debian based systems #86

@nakomoto

Description

@nakomoto

Your makefile did not work for me. I solved it this way:

git clone https://github.com/munjeni/newflasher.git
cd newflasher
mkdir -p include

wget https://zlib.net/zlib-1.3.1.tar.gz
tar xzf zlib-1.3.1.tar.gz
wget https://github.com/libexpat/libexpat/releases/download/R_2_2_9/expat-2.2.9.tar.gz
tar xzf expat-2.2.9.tar.gz

sudo apt update -y
sudo apt install gcc gcc-mingw-w64-x86-64-win32 libexpat-dev libz-dev make xxd -y

cd zlib-1.3.1
CC="x86_64-w64-mingw32-gcc" ./configure --static
make clean && make

cd ../expat-2.2.9
CC="x86_64-w64-mingw32-gcc -fPIC" ./configure --enable-static --disable-shared --host=i686-w64-mingw32
make clean && make

cd ..
wget https://software.sonymobile.com/drivers/installers/latest/Sony_Mobile_Software_Update_Drivers_x64_Setup.msi -O GordonGate
xxd --include GordonGate > include/GordonGate.h

sed "s/@VERSION@/`sed 's/^.*VERSION //' version.h`/" newflasher.rc.in >newflasher.rc
x86_64-w64-mingw32-windres newflasher.rc -O coff -o newflasher.res
x86_64-w64-mingw32-gcc -Wall -g -O2 -I include -I zlib-1.3.1 -L zlib-1.3.1 -I expat-2.2.9/lib -L expat-2.2.9/lib/.libs -static newflasher.c newflasher.res -o newflasher.exe -lsetupapi -lz -lexpat
x86_64-w64-mingw32-strip newflasher.exe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions