Skip to content

Commit

Permalink
Merge pull request #5626 from Web-eWorks/remove-vs-solution
Browse files Browse the repository at this point in the history
Remove Visual Studio solution, improve new-contributor experience
  • Loading branch information
Webster Sheets authored Sep 14, 2023
2 parents cda79b9 + 17714df commit 1957b8d
Show file tree
Hide file tree
Showing 58 changed files with 489 additions and 5,889 deletions.
50 changes: 19 additions & 31 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,6 @@ env:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-vs-solution:
runs-on: windows-2019

steps:
- uses: actions/checkout@v3
with:
path: pioneer

- name: Checkout pioneer-thirdparty
uses: actions/checkout@v3
with:
repository: pioneerspacesim/pioneer-thirdparty
path: pioneer-thirdparty

- name: Build VS Solution
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cd pioneer
msbuild win32\vs2019\pioneer.sln /property:Configuration=Release

build-msvc:
runs-on: windows-2019
Expand Down Expand Up @@ -117,29 +97,36 @@ jobs:
sudo apt-fast update
sudo apt-fast install -y ${{ env.packages }}
- name: Setup CMake
run: |
cp scripts/CMakeBuildPresetsCI.json CMakeUserPresets.json
cmake --preset linux-x64-release
- name: Build GCC
run: ./bootstrap cmake && make -C build
run: cmake --build ./build --target all

- name: Build Pioneer Data
run: make -C build build-data
run: cmake --build ./build --target build-data

- name: Run Tests
run: ./build/unittest

- name: Build Release
run: ./scripts/build-travis.sh
run: |
cmake --build ./build --target install
./scripts/package-release.sh
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Linux-Artifacts
path: release/zip/*.tar.gz
path: release/pioneer-linux-x64-release-*.tar.gz

- name: Upload Release Files
uses: softprops/action-gh-release@v1
if: ${{ github.event_name == 'release' }}
with:
files: release/zip/pioneer-*.tar.gz
files: release/pioneer-linux-x64-release-*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -157,16 +144,17 @@ jobs:
sudo apt-fast update
sudo apt-fast install -y clang-8 ${{ env.packages }}
- name: Build Clang
- name: Setup CMake
run: |
cp scripts/CMakeBuildPresetsCI.json CMakeUserPresets.json
export CC=clang CXX=clang++
./bootstrap cmake && make -C build
cmake --preset linux-x64-release
- name: Build Clang
run: cmake --build ./build --target all

- name: Build Pioneer Data
run: make -C build build-data
run: cmake --build ./build --target build-data

- name: Run Tests
run: ./build/unittest

- name: Build Release
run: ./scripts/build-travis.sh
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ codedoc/
nd/Data/
doxygen/html
doxygen/latex
/release
/out

.deps
*.swp
Expand Down Expand Up @@ -80,21 +82,22 @@ pioneer-*.tar.*
# meta-build tooling products etc. shouldn't be tracked
Makefile
Makefile.in
/release
Debug/
PreRelease/
Profile/
Release/
cmake-*
CMakeUserPresets.json
compile

# IDEs make their local configurations shouldn't be tracked
.vscode/
.vscode/*
.vs/
.project
.cproject
*.VC.db
*.code-workspace
!pioneer-default.code-workspace
.idea

# Core dumps shouldn't be tracked by git.
Expand Down
59 changes: 0 additions & 59 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion CI/appveyor/mingw/build.cmd

This file was deleted.

30 changes: 0 additions & 30 deletions CI/appveyor/mingw/build.sh

This file was deleted.

17 changes: 0 additions & 17 deletions CI/appveyor/mingw/prepare.sh

This file was deleted.

29 changes: 0 additions & 29 deletions CI/appveyor/msvc/build.cmd

This file was deleted.

15 changes: 0 additions & 15 deletions CI/appveyor/msvc/prepare.sh

This file was deleted.

1 change: 0 additions & 1 deletion CI/appveyor/msvc/publish.cmd.cmakein

This file was deleted.

36 changes: 18 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,13 @@ if(POLICY CMP0072)
endif()

include(GNUInstallDirs)
include(cmake/InstallPioneer.cmake)

if (MINGW)
# Fix build errors on AppVeyor with MinGW due to a broken GLEW config script
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
endif (MINGW)

# We don't want a 'bin' folder on Windows
if (WIN32)
set(CMAKE_INSTALL_BINDIR ${CMAKE_INSTALL_PREFIX})
endif (WIN32)

# Put the output into the root dir so it can be run from Visual Studio
if (MSVC)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR})
Expand Down Expand Up @@ -107,13 +103,6 @@ endif()

string(TIMESTAMP PROJECT_VERSION "%Y%m%d")

if (NOT PIONEER_DATA_DIR)
set(PIONEER_DATA_DIR ${CMAKE_INSTALL_FULL_DATADIR}/pioneer/data CACHE PATH
"Path where game data will be installed" FORCE)
endif (NOT PIONEER_DATA_DIR)

file(TO_NATIVE_PATH ${PIONEER_DATA_DIR} _PIONEER_DATA_DIR)

if (MINGW)
# Enable PRIxYY macros on MinGW
add_definitions(-D__STDC_FORMAT_MACROS)
Expand Down Expand Up @@ -415,23 +404,34 @@ else (MODELCOMPILER)
endif(MODELCOMPILER)

install(TARGETS ${PROJECT_NAME} editor modelcompiler savegamedump
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
RUNTIME DESTINATION ${PIONEER_INSTALL_BINDIR}
)
install(DIRECTORY data/
DESTINATION ${PIONEER_DATA_DIR}
DESTINATION ${PIONEER_INSTALL_DATADIR}/data
REGEX "/models" EXCLUDE
PATTERN ".gitignore" EXCLUDE
PATTERN "listdata.*" EXCLUDE
PATTERN "Makefile.am" EXCLUDE
)
install(DIRECTORY data/models/
DESTINATION ${PIONEER_DATA_DIR}/models
DESTINATION ${PIONEER_INSTALL_DATADIR}/data/models
FILES_MATCHING PATTERN "*.sgm" PATTERN "*.dds" PATTERN "*.png"
)

list(APPEND install_txt
"AUTHORS.txt"
"Changelog.txt"
"Modelviewer.txt"
"Quickstart.txt"
"README.md")

install(FILES ${install_txt} DESTINATION ${PIONEER_INSTALL_DATADIR})

install(DIRECTORY ${CMAKE_SOURCE_DIR}/licenses
DESTINATION ${PIONEER_INSTALL_DATADIR})

if (WIN32)
configure_file(pioneer.iss.cmakein pioneer.iss @ONLY)
configure_file(CI/appveyor/msvc/publish.cmd.cmakein publish.cmd @ONLY)
file(GLOB win_libs ../pioneer-thirdparty/win32/bin/${MSVC_ARCH}/vs2019/*.dll)
install(FILES ${win_libs} DESTINATION ${CMAKE_INSTALL_PREFIX})
if(NOT ISCC)
Expand All @@ -440,7 +440,7 @@ if (WIN32)
add_custom_target(win-installer COMMAND ${ISCC} /Q pioneer.iss)
endif (WIN32)

if (UNIX)
if (UNIX AND NOT PIONEER_INSTALL_INPLACE)
set(PIONEER_DESKTOP_FILE ${CMAKE_BINARY_DIR}/metadata/net.pioneerspacesim.Pioneer.desktop)
configure_file(metadata/net.pioneerspacesim.Pioneer.desktop.cmakein ${PIONEER_DESKTOP_FILE} @ONLY)
install(FILES ${PIONEER_DESKTOP_FILE}
Expand All @@ -456,4 +456,4 @@ if (UNIX)
RENAME net.pioneerspacesim.Pioneer.png
)
endforeach()
endif (UNIX)
endif (UNIX AND NOT PIONEER_INSTALL_INPLACE)
Loading

0 comments on commit 1957b8d

Please sign in to comment.