Skip to content

Feature/add reference - #28

Open
Vad1mo wants to merge 2 commits into
Itiviti:masterfrom
Vad1mo:feature/addReference
Open

Feature/add reference#28
Vad1mo wants to merge 2 commits into
Itiviti:masterfrom
Vad1mo:feature/addReference

Conversation

@Vad1mo

@Vad1mo Vad1mo commented Jul 22, 2016

Copy link
Copy Markdown
Contributor
  • Allows to pass references to IKVM
  • Now it is also possible to download newer (>8.x) IKVM versions which are hosted on the IKVM Authors website http://www.frijters.net

I also added the dependency 'commons-io:commons-io:2.5' without it the project didn't compile.

Vad1mo added 2 commits July 22, 2016 16:39
- allow to download from  beta releases from frijters.net
if (platform) {
commandLineArgs += "-platform:${platform}"
}
if (reference) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

any reason not to use the supported list of references (through the configuration)? (maybe lack of documentation on how to use it ?) - see getReferences()

@Vad1mo

Vad1mo commented Aug 1, 2016

Copy link
Copy Markdown
Contributor Author

I planned to implement the -reference:library-filespec in http://www.ikvm.net/userguide/ikvmc.html

Is it the same as getReferences if yes how do I use it?

What I want is to compile against .NET 2.0
ikvmc ... -reference:/Library/Frameworks/Mono.framework/Versions/3.12.1/lib/mono/2.0/mscorlib.dll

@gluck

gluck commented Aug 1, 2016

Copy link
Copy Markdown
Contributor

today you can add references using a configuration like:

dependencies {
    ikvmCompile group: 'foo', name: 'bar', version: '1.0', type: '.dll'
}

(which will add -reference:PATH_TO/bar.dll to the IKVM command, assuming you have a resolver that'll point towards these)

Where do you need to reference libs from ?

@Vad1mo

Vad1mo commented Aug 1, 2016

Copy link
Copy Markdown
Contributor Author

Currently I use this command and the dll I am referencing is mscorelib 2.0

mono ../ikvm-8.1.5717.0/bin/ikvmc.exe \
    -out:/dot.NET-$version.dll \
    -version:$version\
    -fileversion:$version \
    -keyfile:/Users../../key.key \
    -removeassertions -compressresources 
    -target:library \
    -nostdlib \
    -reference:/Library/Frameworks/Mono.framework/Versions/3.12.1/lib/mono/2.0/mscorlib.dll \
    /Users/.../myLib-$version.jar

@gluck

gluck commented Aug 5, 2016

Copy link
Copy Markdown
Contributor

As per https://docs.gradle.org/current/userguide/dependency_management.html#sub:file_dependencies did you try something like:

dependencies {
    ikvmCompile files('/Library/Frameworks/Mono.framework/Versions/3.12.1/lib/mono/2.0/mscorlib.dll')
}

?

@gluck

gluck commented Aug 5, 2016

Copy link
Copy Markdown
Contributor

Note that after having merged the support for www.frijters.net, I rollback'ed it because it caused CI build issues (timeouts on the URL).
I think it's safer to avoid the extra lookup, users can specify the beta URL if they want using:

ikvm {
    ikvmHome = "http://www.frijters.net/...."
}

Thx

@Vad1mo

Vad1mo commented Feb 22, 2017

Copy link
Copy Markdown
Contributor Author

I wonder how I could resolve this issue after setting

ikvmCompile files('/Library/Frameworks/Mono.framework/Versions/3.12.1/lib/mono/2.0/mscorlib.dll')

is there some sort of exclude in ikvm or the plugin or -nostdlib support

warning IKVMC0127: Assembly
"/Library/Frameworks/Mono.framework/Versions/3.12.1/lib/mono/2.0/mscorlib.dll" 
is ignored as previously loaded assembly
"/Library/Frameworks/Mono.framework/Versions/4.4.1/lib/mono/4.5/mscorlib.dll" 
has the same identity "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

I need to compile against mscorlib 2.0 because the dll will be used with an .NET 2.0 application. It seems Its not possible to create a 2.0 compatible version with a 4.5 corlib.

@Vad1mo

Vad1mo commented Nov 16, 2017

Copy link
Copy Markdown
Contributor Author

@gluck I still have an issue as the mscorlib.dll is added twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants