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

bug: language property not evaluated correctly #50

Closed
tofi86 opened this issue Dec 14, 2016 · 22 comments
Closed

bug: language property not evaluated correctly #50

tofi86 opened this issue Dec 14, 2016 · 22 comments

Comments

@tofi86
Copy link
Contributor

tofi86 commented Dec 14, 2016

I have the following configuration:

<configuration>
	...
	<versionInfo>
		...
		<language>ENGLISH_US</language>
	</versionInfo>
	...
</configuration>

but the generated EXE file has language tag "Albanian" set in "details".

When I use the same configuration in launch4j standalone program, it works well...

@lukaszlenart
Copy link
Collaborator

This supposed to be resolved with #45 - do you use at least 1.7.12 version?

@lukaszlenart
Copy link
Collaborator

Also can you start Maven with --debug flag to see what language was set?

versionInfo.language = ENGLISH_US
versionInfo.languageIndex = 1033

@tofi86
Copy link
Contributor Author

tofi86 commented Dec 14, 2016

Yep, latest version.
This is the project and the Pom: https://github.com/paginagmbh/EPUB-Checker

Im on the way at the moment, cannot check debug, but will try...

@tofi86
Copy link
Contributor Author

tofi86 commented Dec 14, 2016

screenshot

However, versionInfo.languageIndex equals to null:

[DEBUG] versionInfo.language = ENGLISH_US
[DEBUG] versionInfo.languageIndex = 0
[DEBUG] versionInfo.trademarks = null
...
[DEBUG] OS = Windows 8.1
[DEBUG] Found launch4j version 3.9
[INFO] Platform-specific work directory already exists: C:\Users\Tobias Fischer\.m2\repository\net\sf\launch4j\launch4j\3.9
[INFO] launch4j: Compiling resources
[INFO] launch4j: Linking
[INFO] launch4j: Wrapping
[INFO] launch4j: Successfully created C:\Users\Tobias Fischer\github\EPUB-Checker\target\EPUB-Checker.exe

When using this in a launch4j config file (https://github.com/paginagmbh/EPUB-Checker/blob/master/src/build/launch4j-config.xml) with launch4j standalone version, it works well!

@lukaszlenart
Copy link
Collaborator

I have pushed a fix, could you test with the latest snapshot version?

@tofi86
Copy link
Contributor Author

tofi86 commented Dec 15, 2016

Yep, the fix works! Thanks! 👍

@lukaszlenart
Copy link
Collaborator

Thanks, 1.7.14 is under way to the Central :)

@tofi86
Copy link
Contributor Author

tofi86 commented Dec 15, 2016

Awesome, that was quick! 👍

@dyorgio
Copy link

dyorgio commented Feb 16, 2017

Hello, not working here with version 1.7.15 :(
Maven --debug output:

versionInfo.language = !Language.english.us!
versionInfo.languageIndex = 15

I'm using this on pom.xml:

<language>ENGLISH_US</language>

@lukaszlenart
Copy link
Collaborator

lukaszlenart commented Feb 21, 2017

What doesn't work? languageIndex is an internal index of a lang, not its international code

@lukaszlenart
Copy link
Collaborator

Can you test with the latest SNAPSHOT version?

@dyorgio
Copy link

dyorgio commented Feb 21, 2017

Done!
Same problem...:(

--- launch4j-maven-plugin:1.7.16-SNAPSHOT:launch4j (l4j-clui) @ agent ---
Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=63, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=36, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1, ConflictResolver.conflictItemCount=61, DefaultDependencyCollector.collectTime=86, DefaultDependencyCollector.transformTime=1}
com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:jar:1.7.16-20170221.122202-1:
   net.sf.launch4j:launch4j:jar:core:3.9:compile
      commons-beanutils:commons-beanutils:jar:1.7.0:compile
      commons-logging:commons-logging:jar:1.2:compile
      foxtrot:foxtrot:jar:2.0:compile
      com.jgoodies:jgoodies-common:jar:1.7.0:compile
      com.jgoodies:forms:jar:1.2.1:compile
      com.jgoodies:looks:jar:2.2.2:compile
      com.thoughtworks.xstream:xstream:jar:1.4.8:compile
         xmlpull:xmlpull:jar:1.1.3.1:compile
         xpp3:xpp3_min:jar:1.1.4c:compile
      org.apache.ant:ant:jar:1.8.2:compile
         org.apache.ant:ant-launcher:jar:1.8.2:compile
   org.apache.maven:maven-plugin-api:jar:3.2.5:compile
      org.apache.maven:maven-model:jar:3.2.5:compile
      org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.0.M1:compile
         javax.enterprise:cdi-api:jar:1.0:compile
            javax.annotation:jsr250-api:jar:1.0:compile
            javax.inject:javax.inject:jar:1:compile
         org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.0.M1:compile
         org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
         org.codehaus.plexus:plexus-classworlds:jar:2.5.1:compile
   org.apache.maven:maven-artifact:jar:2.2.1:compile
      org.codehaus.plexus:plexus-utils:jar:1.5.15:compile
   org.apache.maven:maven-project:jar:2.2.1:compile
      org.apache.maven:maven-settings:jar:2.2.1:compile
      org.apache.maven:maven-profile:jar:2.2.1:compile
      org.apache.maven:maven-artifact-manager:jar:2.2.1:compile
         org.apache.maven:maven-repository-metadata:jar:2.2.1:compile
         backport-util-concurrent:backport-util-concurrent:jar:3.1:compile
      org.apache.maven:maven-plugin-registry:jar:2.2.1:compile
      org.codehaus.plexus:plexus-interpolation:jar:1.11:compile
      org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
         junit:junit:jar:3.8.1:compile
         classworlds:classworlds:jar:1.1-alpha-2:compile
   org.apache.maven:maven-plugin-descriptor:jar:2.2.1:compile
Created new class realm plugin>com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:1.7.16-SNAPSHOT
Importing foreign packages into class realm plugin>com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:1.7.16-SNAPSHOT
  Imported:  < maven.api
Populating class realm plugin>com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:1.7.16-SNAPSHOT
  Included: com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:jar:1.7.16-SNAPSHOT
  Included: net.sf.launch4j:launch4j:jar:core:3.9
  Included: commons-beanutils:commons-beanutils:jar:1.7.0
  Included: commons-logging:commons-logging:jar:1.2
  Included: foxtrot:foxtrot:jar:2.0
  Included: com.jgoodies:jgoodies-common:jar:1.7.0
  Included: com.jgoodies:forms:jar:1.2.1
  Included: com.jgoodies:looks:jar:2.2.2
  Included: com.thoughtworks.xstream:xstream:jar:1.4.8
  Included: xmlpull:xmlpull:jar:1.1.3.1
  Included: xpp3:xpp3_min:jar:1.1.4c
  Included: org.apache.ant:ant:jar:1.8.2
  Included: org.apache.ant:ant-launcher:jar:1.8.2
  Included: javax.enterprise:cdi-api:jar:1.0
  Included: javax.annotation:jsr250-api:jar:1.0
  Included: org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.0.M1
  Included: org.codehaus.plexus:plexus-component-annotations:jar:1.5.5
  Included: org.codehaus.plexus:plexus-utils:jar:1.5.15
  Included: backport-util-concurrent:backport-util-concurrent:jar:3.1
  Included: org.codehaus.plexus:plexus-interpolation:jar:1.11
  Included: junit:junit:jar:3.8.1
Configuring mojo com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:1.7.16-SNAPSHOT:launch4j from plugin realm ClassRealm[plugin>com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:1.7.16-SNAPSHOT, parent: sun.misc.Launcher$AppClassLoader@42a57993]
Configuring mojo 'com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:1.7.16-SNAPSHOT:launch4j' with basic configurator -->
  (f) basedir = /Users/dyorgio/works/neocode/activities/agent
  (f) mainClass = com.neocode.activities.Main
  (f) addDependencies = false
  (f) preCp = anything
  (f) classPath = ClassPath{mainClass='com.neocode.activities.Main', addDependencies=false, jarLocation='null', preCp='anything', postCp='null'}
  (f) dependencies = [com.neocode.activities:dtos:jar:0.0.1-SNAPSHOT:compile, com.fasterxml.jackson.core:jackson-annotations:jar:2.8.1:compile, org.hibernate:hibernate-validator:jar:5.2.4.Final:compile, javax.validation:validation-api:jar:1.1.0.Final:compile, org.jboss.logging:jboss-logging:jar:3.2.1.Final:compile, com.fasterxml:classmate:jar:1.1.0:compile, net.java.dev.jna:jna-platform:jar:4.3.0:compile, net.java.dev.jna:jna:jar:4.3.0:compile, jnativehook:jnativehook:jar:2.0.3:compile, prettytools:jdde:jar:2.0.3:compile, com.google.oauth-client:google-oauth-client-java6:jar:1.22.0:compile, com.google.oauth-client:google-oauth-client:jar:1.22.0:compile, com.google.code.findbugs:jsr305:jar:1.3.9:compile, com.google.http-client:google-http-client-gson:jar:1.22.0:compile, com.google.http-client:google-http-client:jar:1.22.0:compile, org.apache.httpcomponents:httpclient:jar:4.0.1:compile, org.apache.httpcomponents:httpcore:jar:4.0.1:compile, commons-logging:commons-logging:jar:1.1.1:compile, commons-codec:commons-codec:jar:1.3:compile, com.google.code.gson:gson:jar:2.1:compile, com.google.guava:guava:jar:19.0:compile, com.h2database:h2:jar:1.4.193:compile, org.projectlombok:lombok:jar:1.16.12:compile]
  (f) dontWrapJar = false
  (f) errTitle = Activities - NeoCode Software
  (f) headerType = gui
  (f) icon = /Users/dyorgio/works/neocode/activities/agent/src/main/resources/icon.ico
  (f) jar = target/agent-0.0.1-SNAPSHOT-win_x64-jar-with-dependencies.jar
  (f) path = jre
  (f) bundledJre64Bit = true
  (f) runtimeBits = 64
  (f) jre = Jre{path='jre', minVersion='null', maxVersion='null', jdkPreference='null', initialHeapSize=0, initialHeapPercent=0, maxHeapSize=0, maxHeapPercent=0, opts=null, runtimeBits='64'}
  (f) localRepository =       id: local
      url: file:///Users/dyorgio/.m2/repository/
   layout: default
snapshots: [enabled => true, update => always]
 releases: [enabled => true, update => always]

  (f) outfile = /Users/dyorgio/works/neocode/activities/agent/target/Activities-x64.exe
  (f) pluginArtifacts = [com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:maven-plugin:1.7.16-SNAPSHOT:, net.sf.launch4j:launch4j:jar:core:3.9:compile, commons-beanutils:commons-beanutils:jar:1.7.0:compile, commons-logging:commons-logging:jar:1.2:compile, foxtrot:foxtrot:jar:2.0:compile, com.jgoodies:jgoodies-common:jar:1.7.0:compile, com.jgoodies:forms:jar:1.2.1:compile, com.jgoodies:looks:jar:2.2.2:compile, com.thoughtworks.xstream:xstream:jar:1.4.8:compile, xmlpull:xmlpull:jar:1.1.3.1:compile, xpp3:xpp3_min:jar:1.1.4c:compile, org.apache.ant:ant:jar:1.8.2:compile, org.apache.ant:ant-launcher:jar:1.8.2:compile, org.apache.maven:maven-plugin-api:jar:3.2.5:compile, org.apache.maven:maven-model:jar:3.2.5:compile, org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.0.M1:compile, javax.enterprise:cdi-api:jar:1.0:compile, javax.annotation:jsr250-api:jar:1.0:compile, javax.inject:javax.inject:jar:1:compile, org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.0.M1:compile, org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile, org.codehaus.plexus:plexus-classworlds:jar:2.5.1:compile, org.apache.maven:maven-artifact:jar:2.2.1:compile, org.codehaus.plexus:plexus-utils:jar:1.5.15:compile, org.apache.maven:maven-project:jar:2.2.1:compile, org.apache.maven:maven-settings:jar:2.2.1:compile, org.apache.maven:maven-profile:jar:2.2.1:compile, org.apache.maven:maven-artifact-manager:jar:2.2.1:compile, org.apache.maven:maven-repository-metadata:jar:2.2.1:compile, backport-util-concurrent:backport-util-concurrent:jar:3.1:compile, org.apache.maven:maven-plugin-registry:jar:2.2.1:compile, org.codehaus.plexus:plexus-interpolation:jar:1.11:compile, org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile, junit:junit:jar:3.8.1:compile, classworlds:classworlds:jar:1.1-alpha-2:compile, org.apache.maven:maven-plugin-descriptor:jar:2.2.1:compile]
  (f) plugins = [Plugin [org.codehaus.mojo:templating-maven-plugin], Plugin [org.apache.maven.plugins:maven-dependency-plugin], Plugin [org.apache.maven.plugins:maven-assembly-plugin], Plugin [com.akathist.maven.plugins.launch4j:launch4j-maven-plugin], Plugin [org.apache.maven.plugins:maven-clean-plugin], Plugin [org.apache.maven.plugins:maven-resources-plugin], Plugin [org.apache.maven.plugins:maven-jar-plugin], Plugin [org.apache.maven.plugins:maven-compiler-plugin], Plugin [org.apache.maven.plugins:maven-surefire-plugin], Plugin [org.apache.maven.plugins:maven-install-plugin], Plugin [org.apache.maven.plugins:maven-deploy-plugin], Plugin [org.apache.maven.plugins:maven-site-plugin]]
  (f) priority = normal
  (f) project = MavenProject: com.neocode.activities:agent:0.0.1-SNAPSHOT @ /Users/dyorgio/works/neocode/activities/agent/pom.xml
  (f) restartOnCrash = false
  (f) mutexName = neocodeActivities
  (f) singleInstance = com.akathist.maven.plugins.launch4j.SingleInstance@7c654cfc
  (f) stayAlive = true
  (f) fileVersion = 0.1.0.0
  (f) txtFileVersion = 0.1.0.0
  (f) productVersion = 0.1.0.0
  (f) txtProductVersion = 0.1.0.0
  (f) fileDescription = Activities Agent
  (f) copyright = ©2016 NeoCode Software
  (f) productName = Activities
  (f) internalName = Activities Agent
  (f) originalFilename = Actitivies.exe
  (f) companyName = NeoCode Software
  (f) language = ENGLISH_US
  (f) versionInfo = VersionInfo{fileVersion='0.1.0.0', txtFileVersion='0.1.0.0', fileDescription='Activities Agent', copyright='©2016 NeoCode Software', productVersion='0.1.0.0', txtProductVersion='0.1.0.0', productName='Activities', companyName='NeoCode Software', internalName='Activities Agent', originalFilename='Actitivies.exe', language='ENGLISH_US', trademarks='null'}
-- end configuration --
OS = Mac OS X
Found launch4j version 3.9
Platform-specific work directory already exists: /Users/dyorgio/.m2/repository/net/sf/launch4j/launch4j/3.9
headerType = gui
outfile = /Users/dyorgio/works/neocode/activities/agent/target/Activities-x64.exe
jar = target/agent-0.0.1-SNAPSHOT-win_x64-jar-with-dependencies.jar
dontWrapJar = false
errTitle = Activities - NeoCode Software
downloadUrl = http://java.com/download
supportUrl = null
cmdLine = null
chdir = null
priority = normal
stayAlive = true
restartOnCrash = false
icon = /Users/dyorgio/works/neocode/activities/agent/src/main/resources/icon.ico
objs = [w32api/crt2.o, head/guihead.o, head/head.o]
libs = [w32api/libmingw32.a, w32api/libgcc.a, w32api/libmsvcrt.a, w32api/libkernel32.a, w32api/libuser32.a, w32api/libadvapi32.a, w32api/libshell32.a]
vars = null
singleInstance.mutexName = neocodeActivities
singleInstance.windowTitle = null
jre.path = jre
jre.minVersion = null
jre.maxVersion = null
jre.jdkPreference = preferJre
jre.initialHeapSize = null
jre.initialHeapPercent = null
jre.maxHeapSize = null
jre.maxHeapPercent = null
jre.opts = null
classPath.mainClass = com.neocode.activities.Main
classPath.addDependencies = false
classPath.jarLocation = null
classPath.preCp = anything
classPath.postCp = null
splash = null
versionInfo.fileVersion = 0.1.0.0
versionInfo.txtFileVersion = 0.1.0.0
versionInfo.fileDescription = Activities Agent
versionInfo.copyright = ©2016 NeoCode Software
versionInfo.productVersion = 0.1.0.0
versionInfo.txtProductVersion = 0.1.0.0
versionInfo.productName = Activities
versionInfo.companyName = NeoCode Software
versionInfo.internalName = Activities Agent
versionInfo.originalFilename = Actitivies.exe
versionInfo.language = !Language.english.us!
versionInfo.languageIndex = 15
versionInfo.trademarks = null
messages = null
launch4j: Compiling resources

@lukaszlenart
Copy link
Collaborator

I don't understand, what's the problem?

@dyorgio
Copy link

dyorgio commented Feb 21, 2017

Hi,

Tag language appears to not working, final binary use 1024 as language code.

Maybe a macOS only issue?

@lukaszlenart
Copy link
Collaborator

Hm... strange, there is no such language code defined in the Launch4j

@dyorgio
Copy link

dyorgio commented Feb 21, 2017

@lukaszlenart I believe that is the same problem in issue #45.

@lukaszlenart
Copy link
Collaborator

Can you set <language></language>? It should fallback to ENGLISH_US

@dyorgio
Copy link

dyorgio commented Feb 21, 2017

You are right, it fallbacks to ENGLISH_US, but same trace and final result:

 (f) mutexName = neocodeActivities
  (f) singleInstance = com.akathist.maven.plugins.launch4j.SingleInstance@f32284d
  (f) stayAlive = true
  (f) fileVersion = 0.1.0.0
  (f) txtFileVersion = 0.1.0.0
  (f) productVersion = 0.1.0.0
  (f) txtProductVersion = 0.1.0.0
  (f) fileDescription = Activities Agent
  (f) copyright = ©2017 NeoCode Software
  (f) productName = Activities
  (f) internalName = Activities Agent
  (f) originalFilename = Actitivies.exe
  (f) companyName = NeoCode Software
  (f) versionInfo = VersionInfo{fileVersion='0.1.0.0', txtFileVersion='0.1.0.0', fileDescription='Activities Agent', copyright='©2017 NeoCode Software', productVersion='0.1.0.0', txtProductVersion='0.1.0.0', productName='Activities', companyName='NeoCode Software', internalName='Activities Agent', originalFilename='Actitivies.exe', language='ENGLISH_US', trademarks='null'}
-- end configuration --
OS = Mac OS X
Found launch4j version 3.9

...

versionInfo.language = !Language.english.us!
versionInfo.languageIndex = 15

@lukaszlenart
Copy link
Collaborator

Is it possible to test this build on a different box, Windows or Linux? Also can you use Launch4j directly? You can save config defined in pom.xml using <saveConfig>true</saveConfig> tag, at the end of successful build, the plugin will write the config into a XML file under target folder.

@tofi86
Copy link
Contributor Author

tofi86 commented Feb 22, 2017

I think you ran into https://sourceforge.net/p/launch4j/bugs/160/ which I discovered in paginagmbh/EPUB-Checker#35

You all should probably second / upvote the bugreport in the launch4j sourceforge project as well, because the developer didn't respond yet...

@lukaszlenart
Copy link
Collaborator

so it means that's an issue with windres itself

@dyorgio
Copy link

dyorgio commented Feb 22, 2017

@lukaszlenart Tks! My production setup have a Jenkins on docker (linux), I will put this on my list to verify on first public release of my software.

thomas3 added a commit to thomas3/launch4j-maven-plugin that referenced this issue Mar 12, 2017
…en-plugin

* 'master' of https://github.com/lukaszlenart/launch4j-maven-plugin: (31 commits)
  Adds ability to save config into a file
  Drops languageIndex as this just a fallback, using language itself should be sufficient
  Adds 1.7.15 version notes
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release launch4j-maven-plugin-1.7.15
  Updates version notes to add info about 1.7.14
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release launch4j-maven-plugin-1.7.14
  Fixes issue with setting Language Index Closes orphan-oss#50
  overwrite several properties analogous to the ANT task
  fix debug logging / also take config options from InFile into account
  Fixes small typo
  Adds version notes about 1.7.13
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release launch4j-maven-plugin-1.7.13
  [pom] Update assembly goal to single
  [pom] Update maven-surefire-plugin to 2.19.1
  [pom] Update maven-javadoc-plugin to 2.10.4
  [pom] Update maven-compiler-plugin to 3.6.0
  [pom] Update maven-assembly-plugin to 3.0.0
  ...
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

No branches or pull requests

3 participants