Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Building Fix #10

Merged
merged 50 commits into from
Aug 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
d38e30d
pkg install
tumble1999 Jul 30, 2021
7e0a44d
setup dependancies
tumble1999 Jul 30, 2021
e50d7dc
builds on windows but running returns error 0xc000007b
tumble1999 Jul 31, 2021
042cfeb
working setup
tumble1999 Jul 31, 2021
473c7ea
added vs installer requirements
tumble1999 Jul 31, 2021
890b890
update
tumble1999 Jul 31, 2021
e441570
64 bit dll version
tumble1999 Jul 31, 2021
67bc8ee
some mingw stuff, but i cannot seem to get it to fully work though
tumble1999 Aug 2, 2021
2baf9b3
fixed linux building
tumble1999 Aug 2, 2021
a4e3fb7
rmoved dll files
tumble1999 Aug 2, 2021
16e27c2
info about putting dlls in the res folder
tumble1999 Aug 2, 2021
49fe702
Merge branch 'develop' into feature/platform-windows
tumble1999 Aug 18, 2021
3b0a260
setup for windows
tumble1999 Aug 18, 2021
49145a8
moving
tumble1999 Aug 18, 2021
8d73b88
indentation
tumble1999 Aug 18, 2021
9998bab
chmod
tumble1999 Aug 18, 2021
cd4c4c2
dependacies
tumble1999 Aug 18, 2021
f45ef2b
dependacies
tumble1999 Aug 18, 2021
c32c401
force
tumble1999 Aug 18, 2021
b34e1f7
exit on error
tumble1999 Aug 18, 2021
17aad9e
vcpkg
tumble1999 Aug 18, 2021
3c52272
vcpkg glm
tumble1999 Aug 18, 2021
1a931c0
vcpkg include cmake
tumble1999 Aug 18, 2021
cfcf100
env
tumble1999 Aug 18, 2021
cb2dd7e
vcpkg integrate install
tumble1999 Aug 18, 2021
aa18863
glew manual install
tumble1999 Aug 18, 2021
2400e6e
glew manual install
tumble1999 Aug 18, 2021
a63bf64
speach marks
tumble1999 Aug 18, 2021
fd5a065
env
tumble1999 Aug 18, 2021
e4725fe
env
tumble1999 Aug 18, 2021
4f11cd9
-d
tumble1999 Aug 18, 2021
27faf9b
path
tumble1999 Aug 18, 2021
7989795
env
tumble1999 Aug 18, 2021
7854226
download
tumble1999 Aug 18, 2021
b903bda
version
tumble1999 Aug 18, 2021
efad907
hmm
tumble1999 Aug 18, 2021
644b866
moving things
tumble1999 Aug 18, 2021
4718666
ecfho path
tumble1999 Aug 18, 2021
0629917
path ps
tumble1999 Aug 18, 2021
a8bd314
path ps
tumble1999 Aug 18, 2021
6341d48
echo path
tumble1999 Aug 18, 2021
45fc693
sdl url
tumble1999 Aug 18, 2021
0a132fc
pakaging
tumble1999 Aug 18, 2021
94664f0
remove hmm
tumble1999 Aug 18, 2021
1a5d664
7zip
tumble1999 Aug 18, 2021
114e084
artifact
tumble1999 Aug 18, 2021
9bea3c4
artifact
tumble1999 Aug 18, 2021
1cb9f51
call
tumble1999 Aug 18, 2021
bad2ec6
cd
tumble1999 Aug 18, 2021
55be96b
chmod
tumble1999 Aug 18, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 100 additions & 1 deletion .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
sudo apt update -y
sudo apt upgrade -y
sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev -y
chmod +x tests/debian.sh

- name: Configure
run: |
Expand Down Expand Up @@ -71,9 +72,63 @@ jobs:
name: arch-artifact
path: pkg/

Windows:
runs-on: windows-latest
env:
GLEW_PATH: C:\lib\glew-2.2.0\bin
SDL2DIR: C:\lib\SDL2-2.0.16
GLM_ROOT_DIR: C:\lib\glm
steps:
- name: Checkout Branch
uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag.

- run: choco install wget unzip 7zip -y
- name: Install Dependencies
env:
GLEW_DOWNLOAD: https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0-win32.zip
GLM_DOWNLOAD: https://github.com/g-truc/glm/releases/download/0.9.9.8/glm-0.9.9.8.zip
SDL2_DOWNLOAD: https://www.libsdl.org/release/SDL2-devel-2.0.16-VC.zip
run: |
mkdir c:/lib
wget -O glew.zip $env:GLEW_DOWNLOAD
wget -O sdl2.zip $env:SDL2_DOWNLOAD
wget -O glm.zip $env:GLM_DOWNLOAD

unzip glew.zip -d c:\lib
unzip sdl2.zip -d c:\lib
unzip glm.zip -d c:\lib

# vcpkg integrate install
# vcpkg install sdl2 glew glm
# # :: Install-Package sdl2 -Force
# # :: Install-Package glew -Force
# # # Install-Package glm -Force


- name: Configure
run: |
$env:Path += ";$env:GLEW_PATH"

echo $env:PATH

tests\windows.bat configure
- name: Build
run: |
tests\windows.bat build

- name: Package
run: |
tests\windows.bat package

- uses: actions/upload-artifact@v2
with:
name: windows-artifact
path: pkg/


Release:
runs-on: ubuntu-latest
needs: [Debian, Arch]
needs: [Debian, Arch, Windows]
steps:
- uses: actions/download-artifact@v2
with:
Expand All @@ -83,6 +138,10 @@ jobs:
with:
name: arch-artifact

- uses: actions/download-artifact@v2
with:
name: windows-artifact

- name: release
uses: actions/create-release@v1
id: create_release
Expand Down Expand Up @@ -154,3 +213,43 @@ jobs:
asset_path: ./cinnabar-render.pkg.tar.zst
asset_name: cinnabar-render.pkg.tar.zst
asset_content_type: application/vnd.debian.binary-package

- name: cinnabar-core.dll
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./cinnabar-core.dll
asset_name: cinnabar-core.dll
asset_content_type: application/x-msdownload

- name: cinnabar-core.zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./cinnabar-core.zip
asset_name: cinnabar-core.zip
asset_content_type: application/zip

- name: cinnabar-render.dll
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./cinnabar-render.dll
asset_name: cinnabar-render.dll
asset_content_type: application/x-msdownload

- name: cinnabar-render.zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./cinnabar-render.zip
asset_name: cinnabar-render.zip
asset_content_type: application/zip
48 changes: 48 additions & 0 deletions .github/workflows/UnitTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
sudo apt update -y
sudo apt upgrade -y
sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev -y
chmod +x tests/debian.sh

- name: Configure
run: |
Expand Down Expand Up @@ -52,3 +53,50 @@ jobs:
sudo docker stop ce-arch-test
sudo docker rm ce-arch-test -f
sudo docker rmi ce-arch -f
Windows:
runs-on: windows-latest
env:
GLEW_PATH: C:\lib\glew-2.2.0\bin
SDL2DIR: C:\lib\SDL2-2.0.16
GLM_ROOT_DIR: C:\lib\glm
steps:
- name: Checkout Branch
uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag.

- run: choco install wget unzip 7zip -y
- name: Install Dependencies
env:
GLEW_DOWNLOAD: https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0-win32.zip
GLM_DOWNLOAD: https://github.com/g-truc/glm/releases/download/0.9.9.8/glm-0.9.9.8.zip
SDL2_DOWNLOAD: https://www.libsdl.org/release/SDL2-devel-2.0.16-VC.zip
run: |
mkdir c:/lib
wget -O glew.zip $env:GLEW_DOWNLOAD
wget -O sdl2.zip $env:SDL2_DOWNLOAD
wget -O glm.zip $env:GLM_DOWNLOAD

unzip glew.zip -d c:\lib
unzip sdl2.zip -d c:\lib
unzip glm.zip -d c:\lib

# vcpkg integrate install
# vcpkg install sdl2 glew glm
# # :: Install-Package sdl2 -Force
# # :: Install-Package glew -Force
# # # Install-Package glm -Force


- name: Configure
run: |
$env:Path += ";$env:GLEW_PATH"

echo $env:PATH

tests\windows.bat configure
- name: Build
run: |
tests\windows.bat build

- name: Package
run: |
tests\windows.bat package
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ dockerfile
!*/dockerfile

!packaging/*.sh
pkg
pkg
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0.0)
cmake_minimum_required(VERSION 3.18)
project(cinnabar VERSION 0.0.1)

#include(CTest)
Expand All @@ -8,11 +8,13 @@ set(CMAKE_CXX_STANDARD 17)
#set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/arch)
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/arch)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run)
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/dep/")
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)

add_subdirectory(dep)
add_subdirectory(src)
49 changes: 49 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
## Systems
* Core
* Time - Tumble
* Logger (Tumpnt Log) - Tumble, SArpnt
* Transform - Tumble
* Render
* Rendering Engine - SArpnt
* Asset Manager - SArpnt,Tumble
* Materials - SArpnt
* Meshes - SArpnt
* Textures - SArpnt
* Shaders - SArpnt
* Camera - SArpnt
* Window - SArpnt
## CI/CD
* CMakeLists - Tumble, SArpnt
* UnitTesting - Tumble
* Packging
* Arch (pkg) - Tumble
* Debian (deb) - Tumble
* Gentoo (tbz2) - n/a
* openSUSE (rpm) - n/a
* MacOS (rb) - n/a
* RedHat/Fedora (rpm) - n/a
* Windows (msi) - n/a
* Package Manager PPAs
* Arch (pacman) - Tumble
* Debian (apt) - Tumble
* Gentoo (emerge) - n/a
* MacOS (brew) - n/a
* RedHat/Fedora (dnf) - n/a
* openSUSE (zypper) - n/a
## Testing
* Arch - Sarpnt, Github Actions
* Debian - Tumble. Github Actions
* Gentoo - n/a
* MacOS - n/a
* RedHat/Fedora - n/a
* Windows - Tumble

## Platforms
* Arch - SArpnt
* Debian - Tumble
* Gentoo - n/a
* MacOS - n/a
* openSUSE - n/a
* RedHat/Fedora - n/a
* Windows - Tumble

52 changes: 39 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,29 @@
Use the build tool [CMake](https://cmake.org/install/) to build cinnabar.

### Windows
Choose Compiler:
* [Visual Studio](https://visualstudio.microsoft.com/)/[MSBuild](https://aka.ms/buildtools) - *[setup](#visual-studio-installer)*
* [MinGW](http://mingw-w64.org/doku.php/download) - *[setup](#msysmingw)*

[Visual Studio](https://visualstudio.microsoft.com/)
[VSCode](https://code.visualstudio.com/docs/cpp/config-msvc)
#### Visual Studio Installer
* Desktop development with C++ (C++ core desktop features)
* MSVC V142 - VS 2016 C++ x64/x86 build tools (Latest)
* Windows 10 SDK (10.0.19041.0)
Download the [dependancies](#Dependancies) and extract them to a folder and set the envirement variables of `GLM_ROOT_DIR` and `SDL2DIR` then add the bins of pkg and glew to path and put the .dll files in the res folder.

#### MinGW
```bash
pacman -Syu
pacman -Su
pacman -S --needed base-devel mingw-w64-x86_64-toolchain
pacman -S cmake mingw-w64-x86_64-glew mingw-w64-x86_64-glm mingw-w64-x86_64-SDL2
```

##### pkg-config
in here https://download-fallback.gnome.org/binaries/
go to win32 or win34
the go to dependecites and pickup gettext-runtime and pkg-config that isnt a dev veriso
then go to glib and get the latest verison that isnt a dev verision
### Debian

```bash
Expand Down Expand Up @@ -54,17 +73,24 @@ cd res
../build/run/cinnabar-engine
```

## Libraries
## Dependancies
* [CMake](https://cmake.org/)
* [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/)
* [Simple Directmedia Layer](https://www.libsdl.org/)
* [GLEW](http://glew.sourceforge.net/)
* [OpenGL Mathematics](https://glm.g-truc.net/0.9.9/index.html)

- Build Pipeline: [CMake](https://cmake.org/)
- Window: [Simple Directmedia Layer](https://www.libsdl.org/)
- Rendering: [OpenGL](https://www.opengl.org/)
- OpenGL Extention Loader: [GLEW](http://glew.sourceforge.net/)
- Maths: [OpenGL Mathematics](https://glm.g-truc.net/0.9.9/index.html)
- Image: [STB Image](https://github.com/nothings/stb/blob/master/stb_image.h)
- Text Files: [std:fstream](https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.2/fstream.html)
- Logger: [Tumpnt Logger](https://github.com/Tumpnt/TumpntAudio/blob/master/src/core/tpnt_log.h)
- Time: [TumbleTime](https://github.com/tumble1999/tumble-time)
## Libraries
* Build Pipeline: [CMake](https://cmake.org/)
* Library Helper: [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/)
* Window: [Simple Directmedia Layer](https://www.libsdl.org/)
* Rendering: [OpenGL](https://www.opengl.org/)
* OpenGL Extention Loader: [GLEW](http://glew.sourceforge.net/)
* Maths: [OpenGL Mathematics](https://glm.g-truc.net/0.9.9/index.html)
* Image: [STB Image](https://github.com/nothings/stb/blob/master/stb_image.h)
* Text Files: [std:fstream](https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.2/fstream.html)
* Logger: [Tumpnt Logger](https://github.com/Tumpnt/TumpntAudio/blob/master/src/core/tpnt_log.h)
* Time: [TumbleTime](https://github.com/tumble1999/tumble-time)

## Contributing

Expand Down Expand Up @@ -138,7 +164,7 @@ Pull requests are welcome. For major changes, please open an issue first to disc
- [ ] GUI
- [ ] Portals
- [ ] VR support
- [ ] Port to Windows
- [X] Port to Windows
- [ ] Port to MacOS
- [ ] Port to Emscripten
- [ ] Port to Android
Expand Down
Loading