rcedit icon indicating copy to clipboard operation
rcedit copied to clipboard

Not working - resulting file half the size, crashes on start.

Open AndrewSav opened this issue 4 years ago • 8 comments

Used windows build with --set-icon parameter. The resulting file was half the size and could not start.

AndrewSav avatar Dec 09 '19 00:12 AndrewSav

same here

Hawax avatar Apr 13 '20 13:04 Hawax

Used windows build with --set-icon parameter. The resulting file was half the size and could not start.

here we go good alternative: https://www.carifred.com/fvie/

Hawax avatar Apr 13 '20 15:04 Hawax

I think judging by the lack of activity we can confidently assume rcedit is abandoned.

AndrewSav avatar Apr 15 '20 06:04 AndrewSav

@AndrewSav @Hawax are either of you by chance working on an archive type file. If so this could be related to #69 . rcedit takes a ~280 MB file to a ~85 KB file for me.

JonathanLindsey avatar Jun 16 '20 22:06 JonathanLindsey

@JonathanLindsey I'm not.

AndrewSav avatar Jun 17 '20 00:06 AndrewSav

I have a hello-world exe compile from dart. The original size is about 4M, after I execute resources\rcedit-x64.exe build\app_launcher.exe --set-icon resources\app_icon.ico, the new one is about 3M. And when I run the new one, it did not work. I also tried ResourceHacker, it is the same issue.

D:\code\dart\app_launcher>build\app_launcher.default.exe
Hello world: 42!

D:\code\dart\app_launcher>build\app_launcher.rcedit.exe
Usage: dart [<vm-flags>] <dart-script-file> [<script-arguments>]

Executes the Dart script <dart-script-file> with the given list of <script-arguments>.

Common VM flags:
--enable-asserts
  Enable assert statements.
--help or -h
  Display this message (add -v or --verbose for information about
  all VM options).
--packages=<path>
  Where to find a package spec file.
--observe[=<port>[/<bind-address>]]
  The observe flag is a convenience flag used to run a program with a
  set of options which are often useful for debugging under Observatory.
  These options are currently:
      --enable-vm-service[=<port>[/<bind-address>]]
      --pause-isolates-on-exit
      --pause-isolates-on-unhandled-exceptions
      --warn-on-pause-with-no-debugger
  This set is subject to change.
  Please see these options (--help --verbose) for further documentation.
--write-service-info=<file_uri>
  Outputs information necessary to connect to the VM service to the
  specified file in JSON format. Useful for clients which are unable to
  listen to stdout for the Observatory listening message.
--snapshot-kind=<snapshot_kind>
--snapshot=<file_name>
  These snapshot options are used to generate a snapshot of the loaded
  Dart script:
    <snapshot-kind> controls the kind of snapshot, it could be
                    kernel(default) or app-jit
    <file_name> specifies the file into which the snapshot is written
--version
  Print the SDK version.

D:\code\dart\app_launcher>
D:\code\dart\app_launcher>resources\ResourceHacker.exe -open build\app_launcher.exe -save build\app_launcher.rh.exe -action addskip -res resources\app_icon.ico -mask ICONGROUP,MAINICON,

D:\code\dart\app_launcher>

[19 Mar 2021, 09:17:25]

Current Directory:
D:\code\dart\app_launcher

Commandline:
resources\ResourceHacker.exe  -open build\app_launcher.exe -save build\app_launcher.rh.exe -action addskip -res resources\app_icon.ico -mask ICONGROUP,MAINICON,

Open    : D:\code\dart\app_launcher\build\app_launcher.exe
Save    : D:\code\dart\app_launcher\build\app_launcher.rh.exe
Resource: D:\code\dart\app_launcher\resources\app_icon.ico

  Added: ICONGROUP,MAINICON,0

Success!

D:\code\dart\app_launcher>
D:\code\dart\app_launcher>build\app_launcher.rh.exe
Loading failed: Expected little-endian ELF object.
Usage: dart [<vm-flags>] <dart-script-file> [<script-arguments>]

Executes the Dart script <dart-script-file> with the given list of <script-arguments>.

Common VM flags:
--enable-asserts
  Enable assert statements.
--help or -h
  Display this message (add -v or --verbose for information about
  all VM options).
--packages=<path>
  Where to find a package spec file.
--observe[=<port>[/<bind-address>]]
  The observe flag is a convenience flag used to run a program with a
  set of options which are often useful for debugging under Observatory.
  These options are currently:
      --enable-vm-service[=<port>[/<bind-address>]]
      --pause-isolates-on-exit
      --pause-isolates-on-unhandled-exceptions
      --warn-on-pause-with-no-debugger
  This set is subject to change.
  Please see these options (--help --verbose) for further documentation.
--write-service-info=<file_uri>
  Outputs information necessary to connect to the VM service to the
  specified file in JSON format. Useful for clients which are unable to
  listen to stdout for the Observatory listening message.
--snapshot-kind=<snapshot_kind>
--snapshot=<file_name>
  These snapshot options are used to generate a snapshot of the loaded
  Dart script:
    <snapshot-kind> controls the kind of snapshot, it could be
                    kernel(default) or app-jit
    <file_name> specifies the file into which the snapshot is written
--version
  Print the SDK version.

D:\code\dart\app_launcher>

These files are attached here.

build.zip

liudonghua123 avatar Mar 19 '21 01:03 liudonghua123

I tested with the latest 2.17.0-246.0.dev, it seemed worked now.

D:\code\dart\app_launcher>dart --version
Dart SDK version: 2.17.0-246.0.dev (dev) (Sun Mar 27 12:20:08 2022 -0700) on "windows_x64"

D:\code\dart\app_launcher>
D:\code\dart\app_launcher>dart tool/grind.dart clean build
grinder running clean build

clean

build

finished in 4.5 seconds

D:\code\dart\app_launcher>cp build\app_launcher.exe build\app_launcher_default.exe

D:\code\dart\app_launcher>resources\rcedit-x64.exe build\app_launcher.exe --set-icon resources\app_icon.ico

D:\code\dart\app_launcher>dir build\
 Volume in drive D is Data
 Volume Serial Number is 08F2-7D08

 Directory of D:\code\dart\app_launcher\build

2022/03/31  23:50    <DIR>          .
2022/03/31  23:49    <DIR>          ..
2022/03/31  23:49         5,693,952 app_launcher.exe
2022/03/31  23:49         5,593,600 app_launcher_default.exe
2022/03/31  23:50                 0 log.txt
               3 File(s)     11,287,552 bytes
               2 Dir(s)  260,915,826,688 bytes free

D:\code\dart\app_launcher>
D:\code\dart\app_launcher>build\app_launcher.exe
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ #0   main (file:///d:/code/dart/app_launcher/bin/app_launcher.dart:20)
│ #1   _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295)
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
│ 💡 workingDirectory: build
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ #0   main (file:///d:/code/dart/app_launcher/bin/app_launcher.dart:23)
│ #1   _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295)
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
│ ⛔ config.yaml file not found!
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

D:\code\dart\app_launcher>

liudonghua123 avatar Mar 31 '22 15:03 liudonghua123

Probably related to #90

meichthys avatar Feb 01 '24 13:02 meichthys