Skip to content

Commit

Permalink
Moves Source Code into 'src' Directory (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks authored Feb 3, 2020
1 parent a93fad3 commit 798fe56
Show file tree
Hide file tree
Showing 193 changed files with 51 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .azure/test_windows.cmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

:: Import our ETW manifest.
wevtutil im manifest\MsQuicEtw.man ^
wevtutil im src\manifest\MsQuicEtw.man ^
/rf:%cd%\artifacts\windows\bin\debug\msquic.dll ^
/mf:%cd%\artifacts\windows\bin\debug\msquic.dll

Expand Down
32 changes: 16 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
add_custom_command(
OUTPUT ${QUIC_BUILD_DIR}/inc/MsQuicEtw.h
OUTPUT ${QUIC_BUILD_DIR}/inc/MsQuicEtw.rc
COMMAND mc.exe -um -h ${QUIC_BUILD_DIR}/inc -r ${QUIC_BUILD_DIR}/inc ${CMAKE_SOURCE_DIR}/manifest/MsQuicEtw.man)
COMMAND mc.exe -um -h ${QUIC_BUILD_DIR}/inc -r ${QUIC_BUILD_DIR}/inc ${CMAKE_SOURCE_DIR}/src/manifest/MsQuicEtw.man)
add_custom_target(MsQuicEtw
DEPENDS ${QUIC_BUILD_DIR}/inc/MsQuicEtw.h
DEPENDS ${QUIC_BUILD_DIR}/inc/MsQuicEtw.rc)
Expand Down Expand Up @@ -118,7 +118,7 @@ else()
set(QUIC_CXX_FLAGS "${QUIC_COMMON_FLAGS} --std=c++17 -g -Wno-reorder -Wno-sign-compare -Wno-format")
endif()

include_directories(${CMAKE_SOURCE_DIR}/inc)
include_directories(${CMAKE_SOURCE_DIR}/src/inc)

if(QUIC_TLS STREQUAL "openssl")
# Configure and build OpenSSL.
Expand All @@ -145,22 +145,22 @@ if (QUIC_TLS STREQUAL "mitls")
endif()

# Product code
add_subdirectory(core)
add_subdirectory(platform)
add_subdirectory(bin)
add_subdirectory(src/core)
add_subdirectory(src/platform)
add_subdirectory(src/bin)

# Tool code
if(QUIC_BUILD_TOOLS)
add_subdirectory(tools/attack)
add_subdirectory(tools/interop)
add_subdirectory(tools/ping)
add_subdirectory(tools/reach)
add_subdirectory(tools/sample)
add_subdirectory(tools/spin)
add_subdirectory(tools/void)
add_subdirectory(src/tools/attack)
add_subdirectory(src/tools/interop)
add_subdirectory(src/tools/ping)
add_subdirectory(src/tools/reach)
add_subdirectory(src/tools/sample)
add_subdirectory(src/tools/spin)
add_subdirectory(src/tools/void)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
add_subdirectory(tools/etwlib)
add_subdirectory(tools/etw)
add_subdirectory(src/tools/etwlib)
add_subdirectory(src/tools/etw)
endif()
endif()

Expand All @@ -174,6 +174,6 @@ if(QUIC_BUILD_TEST)
endif()
add_subdirectory(submodules/googletest)

add_subdirectory(test/lib)
add_subdirectory(test/bin)
add_subdirectory(src/test/lib)
add_subdirectory(src/test/bin)
endif()
28 changes: 27 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ This script provides helpers for building msquic.
.PARAMETER Clean
Deletes all previous build and configuration.
.PARAMETER InstallOutput
Installs the build output to the current machine.
.EXAMPLE
build.ps1 -InstallDependencies
Expand Down Expand Up @@ -69,7 +72,10 @@ param (
[switch]$DisableTest = $false,

[Parameter(Mandatory = $false)]
[switch]$Clean = $false
[switch]$Clean = $false,

[Parameter(Mandatory = $false)]
[switch]$InstallOutput = $false
)

Set-StrictMode -Version 'Latest'
Expand All @@ -78,6 +84,7 @@ $PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
# Important directory paths.
$BaseArtifactsDir = Join-Path $PSScriptRoot "artifacts"
$BaseBuildDir = Join-Path $PSScriptRoot "bld"
$SrcDir = Join-Path $PSScriptRoot "src"
$ArtifactsDir = $null
$BuildDir = $null
if ($IsWindows) {
Expand Down Expand Up @@ -205,6 +212,20 @@ function CMake-Build {
CMake-Execute $Arguments
}

# Installs all the build output.
function Install-Output {
if ($IsWindows) {
# Import the ETW manifest.
$ManifestDir = Join-Path $SrcDir "manifest"
$ManifestPath = Join-Path $ManifestDir "MsQuicEtw.man"
$MsQuicDllPath = Join-Path $ArtifactsDir "bin" $Config "msquic.dll"
Log "Installing ETW manifest..."
wevtutil.exe im $ManifestPath /rf:$MsQuicDllPath /mf:$MsQuicDllPath
} else {
# TODO - Anything?
}
}

##############################################################
# Main Execution #
##############################################################
Expand All @@ -225,4 +246,9 @@ CMake-Generate
Log "Building..."
CMake-Build

if ($InstallOutput) {
# Install the build output.
Install-Output
}

Log "Done."
8 changes: 4 additions & 4 deletions log.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Set-StrictMode -Version 'Latest'
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'

# Path for the WPR profile.
$WprpFile = $PSScriptRoot + "\manifest\msquic.wprp"
$WprpFile = $PSScriptRoot + "\src\manifest\msquic.wprp"

# Path for quicetw.
$QuicEtw = $null
Expand All @@ -83,7 +83,7 @@ function Log-Start {
wpr.exe -start "$($WprpFile)!$($LogProfile)" -filemode -instancename $InstanceName
} else {
# TODO
Write-Warning "Not supported yet!"
Write-Warning "Logging not supported yet!"
}
}

Expand All @@ -93,7 +93,7 @@ function Log-Cancel {
wpr.exe -cancel -instancename $InstanceName
} else {
# TODO
Write-Warning "Not supported yet!"
Write-Warning "Logging not supported yet!"
}
}

Expand All @@ -108,7 +108,7 @@ function Log-Stop {
}
} else {
# TODO
Write-Warning "Not supported yet!"
Write-Warning "Logging not supported yet!"
}
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/bin/CMakeLists.txt → src/test/bin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

include_directories(${CMAKE_SOURCE_DIR}/test)
include_directories(${CMAKE_SOURCE_DIR}/src/test)
include_directories(${CMAKE_SOURCE_DIR}/submodules/googletest/googletest/include)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QUIC_CXX_FLAGS}")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/lib/CMakeLists.txt → src/test/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set(SOURCES
TestStream.cpp
)

include_directories(${CMAKE_SOURCE_DIR}/test)
include_directories(${CMAKE_SOURCE_DIR}/src/test)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QUIC_CXX_FLAGS}")

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(SOURCES

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QUIC_CXX_FLAGS}")

include_directories(${CMAKE_SOURCE_DIR}/core)
include_directories(${CMAKE_SOURCE_DIR}/src/core)

add_executable(quicattack ${SOURCES})

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 798fe56

Please sign in to comment.