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

[New port] Added Sciter.JS port (version 4.4.8.16) #18951

Merged
merged 15 commits into from
Nov 15, 2021
Merged
111 changes: 111 additions & 0 deletions ports/sciter-js/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)

if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
VuYeK marked this conversation as resolved.
Show resolved Hide resolved
message(FATAL_ERROR "Sciter only supports Windows Desktop")
endif()

set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)

set(SCITER_REVISION ffa3a73e17c0921d570fc227e20115ed656826d0)
set(SCITER_SHA 32d9bc17cd386e1e59a0cd86178b1e4782cb65d353207fa8d53ecafda98e242697796d5ea059d1fb426e7e473ba19e71383953c2c28350cf7772e64da70a6d06)

if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
set(SCITER_ARCH x64)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
set(SCITER_ARCH x32)
else()
message(FATAL_ERROR "Sciter only supports x86/x64")
endif()
VuYeK marked this conversation as resolved.
Show resolved Hide resolved
JonLiu1993 marked this conversation as resolved.
Show resolved Hide resolved

# check out the `https://github.com/c-smile/sciter-js-sdk/archive/${SCITER_REVISION}.tar.gz`
# hash checksum can be obtained with `curl -L -o tmp.tgz ${URL} && vcpkg hash tmp.tgz`
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO c-smile/sciter-js-sdk
REF ${SCITER_REVISION}
SHA512 ${SCITER_SHA}
)

# install include directory
file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/sciter-js
FILES_MATCHING
PATTERN "*.cpp"
PATTERN "*.mm"
PATTERN "*.h"
PATTERN "*.hpp"
)

set(SCITER_SHARE "${CURRENT_PACKAGES_DIR}/share/sciter-js")
set(SCITER_TOOLS ${CURRENT_PACKAGES_DIR}/tools/sciter-js)
BillyONeal marked this conversation as resolved.
Show resolved Hide resolved
set(TOOL_PERMS FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

# license
file(COPY ${SOURCE_PATH}/logfile.md DESTINATION ${SCITER_SHARE})
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${SCITER_SHARE} RENAME copyright)

# tools
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Linux AND VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
VuYeK marked this conversation as resolved.
Show resolved Hide resolved
set(SCITER_BIN ${SOURCE_PATH}/bin/linux/x64)

file(INSTALL ${SOURCE_PATH}/bin/linux/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})
file(INSTALL ${SOURCE_PATH}/bin/linux/qjs DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})
file(INSTALL ${SOURCE_PATH}/bin/linux/qjsc DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})

file(INSTALL ${SCITER_BIN}/usciter DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})
file(INSTALL ${SCITER_BIN}/inspector DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})
file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SCITER_BIN}/sciter-sqlite.so DESTINATION ${SCITER_TOOLS})

if ("windowless" IN_LIST FEATURES)
set(SCITER_BIN ${SOURCE_PATH}/bin.lite/linux/x64)
endif()

file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)

file(INSTALL ${SCITER_BIN}/sciter-sqlite.so DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(INSTALL ${SCITER_BIN}/sciter-sqlite.so DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)

elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Darwin)
VuYeK marked this conversation as resolved.
Show resolved Hide resolved
set(SCITER_BIN ${SOURCE_PATH}/bin/macosx)

file(INSTALL ${SCITER_BIN}/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})
file(INSTALL ${SCITER_BIN}/qjs DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})
file(INSTALL ${SCITER_BIN}/qjsc DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})

file(INSTALL ${SCITER_BIN}/inspector.app DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SCITER_BIN}/usciterjs.app DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SCITER_BIN}/libsciter.dylib DESTINATION ${SCITER_TOOLS})

execute_process(COMMAND sh -c "chmod +x usciterjs.app/Contents/MacOS/usciterjs" WORKING_DIRECTORY ${SCITER_TOOLS})
execute_process(COMMAND sh -c "chmod +x inspector.app/Contents/MacOS/inspector" WORKING_DIRECTORY ${SCITER_TOOLS})

file(INSTALL ${SCITER_BIN}/libsciter.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(INSTALL ${SCITER_BIN}/libsciter.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)

else()
VuYeK marked this conversation as resolved.
Show resolved Hide resolved
set(SCITER_BIN ${SOURCE_PATH}/bin/windows/${SCITER_ARCH})
set(SCITER_BIN32 ${SOURCE_PATH}/bin/windows/x32)

file(INSTALL ${SOURCE_PATH}/bin/windows/packfolder.exe DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SOURCE_PATH}/bin/windows/qjs.exe DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SOURCE_PATH}/bin/windows/qjsc.exe DESTINATION ${SCITER_TOOLS})

file(INSTALL ${SCITER_BIN}/scapp.exe DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SCITER_BIN}/usciter.exe DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SCITER_BIN}/inspector.exe DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SCITER_BIN}/sciter-sqlite.dll DESTINATION ${SCITER_TOOLS})

if ("windowless" IN_LIST FEATURES)
set(SCITER_BIN ${SOURCE_PATH}/bin.lite/windows/${SCITER_ARCH})
endif()

file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)

file(INSTALL ${SCITER_BIN}/sciter-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(INSTALL ${SCITER_BIN}/sciter-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)

message(WARNING "Sciter requires manual deployment of the correct DLL files.")
endif()
12 changes: 12 additions & 0 deletions ports/sciter-js/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "sciter-js",
"version-string": "4.4.8.10",
"description": "Sciter.JS - Sciter but with QuickJS on board instead of TIScript. Sciter is an embeddable HTML/CSS/scripting engine.",
"homepage": "https://github.com/c-smile/sciter-js-sdk",
"supports": "!uwp & !arm & !static",
"features": {
"windowless": {
JonLiu1993 marked this conversation as resolved.
Show resolved Hide resolved
"description": "windowless version - lite version"
}
}
}
106 changes: 2 additions & 104 deletions ports/sciter/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,105 +1,3 @@
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)

if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "Sciter only supports Windows Desktop")
endif()

# header-only library
set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)

set(SCITER_REVISION 29a598b6d20220b93848b5e8abab704619296857)
set(SCITER_SHA dc9ebcc59a4ca7b154efcbd96c7e0aa53dc344f6a2cfa91f8c351c1edc5a0f060129715f8eac85e00df9b6c153322a9ba36b430da5020d38769740434cbcd52c)

if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
set(SCITER_ARCH x64)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
set(SCITER_ARCH x32)
endif()

# check out the `https://github.com/c-smile/sciter-sdk/archive/${SCITER_REVISION}.tar.gz`
# hash checksum can be obtained with `curl -L -o tmp.tgz ${URL} && vcpkg hash tmp.tgz`
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO c-smile/sciter-sdk
REF ${SCITER_REVISION}
SHA512 ${SCITER_SHA}
)

# install include directory
file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/sciter
FILES_MATCHING
PATTERN "*.cpp"
PATTERN "*.mm"
PATTERN "*.h"
PATTERN "*.hpp"
)

set(SCITER_SHARE ${CURRENT_PACKAGES_DIR}/share/sciter)
set(SCITER_TOOLS ${CURRENT_PACKAGES_DIR}/tools/sciter)
set(TOOL_PERMS FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

# license
file(COPY ${SOURCE_PATH}/logfile.htm DESTINATION ${SCITER_SHARE})
file(INSTALL ${SOURCE_PATH}/license.htm DESTINATION ${SCITER_SHARE} RENAME copyright)

# samples & widgets
file(COPY ${SOURCE_PATH}/samples DESTINATION ${SCITER_SHARE})
file(COPY ${SOURCE_PATH}/widgets DESTINATION ${SCITER_SHARE})

# tools
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Linux AND VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
set(SCITER_BIN ${SOURCE_PATH}/bin.lnx/x64)

file(INSTALL ${SOURCE_PATH}/bin.lnx/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})
file(INSTALL ${SOURCE_PATH}/bin.lnx/tiscript DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})

file(INSTALL ${SCITER_BIN}/usciter DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})
file(INSTALL ${SCITER_BIN}/inspector DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})
file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${SCITER_TOOLS})

if ("windowless" IN_LIST FEATURES)
set(SCITER_BIN ${SOURCE_PATH}/bin.lnx/x64lite)
endif()

file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)

elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Darwin)
set(SCITER_BIN ${SOURCE_PATH}/bin.osx)

file(INSTALL ${SCITER_BIN}/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})
file(INSTALL ${SCITER_BIN}/tiscript DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})

file(INSTALL ${SCITER_BIN}/inspector.app DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SCITER_BIN}/sciter.app DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SCITER_BIN}/libsciter.dylib DESTINATION ${SCITER_TOOLS})

# not sure whether there is a better way to do this, because
# `file(INSTALL sciter.app FILE_PERMISSIONS EXECUTE)`
# would mark everything as executable which is no go.
execute_process(COMMAND sh -c "chmod +x sciter.app/Contents/MacOS/sciter" WORKING_DIRECTORY ${SCITER_TOOLS})
execute_process(COMMAND sh -c "chmod +x inspector.app/Contents/MacOS/inspector" WORKING_DIRECTORY ${SCITER_TOOLS})

file(INSTALL ${SCITER_BIN}/libsciter.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(INSTALL ${SCITER_BIN}/libsciter.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)

else()
set(SCITER_BIN ${SOURCE_PATH}/bin.win/${SCITER_ARCH})
set(SCITER_BIN32 ${SOURCE_PATH}/bin.win/x32)

file(INSTALL ${SOURCE_PATH}/bin.win/packfolder.exe DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SOURCE_PATH}/bin.win/tiscript.exe DESTINATION ${SCITER_TOOLS})

file(INSTALL ${SCITER_BIN32}/wsciter.exe DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SCITER_BIN32}/inspector.exe DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SCITER_BIN32}/sciter.dll DESTINATION ${SCITER_TOOLS})

if ("windowless" IN_LIST FEATURES)
set(SCITER_BIN ${SOURCE_PATH}/bin.win/${SCITER_ARCH}lite)
endif()

file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()

message(STATUS "Warning: Sciter requires manual deployment of the correct DLL files.")
message(WARNING "The sciter port is deprecated, using sciter-js instead")
VuYeK marked this conversation as resolved.
Show resolved Hide resolved
14 changes: 5 additions & 9 deletions ports/sciter/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
"name": "sciter",
"version-string": "4.4.8.3",
"port-version": 1,
"version-string": "deprecated",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe deprecated.use.sciter-js

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this on different deprecated libraries in vcpkg and i wanted to be consistency

"description": "Sciter is an embeddable HTML/CSS/scripting engine.",
"homepage": "https://github.com/c-smile/sciter-sdk",
"supports": "!uwp",
"features": {
"windowless": {
"description": "Uses Sciter.Lite builds"
}
}
"homepage": "https://github.com/c-smile/sciter-js-sdk",
"dependencies": [
"sciter-js"
]
VuYeK marked this conversation as resolved.
Show resolved Hide resolved
}
8 changes: 6 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5881,8 +5881,12 @@
"port-version": 0
},
"sciter": {
"baseline": "4.4.8.3",
"port-version": 1
"baseline": "deprecated",
"port-version": 0
},
"sciter-js": {
"baseline": "4.4.8.10",
"port-version": 0
},
"scnlib": {
"baseline": "0.4",
Expand Down
9 changes: 9 additions & 0 deletions versions/s-/sciter-js.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "fb6857b026c453ce34d1d0bdd1e97be8dcb564cc",
"version-string": "4.4.8.10",
"port-version": 0
}
]
}
5 changes: 5 additions & 0 deletions versions/s-/sciter.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "450fb94588bfe7a7927c46cbdda5755d8868504d",
"version-string": "deprecated",
"port-version": 0
},
{
"git-tree": "7508c766a2564096e3ca656f6b4a26d582dcf855",
"version-string": "4.4.8.3",
Expand Down