Skip to content

Commit

Permalink
develop (#30)
Browse files Browse the repository at this point in the history
* Enable building of LLVM. Build arabica.

* Added nasm and yasm to the path. Use CMake version 3.17.2 instead of version 3.14.0.

* Disable installation of llvm since it is broken again.

* Add share\clang to the path.

* Enable llvm.

* Added directories to path. Use Python 3.8.

* Modified the imgui entry in the packageList.

* Added InstallPackagesForLinux.py.

* boost-regex with icu feature is only supported on windows

* Do not build 'boost-locale[icu]'.

* Do not build atkmm or gtkmm. They are not supported in Linux.

* Do not build atk or gtk.

* Do not build chakracore.

* Do not build cppunit.

* Remove packages from the package list that are not supported in Linux.

* Disable installation of llvm because it is currently broken.

* Do not install dlib.

* Use official release of arabica from jezhiggins.

* Fix error with arabica on Windows by defining the following preprocessor symbols: -DCMAKE_CXX_FLAGS=-DARABICA_NO_CODECVT_SPECIALISATIONS=1 -DARABICA_USE_WINSOCK=1 -DARABICA_WINDOWS=1.

* Can't build BoringSSL if OpenSSL is installed.

* Comment out portaudio line until bug is fixed.

* Updates to path.

* Changes to the packageList: 1) Added aixlog, audiofile, berkeleydb, cpu-features, cpu-features[tools], ctbignum, imgui[glfw-binding], and several more SDL2 components. 2) Build SDL2 at the same time as imgui.

* 1) Added the following items to the packageList: 7zip, akali, chromium-base, directxsdk, directxtk12, dx, fruit, function2, glew, hunspell, hunspell[tools], libevent, libevent[thread], libyaml, mimalloc, mimalloc[secure], mpfr, mygui, mygui[opengl], nt-wrapper, numcpp, p-ranav-csv2, phnt, qt5[doc], qt5[speech], qt5-winextras, safeint, tgui, tgui[tool], utf8h, utfcpp, and v8. 2) Added the ability to mark a package as x64 only. 3) Added directories to the path.

* Disable installation of chromium-base until they fix the double_conversion.lib bug.

* Set DICPATH environment variable.

* Added Emacs to path.

* Temporarily disable install of qt5 because of issue microsoft#13566 {[qt5-base:x64-windows] build failure}.

* Minor updates to InstallPackagesForWindows.py and update-env.bat.

* Updates to path.

* Updated InstallPackagesForWindows.py and update-env.bat.

* Updated update-env.bat.

* Minor updates.

* Added vcpkg-env.el.

* Updated the path.

* Updated PATH.

* Various small improvements.

* WIP. Began the process of synchronizing InstallPackagesForLinux.py with InstallPackagesForWindows.py.

* Minor updates.

* Updated packageList.

* Updated vcpkg-env.el.

* Updates to InstallPackagesForWindows.py.

* Updated the package list.

* Updated the path.

* Updates to the install packages scripts.

* Numerous improvements.

* Updated path.

* Updated package list.

* Added uberswitch.

* Install uberswitch.

* Update package list.

* Update packageList. Set JDK_HOME, JDK_HOME_X64, and JDK_HOME_X86. Update path.

* Set env for .NET.

* Added the bt directory.

* Updated packageList.

* Updated PATH.

* Added InstallPackagesForMSYS2.py.

* Updated JDK variables.

* Updated packageList.

* Updated vcpkg-env.el.

* Updated vcpkg--add-to-path-linux.

* Set PANDOC_EXE.

* Updated packageList.

* Updated path and dotnet version.

* Update DOTNET_VERSION, JDK_HOME, JDK_HOME_X64, and JDK_HOME_X86.

* Updated add-to-path-windows.

* Updated DOTNET_VERSION. Added an option to add MSYS64 directories to the path.

* Added clean.bat.

* Updated clean.bat.

* Updated x64OnlyPackageList and packageList.

* Various updates.

* Various updates.

* Trimmed the packageList so that it only includes packages I use actively. This makes updating VCPKG much less time consuming.

* Updated env.

* Minor updates to the packageList.

* No longer attempt to set DICPATH.

* * Import inspect.
* Updated x64OnlyPackageList and packageList.
* Updated the InstallPackagesWorker function.
* Updated path.

* Update path.

* Updates for Java and Python.

* Updated packageList.

* Updated DOTNET_VERSION, JDK_HOME, and JDK_HOME_X64.

* Updated path.

* Update package list.

* Updated the path.

* Set CMAKE_TOOLCHAIN_FILE. Update HOME.

---------

Co-authored-by: Ben Key <bkey76@gmail.com>
Co-authored-by: Benilda Key <bkey@vispero.com>
  • Loading branch information
3 people authored Jul 22, 2024
1 parent a3eb31b commit 3193c0e
Show file tree
Hide file tree
Showing 11 changed files with 682 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ __pycache__/
*.code-workspace
/buildtrees/
/build*/
/bt/
/downloads/
/installed*/
/vcpkg_installed*/
Expand Down
59 changes: 59 additions & 0 deletions InstallPackagesForLinux.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/env python

import os
import subprocess

packageList = [
([
'boost-asio[core,ssl]',
'boost-locale[core,icu]',
'boost-mpi[core]',
'boost-odeint[core,mpi]',
'boost-regex[core,icu]',
'boost[core,mpi]',
'icu[core,tools]',
'mp3lame',
'mpi',
'sqlite3[core,json1,tool,zlib]',
'sqlitecpp',
'strtk'
], False),
]

def InstallPackagesWorker(packages, triplet, recurse):
args = []
args.append("./vcpkg")
args.append("install")
args.extend(packages)
args.append("--triplet")
args.append(triplet)
if (recurse):
args.append("--recurse")
try:
seperator = ' '
print("Calling '%s'." % seperator.join(args))
subprocess.check_call(args)
return True
except subprocess.CalledProcessError as err:
return False
except OSError as err:
return False

def InstallPackages(packages, recurse):
print()
print("################################################################################")
print("Installing packages: %s" % packages)
print("################################################################################")
print()
ret = InstallPackagesWorker(packages, "x64-linux", recurse)
print()
return ret

def InstallPackagesInPackageList():
for package in packageList:
ret = InstallPackages(package[0], package[1])
if ret == False:
return False
return True

InstallPackagesInPackageList()
91 changes: 91 additions & 0 deletions InstallPackagesForMSYS2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#!/usr/bin/env python

import os
import subprocess
import sys

packageList = [
([
'wil'
], False),
]

def GetScriptFile() -> str:
"""Obtains the full path and file name of the Python script."""
if (hasattr(GetScriptFile, "file")):
return GetScriptFile.file
ret: str = ""
try:
# The easy way. Just use __file__.
# Unfortunately, __file__ is not available when cx_freeze is used or in IDLE.
ret = os.path.realpath(__file__)
except NameError:
# The hard way.
if (len(sys.argv) > 0 and len(sys.argv[0]) > 0 and os.path.isabs(sys.argv[0])):
ret = os.path.realpath(sys.argv[0])
else:
ret = os.path.realpath(inspect.getfile(GetScriptFile))
if (not os.path.exists(ret)):
# If cx_freeze is used the value of the ret variable at this point is in
# the following format: {PathToExeFile}\{NameOfPythonSourceFile}. This
# makes it necessary to strip off the file name to get the correct path.
ret = os.path.dirname(ret)
GetScriptFile.file: str = ret
return GetScriptFile.file

def GetScriptDirectory() -> str:
"""Obtains the path to the directory containing the script."""
if (hasattr(GetScriptDirectory, "dir")):
return GetScriptDirectory.dir
module_path: str = GetScriptFile()
GetScriptDirectory.dir: str = os.path.dirname(module_path)
return GetScriptDirectory.dir

def InstallPackagesWorker(packages, triplet, recurse):
args = []
args.append("vcpkg")
args.append("install")
args.extend(packages)
args.append("--triplet")
args.append(triplet)
args.append("--x-buildtrees-root=%s/bt" % GetScriptDirectory())
if (recurse):
args.append("--recurse")
try:
seperator = ' '
print("Calling '%s'." % seperator.join(args))
subprocess.check_call(args)
return True
except subprocess.CalledProcessError as err:
return False
except OSError as err:
return False

def GetTriplet():
system = os.environ.get('MSYSTEM', "")
if (system == "MINGW64"):
return "x64-mingw-dynamic"
if (system == "MINGW32"):
return "x86-mingw-dynamic"
return ""

def InstallPackages(packages, recurse):
triplet = GetTriplet()
if (len(triplet) == 0):
return False
print()
print("################################################################################")
print("Installing packages: %s" % packages)
print("################################################################################")
print()
ret = InstallPackagesWorker(packages, "x64-windows", recurse)
return ret

def InstallPackagesInPackageList():
for package in packageList:
ret = InstallPackages(package[0], package[1])
if ret == False:
return False
return True

InstallPackagesInPackageList()
138 changes: 138 additions & 0 deletions InstallPackagesForWindows.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
#!/usr/bin/env python

import inspect
import os
import subprocess
import sys

x64OnlyPackageList = [
'crashpad', 'eathread', 'folly[bzip2,zlib,zstd]', 'foonathan-lexy', 'qt[default-features]', 'qtspeech', 'qwt', 'yasm-tool', 'yasm-tool-helper'
]

x86OnlyPackageList = [
]

packageList = [
([
'boost-asio[core,ssl]',
'boost-locale[core,icu]',
'boost-mpi[core,python3]',
'boost-odeint[core,mpi]',
'boost-regex[core,icu]',
'boost[core,mpi]',
'icu[core,tools]',
'imgui[core,win32-binding]',
'mp3lame',
'mpi',
'ms-gsl',
'openal-soft',
'portaudio',
'python3',
'sdl2-gfx',
'sdl2-image[core,libjpeg-turbo,libwebp,tiff]',
'sdl2-mixer[core,mpg123]',
'sdl2-net',
'sdl2-ttf',
'sdl2',
'sdl2pp',
'sqlite3[core,json1,tool,zlib]',
'sqlitecpp',
'strtk',
'tiff[core,cxx,jpeg,lzma,tools,zip]',
'wil',
'wtl',
'wxwidgets[core,example,fonts,media,sound,webview]'
], False)
]

def GetScriptFile() -> str:
"""Obtains the full path and file name of the Python script."""
if (hasattr(GetScriptFile, "file")):
return GetScriptFile.file
ret: str = ""
try:
# The easy way. Just use __file__.
# Unfortunately, __file__ is not available when cx_freeze is used or in IDLE.
ret = os.path.realpath(__file__)
except NameError:
# The hard way.
if (len(sys.argv) > 0 and len(sys.argv[0]) > 0 and os.path.isabs(sys.argv[0])):
ret = os.path.realpath(sys.argv[0])
else:
ret = os.path.realpath(inspect.getfile(GetScriptFile))
if (not os.path.exists(ret)):
# If cx_freeze is used the value of the ret variable at this point is in
# the following format: {PathToExeFile}\{NameOfPythonSourceFile}. This
# makes it necessary to strip off the file name to get the correct path.
ret = os.path.dirname(ret)
GetScriptFile.file: str = ret
return GetScriptFile.file

def GetScriptDirectory() -> str:
"""Obtains the path to the directory containing the script."""
if (hasattr(GetScriptDirectory, "dir")):
return GetScriptDirectory.dir
module_path: str = GetScriptFile()
GetScriptDirectory.dir: str = os.path.dirname(module_path)
return GetScriptDirectory.dir

def common_member(a, b):
a_set = set(a)
b_set = set(b)
if len(a_set.intersection(b_set)) > 0:
return(True)
return(False)

def InstallPackagesWorker(packages, triplet, recurse):
args = []
args.append("vcpkg")
args.append("install")
args.extend(packages)
args.append("--triplet")
args.append(triplet)
args.append("--x-buildtrees-root=%s/bt" % GetScriptDirectory())
if (recurse):
args.append("--recurse")
try:
separator = ' '
print("Calling '%s'." % separator.join(args))
subprocess.check_call(args)
return True
except subprocess.CalledProcessError:
return False
except OSError:
return False

def InstallPackages(packages, recurse):
print()
print("################################################################################")
print("Installing packages: %s" % packages)
print("################################################################################")
print()
if (not common_member(x86OnlyPackageList, packages)):
print("+++++++++++++++++")
print("++ x64-windows ++")
print("+++++++++++++++++")
print()
ret = InstallPackagesWorker(packages, "x64-windows", recurse)
if (not ret):
return False
if (common_member(x64OnlyPackageList, packages)):
return ret
print()
print("+++++++++++++++++")
print("++ x86-windows ++")
print("+++++++++++++++++")
print()
ret = InstallPackagesWorker(packages, "x86-windows", recurse)
print()
return ret

def InstallPackagesInPackageList():
for package in packageList:
ret = InstallPackages(package[0], package[1])
if ret == False:
return False
return True

InstallPackagesInPackageList()
45 changes: 45 additions & 0 deletions clean.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@echo off
setlocal enableextensions

call :GetBatchFileDirectory _MyDir

for %%a in (
"bt"
"buildtrees"
"downloads"
"installed"
"packages"
) do (
if exist "%_MyDir%\%%~a\." (
echo Deleting %%~a directory.
rmdir /q /s "%_MyDir%\%%~a"
)
)

if exist "%_MyDir%\vcpkg.exe" (
del /q "%_MyDir%\vcpkg.exe"
)

endlocal
goto :EOF

::
:: GetBatchFileDirectory
::
:: Gets the name of the directory in which the batch file is located. The directory name will not
:: have a final trailing \ character.
::
:: The directory name is stored in the environment variable specified by the first parameter of the
:: function.
::
:GetBatchFileDirectory
set _dir=%~dp0
set _dir=%_dir:~0,-1%
if "%_dir%" EQU "" (
set _dir=
exit /b 1
)
set %1=%_dir%
set _dir=
exit /b 0
goto :EOF
7 changes: 7 additions & 0 deletions ports/arabica/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Source: arabica
Version: 2020-April
Homepage: https://github.com/jezhiggins/arabica
Description: Arabica is an XML and HTML processing toolkit, providing SAX2, DOM, XPath, and XSLT implementations, written in Standard C++.
Build-Depends: boost-mpl, boost-type-traits, boost-spirit, boost-function, boost-bind, boost-smart-ptr, boost-lexical-cast, winsock2 (windows)


40 changes: 40 additions & 0 deletions ports/arabica/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
include(vcpkg_common_functions)

if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO jezhiggins/arabica
REF 2020-April
SHA512 6397b4ba140acb528ae9cca4a29752363fbe694ecb53b00f7301de108cb0792f961239df2aede00ab95b0d06ac2a220071b8cec3c71b3c14ee562b3af7968c82
HEAD_REF master
)

set(ARABICA_ROOT ${SOURCE_PATH})
set(ARABICA_INCLUDE_PATH ${ARABICA_ROOT}/include)

if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DBUILD_ARABICA_EXAMPLES=OFF
-DBUILD_WITH_BOOST=ON
"-DCMAKE_CXX_FLAGS=-DARABICA_NO_CODECVT_SPECIALISATIONS=1 -DARABICA_USE_WINSOCK=1 -DARABICA_WINDOWS=1"
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
)
else()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DBUILD_ARABICA_EXAMPLES=OFF
-DBUILD_WITH_BOOST=ON
)
endif()

vcpkg_install_cmake()
vcpkg_copy_pdbs()

file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/arabica RENAME copyright)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
Loading

0 comments on commit 3193c0e

Please # to comment.