Skip to content

Commit

Permalink
Fix compiler error
Browse files Browse the repository at this point in the history
ISO C++ forbids declaration of 'type name' with no type
  • Loading branch information
Gatsik committed May 18, 2024
1 parent b4ccb89 commit 473aba4
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 9 deletions.
44 changes: 38 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ jobs:
release:
runs-on: ubuntu-latest
env:
UID_FILENAME: faf-uid.exe
WIN_FILENAME: faf-uid.exe
LINUX_FILENAME: faf-uid
UID_PLATFORM: win32
MXE_DIR: /usr/lib/mxe
MXE_TARGET: x86_64-w64-mingw32.static
Expand Down Expand Up @@ -75,10 +76,41 @@ jobs:
-DCRYPTOPP_LIBRARIES=/usr/lib/mxe/usr/$MXE_TARGET/lib/libcryptopp.a \
-DCRYPTOPP_INCLUDE_DIRS=/usr/lib/mxe/usr/$MXE_TARGET/include \
-DUID_SKIP_LEGACY=On \
-B build
make -C build
ls build/
ls build/$UID_FILENAME
-B winbuild
make -C winbuild
- name: Linux Build
env:
UID_FILENAME: faf-uid
UID_PLATFORM: 'linux'
JSONCPP_VERSION: 1.7.7
CRYPTOPP_VERSION: 8_9_0
run: |
wget https://github.com/open-source-parsers/jsoncpp/archive/$JSONCPP_VERSION.tar.gz -O jsoncpp.tar.gz
tar xfz jsoncpp.tar.gz
mkdir jsoncpp-build
cmake \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF \
-DBUILD_STATIC_LIBS=ON \
-DBUILD_SHARED_LIBS=OFF \
-B jsoncpp-build \
-S jsoncpp-$JSONCPP_VERSION
make -C jsoncpp-build
wget https://github.com/weidai11/cryptopp/archive/CRYPTOPP_$CRYPTOPP_VERSION.zip -O cryptopp.zip
unzip ./cryptopp.zip
mv cryptopp-CRYPTOPP_$CRYPTOPP_VERSION cryptopp
make -C cryptopp -f GNUmakefile CXXFLAGS='-DCRYPTOPP_NO_BACKWARDS_COMPATIBILITY_562 -DNDEBUG -O3' libcryptopp.a
asdf = $(pwd)
cmake \
-DJSONCPP_LIBRARIES=$asdf/jsoncpp-build/src/lib_json/libjsoncpp.a \
-DJSONCPP_INCLUDE_DIRS=$asdf/jsoncpp-$JSONCPP_VERSION/include \
-DCRYPTOPP_LIBRARIES=$asdf/cryptopp/libcryptopp.a \
-DCRYPTOPP_INCLUDE_DIRS=$asdf/cryptopp \
-DCMAKE_CXX_FLAGS="-DCRYPTOPP_NO_BACKWARDS_COMPATIBILITY_562" \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-B linuxbuild
make -C linuxbuild
- name: Create draft release
id: create_release
Expand All @@ -88,4 +120,4 @@ jobs:
tag: ${{ github.event.inputs.version }}
draft: true
prerelease: true
artifacts: build/${{ env.UID_FILENAME }}
artifacts: "winbuild/${{ env.WIN_FILENAME }}","linuxbuild/${{ env.LINUX_FILENAME }}"
6 changes: 3 additions & 3 deletions uid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ int main(int argc, char *argv[])
new CryptoPP::FileSink(std::cout), false /*insertLineBreaks*/
);
b.Put(paddingSize);
b.Put(reinterpret_cast<const byte*>(iv_b64.c_str()), iv_b64.size());
b.Put(reinterpret_cast<const byte*>(json_string_encrypted_b64.c_str()), json_string_encrypted_b64.size());
b.Put(reinterpret_cast<const byte*>(aes_key_encrypted_base64.c_str()), aes_key_encrypted_base64.size());
b.Put(reinterpret_cast<const CryptoPP::byte*>(iv_b64.c_str()), iv_b64.size());
b.Put(reinterpret_cast<const CryptoPP::byte*>(json_string_encrypted_b64.c_str()), json_string_encrypted_b64.size());
b.Put(reinterpret_cast<const CryptoPP::byte*>(aes_key_encrypted_base64.c_str()), aes_key_encrypted_base64.size());
b.MessageEnd();
}
}
Expand Down

0 comments on commit 473aba4

Please sign in to comment.