File tree Expand file tree Collapse file tree
windowsapi-code-generator
src/main/java/net/codecrete/windowsapi/writer Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353 echo "JAVA_HOME=$JAVA_HOME_25_X64" >> "$GITHUB_ENV"
5454 echo "$JAVA_HOME_25_X64/bin" >> "$GITHUB_PATH"
5555 - name : Generate full Windows API
56- run : java --class-path windowsapi-code-generator/target/test-classes:windowsapi-code-generator/target/code-generator-0.8.3.jar net.codecrete.windowsapi.special.FullBuild integration-tests/full-build/src/main/java
56+ run : java -Djava.library.path=C:/Users - -class-path windowsapi-code-generator/target/test-classes:windowsapi-code-generator/target/code-generator-0.8.3.jar net.codecrete.windowsapi.special.FullBuild integration-tests/full-build/src/main/java
5757 - name : Build full Windows API
5858 run : mvn package
5959 working-directory : ./integration-tests/full-build
Original file line number Diff line number Diff line change 55
66 <groupId >net.codecrete.windows-api</groupId >
77 <artifactId >code-generator</artifactId >
8- <version >0.8.3</version >
8+ <version >0.8.3-SNAPSHOT </version >
99
1010 <properties >
1111 <maven .compiler.release>21</maven .compiler.release>
Original file line number Diff line number Diff line change @@ -60,15 +60,18 @@ public class Apis {
6060
6161 """ );
6262
63- writer .println (" static {" );
63+ writer .print ("""
64+ static {
65+ var libraryPath = System.getenv("WINDIR") + "\\ \\ SYSTEM32\\ \\ ";
66+ """ );
6467 functions .stream ().map (Method ::dll ).filter (Objects ::nonNull ).distinct ().sorted ().forEach (dll ->
6568 writer .printf ("""
66- System.loadLibrary( "%s");
67- """ , dllName (dll )));
69+ System.load(libraryPath + "%s.dll ");
70+ """ , dllName (dll )));
6871 writer .print ("""
69- }
70-
71- """ );
72+ }
73+
74+ """ );
7275
7376 boolean usesLastError = anyFunctionUsesLastError (functions );
7477
You can’t perform that action at this time.
0 commit comments