Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
3a75bc9
Temporary change from tags to branches to do get helps form github ac…
ctoabidmaqbool Sep 12, 2024
a1d5d56
Enable windows github actions and debug uname in windows
ctoabidmaqbool Sep 12, 2024
601cdd8
debug if libjdk.lib is copied to correct directory and we are in corr…
ctoabidmaqbool Sep 12, 2024
e927616
use correct uname e.g. MSYS_NT-10.0-20348
ctoabidmaqbool Sep 12, 2024
2c1df6d
try to verify and make sure in both linux and window same jdk must be…
ctoabidmaqbool Sep 12, 2024
d996ca5
mistakenly changed version for build-android rather then for build-wi…
ctoabidmaqbool Sep 12, 2024
dae49c7
try to fix use jdk 11 in windows too
ctoabidmaqbool Sep 12, 2024
19ce250
try to setup msy2, e.g. D:\msys64\usr\include\sys\mman.h
ctoabidmaqbool Sep 12, 2024
eca92cc
Custom install MSYS2
ctoabidmaqbool Sep 12, 2024
2e15542
fix no such!
ctoabidmaqbool Sep 12, 2024
8539bd6
try to fix: D:\a\_temp\b47e13e7-f3b6-4bed-8d8a-3e94a4e725b3.sh: line …
ctoabidmaqbool Sep 12, 2024
adfe22f
fixed, \usr\include\sys not exists!
ctoabidmaqbool Sep 12, 2024
15509cc
Another try using msys2_shell.cmd
ctoabidmaqbool Sep 12, 2024
d9a6868
as Online is git bash shell, some debugging
ctoabidmaqbool Sep 12, 2024
b64c6c5
set system path variable using different method!
ctoabidmaqbool Sep 12, 2024
156a4a2
github path syntax, fix
ctoabidmaqbool Sep 12, 2024
3a7bbb7
trying out $PATH instead of $GITHUB_PATH
ctoabidmaqbool Sep 12, 2024
b943f3b
path variable using different way
ctoabidmaqbool Sep 12, 2024
e3a0fa0
using bash
ctoabidmaqbool Sep 12, 2024
e70fac1
fix path ls /c/tools/msys64/usr/include/sys
ctoabidmaqbool Sep 12, 2024
16fd14a
try to use msys64 bash terminal
ctoabidmaqbool Sep 12, 2024
a33a453
fix path syntax,
ctoabidmaqbool Sep 12, 2024
721ad09
try to install necessory nsys64 PACKAGES
ctoabidmaqbool Sep 12, 2024
04bc882
switch to MINGW64_NT-10.0-20348
ctoabidmaqbool Sep 12, 2024
fd6cb6d
switch to msys64 for make clean all
ctoabidmaqbool Sep 12, 2024
523b614
Run make clean all in bash shell!
ctoabidmaqbool Sep 12, 2024
35e2401
bash without --login -i
ctoabidmaqbool Sep 12, 2024
626dc78
try to match MINGW64_NT without version info!
ctoabidmaqbool Sep 12, 2024
ad8e053
try to add java before make clean build
ctoabidmaqbool Sep 12, 2024
86c8854
witch shell to msys64 directly!
ctoabidmaqbool Sep 12, 2024
c20d1f3
USING msys2/setup-msys2@v2
ctoabidmaqbool Sep 13, 2024
45c71bc
Fix, MINGW64_NT-10.0-20348 name
ctoabidmaqbool Sep 13, 2024
73c4dea
use 64 bit jdk
ctoabidmaqbool Sep 13, 2024
eb2c69f
fix jdk path:
ctoabidmaqbool Sep 13, 2024
cc1c86b
Another little path fix!
ctoabidmaqbool Sep 13, 2024
e5655b0
Another test if java available!
ctoabidmaqbool Sep 13, 2024
caee4a6
Fix some syntax
ctoabidmaqbool Sep 13, 2024
bc28a0f
fix another syntax
ctoabidmaqbool Sep 13, 2024
6904b5e
use long long
ctoabidmaqbool Sep 13, 2024
25b25de
For windows switch to AR from Lib!
ctoabidmaqbool Sep 13, 2024
c3646a3
fix correct upload path!
ctoabidmaqbool Sep 13, 2024
50596e5
Optiomized the github workflows file a little bit!
ctoabidmaqbool Sep 13, 2024
11d73ec
Extra file and move using using msys2 shell instead of powershell way!
ctoabidmaqbool Sep 13, 2024
e771e2e
Install unzip utility of msys2 package
ctoabidmaqbool Sep 13, 2024
f00f2b9
Again apply others too othere then windows-x64
ctoabidmaqbool Sep 13, 2024
a949604
Github Actions again swith to tags instead of branches.
ctoabidmaqbool Sep 13, 2024
d8fb8ee
Merge remote-tracking branch 'remotes/origin/main' into windows-impl
ctoabidmaqbool Sep 13, 2024
17e8be8
Switch to actions/setup-java@v4
ctoabidmaqbool Sep 13, 2024
125ed0b
rename libvmone.lib to vmone.lib as substrate is looking for vmone.li…
ctoabidmaqbool Sep 14, 2024
64d95c2
Do some debugging why .objs are not including in the final .lib!
ctoabidmaqbool Sep 16, 2024
84b72f0
trying to do debugging of make
ctoabidmaqbool Sep 16, 2024
c3df9c4
Try to do partial match: e.g. MINGW64_NT
ctoabidmaqbool Sep 16, 2024
8cd0fa4
debugging files extracted by libjdk.lib
ctoabidmaqbool Sep 17, 2024
ba9c386
debugging if d drive is available online;
ctoabidmaqbool Sep 17, 2024
0f40f34
some more tests
ctoabidmaqbool Sep 17, 2024
3578c17
debugging some more!
ctoabidmaqbool Sep 17, 2024
b3e28d5
debugging if folders are createing?
ctoabidmaqbool Sep 17, 2024
3526a2a
fix code formate
ctoabidmaqbool Sep 17, 2024
b0c4746
fix some more syntax erros
ctoabidmaqbool Sep 17, 2024
aee7999
Remove extras:
ctoabidmaqbool Sep 17, 2024
0bfbd35
fix syntax
ctoabidmaqbool Sep 17, 2024
8e2ffd0
check online ar version!
ctoabidmaqbool Sep 17, 2024
a9b068c
try to extract files in temp form libjdk.lib
ctoabidmaqbool Sep 17, 2024
9f38c38
Try to add local finished file!
ctoabidmaqbool Sep 18, 2024
bd80868
dubbing dirlist.txt;
ctoabidmaqbool Sep 18, 2024
c14f342
Add windows native codding stuff while make sure, Mac/Linux codding n…
ctoabidmaqbool Sep 20, 2024
f0cf8cb
Add vmone.lib build through Visual Studio 2022 -> Release -> Build So…
ctoabidmaqbool Sep 20, 2024
c9dd6c4
Try to do solve errors caused by:
ctoabidmaqbool Sep 24, 2024
8535238
temp fixes!
ctoabidmaqbool Oct 29, 2024
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
68 changes: 51 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Release

on:
push:
branches:
- '**'
tags:
- '*'

Expand Down Expand Up @@ -122,61 +124,95 @@ jobs:
retention-days: 1

build-windows-x64:
if: false
runs-on: windows-latest
steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v4
- name: 'Set up JDK 11 Temurin'
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
architecture: 'x64'
- name: Set up MSYS2 environment
uses: msys2/setup-msys2@v2
with:
update: true
install: >-
make
gcc
coreutils
unzip
- name: 'Download libjdk.lib'
uses: robinraju/release-downloader@v1
with:
repository: 'gluonhq/mobile'
latest: true
fileName: 'windows-x64.zip'
- name: 'Build'
shell: msys2 {0}
run: |
powershell -Command "Expand-Archive -Path windows-x64.zip -DestinationPath C:\temp\"
powershell -Command "Move-Item -Path C:\temp\windows-x64\libjdk.lib -Destination C:\temp\"
cd C:\temp
mkdir -p /c/temp
unzip windows-x64.zip -d /c/temp
mv /c/temp/windows-x64/libjdk.lib /c/temp/
export JAVA_HOME="/c/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/11.0.24-8/x64"
export PATH="$JAVA_HOME/bin:$PATH"
make clean all
- name: 'Upload static image artifact'
uses: actions/upload-artifact@v4
with:
name: vmone-windows-x64
path: C:\temp\lib\windows\x64\staticjdk\lib\
path: lib\windows\staticjdk\lib\
retention-days: 1

build-windows-aarch64:
if: false
runs-on: windows-latest
steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v4
- name: 'Set up JDK 11 Temurin'
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
architecture: 'x64'
- name: Set up MSYS2 environment
uses: msys2/setup-msys2@v2
with:
update: true
install: >-
make
gcc
coreutils
unzip
- name: 'Download libjdk.lib'
uses: robinraju/release-downloader@v1
with:
repository: 'gluonhq/mobile'
latest: true
fileName: 'windows-aarch64.zip'
- name: 'Build'
shell: msys2 {0}
run: |
powershell -Command "Expand-Archive -Path windows-aarch64.zip -DestinationPath C:\temp\"
powershell -Command "Move-Item -Path C:\temp\windows-aarch64\libjdk.lib -Destination C:\temp\"
cd C:\temp
mkdir -p /c/temp
unzip windows-aarch64.zip -d /c/temp
mv /c/temp/windows-aarch64/libjdk.lib /c/temp/
export JAVA_HOME="/c/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/11.0.24-8/x64"
export PATH="$JAVA_HOME/bin:$PATH"
make clean all
- name: 'Upload static image artifact'
uses: actions/upload-artifact@v4
with:
name: vmone-windows-aarch64
path: C:\temp\lib\windows\aarch64\staticjdk\lib\
path: lib\windows\staticjdk\lib\
retention-days: 1

release:
needs: [
build-android, build-ios,
build-linux-x64,
build-macos-x64, build-macos-aarch64,
# build-windows-x64, build-windows-aarch64
build-windows-x64, build-windows-aarch64
]
runs-on: ubuntu-22.04
steps:
Expand Down Expand Up @@ -215,14 +251,12 @@ jobs:
with:
name: vmone-windows-x64
path: ./dist/windows-x64/lib/
if: false

- name: Download windows aarch64 artifacts
uses: actions/download-artifact@v4
with:
name: vmone-windows-aarch64
path: ./dist/windows-aarch64/lib/
if: false

- name: Zip downloaded artifacts
run: |
Expand All @@ -236,10 +270,10 @@ jobs:
zip -r ../vmone-macos-x64.zip lib/
cd $GITHUB_WORKSPACE/dist/macos-aarch64/
zip -r ../vmone-macos-aarch64.zip lib/
# cd $GITHUB_WORKSPACE/dist/windows-x64/
# zip -r ../vmone-windows-x64.zip lib/
# cd $GITHUB_WORKSPACE/dist/windows-aarch64/
# zip -r ../vmone-windows-aarch64.zip lib/
cd $GITHUB_WORKSPACE/dist/windows-x64/
zip -r ../vmone-windows-x64.zip lib/
cd $GITHUB_WORKSPACE/dist/windows-aarch64/
zip -r ../vmone-windows-aarch64.zip lib/

- name: Check zip files
run: |
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ replay_pid*

# Mac
.DS_Store

.vscode
.vs

x64
31 changes: 17 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ else ifeq ($(shell uname), Darwin)
OS := macosx
CC = gcc
CFLAGS = -DDARWIN $(INCLUDE_FLAGS)
else ifeq ($(shell uname), MINGW32_NT)
else ifeq ($(findstring MINGW64_NT, $(shell uname)), MINGW64_NT)
OS := windows
CC = gcc
CFLAGS = -DWIN32 -I$(JAVA)/include -I$(JAVA)/include/win32
CFLAGS += -D__int64="long long" -mavx -mxsave
endif

ifeq ($(TARGET), ios)
Expand Down Expand Up @@ -71,10 +72,10 @@ JDKLIB = /tmp/libjdk.a
TEMP_DIR = /tmp/extractdir

ifeq ($(OS), windows)
JDKLIB := C:/path/to/libjdk.lib
LIB = $(LIBDIR)/windows/staticjdk/lib/libvmone.lib
AR = lib
ARFLAGS = /OUT:
JDKLIB := C:/temp/libjdk.lib
LIB = $(LIBDIR)/$(OS)/staticjdk/lib/vmone.lib
AR = ar
ARFLAGS = rcs
else
LIB = $(LIBDIR)/$(OS)/staticjdk/lib/libvmone.a
AR = ar
Expand All @@ -90,8 +91,12 @@ ifeq ($(OS), windows)
echo "Including $(JDKLIB) in lib"; \
TMPDIR=$(LIBDIR)/$(OS)/temp_objs; \
mkdir -p $$TMPDIR; \
$(AR) t $(JDKLIB) | xargs -n 1 dirname | sort -u > dirlist.txt; \
xargs mkdir -p < dirlist.txt; \
cp dirlist.txt $(LIBDIR)/$(OS)/staticjdk/lib; \
(cd $$TMPDIR && $(AR) x $(JDKLIB)); \
$(AR) $(ARFLAGS) $@ $$TMPDIR/*.o $^; \
find D:/a/mobile/mobile/build/windows-x64/support/native -type f -exec mv {} $$TMPDIR \; ; \
$(AR) $(ARFLAGS) $@ $$TMPDIR/*.* $^; \
else \
echo "Existing library not found. Creating static library with object files only."; \
$(AR) $(ARFLAGS) $@ $^; \
Expand All @@ -101,11 +106,11 @@ else
echo "Including $(JDKLIB) in lib"; \
TMPDIR=$(LIBDIR)/$(OS)/temp_objs; \
mkdir -p $$TMPDIR; \
(cd $$TMPDIR && ar x $(JDKLIB)); \
ar $(ARFLAGS) $@ $$TMPDIR/*.o $^; \
(cd $$TMPDIR && $(AR) x $(JDKLIB)); \
$(AR) $(ARFLAGS) $@ $$TMPDIR/*.o $^; \
else \
echo "Existing library not found. Creating static library with object files only."; \
ar $(ARFLAGS) $@ $^; \
$(AR) $(ARFLAGS) $@ $^; \
fi
endif

Expand All @@ -114,6 +119,8 @@ debug:
@echo "SRCS: $(SRCS)"
@echo "OBJS: $(OBJS)"
@echo "OBJDIR: $(OBJDIR)"
@echo "JDKLIB: $(JDKLIB)"
@echo "JAVA_HOME: $(JAVA)"


$(OBJDIR)/$(OS)/%.o: $(SRCDIR)/%.c
Expand All @@ -125,9 +132,5 @@ $(OBJDIR)/$(OS)/%.o: $(SRCDIR)/darwin/%.m
@mkdir -p $(OBJDIR)/$(OS)
$(CC) $(CFLAGS) -c $< -o $@

#$(OBJDIR)/$(OS)/%.o: $(SRCDIR)/darwin/%.m
#@mkdir -p $(OBJDIR)/$(OS)
#$(CC) $(CFLAGS) -c $< -o $@

clean:
rm -rf $(OBJDIR) $(LIBDIR)
rm -rf $(OBJDIR) $(LIBDIR)
Loading