Giter VIP home page Giter VIP logo

Comments (8)

SerGreen avatar SerGreen commented on August 26, 2024 1

Haha, i'm glad the issue resolved itself. :)

As for "start parameters" - great suggestion. Also i think not only exe files should be allowed to be the 'main executable' for the package. exe, bat, cmd, lnk and sh - all should be selectable as a target file. I'll implement it in the next update soon.

I shall close this issue then.

from appacker.

SerGreen avatar SerGreen commented on August 26, 2024 1

@assenizator, just a heads up: features you suggested in this thread are already implemented in update v1.3.8 that i published just now.

from appacker.

SerGreen avatar SerGreen commented on August 26, 2024

Unpacker/repacker tool simply waits for the app's process to exit using .NET's method Process.WaitForExit(), so it seems that splash screen is a separate process from the main application.
With current implementation there's no option to add this 1 second delay - once target process is gone, it's gone, there's nothing for repacker to wait for. So, i see two options:

  1. It has to detect child processes that target process spawns and wait for them too.
  2. The way it waits for the target process to finish has to be changed.

If i understand correctly, you tried to get around this bug by making a deamon-program that launches the splash-screen-app, you packed this daemon together with splash-screen-app and made this deamon the target exe in Appacker. How did you check in your daemon if the splash-screen-app is closed or not? Maybe i should make repacker use the same method.

from appacker.

assenizator avatar assenizator commented on August 26, 2024

here is my daemon for game "osu!" (also splash screen issue). Written on Windows CMD(BAT). Compiled as "Windowded, with hidden console"

@echo off
start osu!.exe
ping 127.0.0.1 -n 10 > nul  _// here I wait for osu to launch_
:LOOP
tasklist|findstr osu!.exe > nul     _// find process of app_
if %errorlevel%==1 goto ENDLOOP  _// if not running, end loop and close daemon_
ping 127.0.0.1 -n 2 > nul   _//wait for 1 second_
goto LOOP
:ENDLOOP
taskkill /F /IM osu!.exe  _//optional. to make 100% sure I also coded force quit_
exit

And this daemon is the entry point of app. appacker sees when daemon is closed and repacks the app then. Daemon is like a launcher.

P.S. as you see, apps splash screen launcher and the app itself are the same processes and executables in both cases: audacity and osu. Just after splash screen app relaunches (it takes much less than one second) but .NETs methods think it`s closed.

from appacker.

SerGreen avatar SerGreen commented on August 26, 2024

Hm, so you're searching for a process with a given name to check if it's alive. However, if there's multiple instances of "osu!", for example, from starting packed app several times, it wouldn't be able to differentiate between them and each repacker would wait for all instances of "osu!" to close.
Not a perfect solution, but it would work. I'll try to make it detect child processes first and see if it will work. And if it won't, then i'll implement the way you used.

from appacker.

SerGreen avatar SerGreen commented on August 26, 2024

Wait, can you please name a few more examples of splash screen apps that have this issue? Preferably of a small size so they pack/unpack faster.

I tried to replicate this with Audacity and osu! and wasn't able to. For me repacker process doesn't close after osu's or Audacity's splash screen and waits for the main app to close. Only when i try to launch another instance of Audacity/osu! repacker exits after the splash screen, because both apps don't allow creation of multiple instances if they detect that one is already running.

from appacker.

assenizator avatar assenizator commented on August 26, 2024

I wasn`t able to reproduce the bug too. Everything worked with both apps without daemons
I remembered! I had this problem becase used portable apps I made with using ThinApp. When I made apps portable with thinapp I received the same problem. Sorry for false bug report

bandicum.2020-12-26.10-20-33-771.mp4

But I also had a script that should run in osu!`s folder. Can you please give an advice how to run batch script when app launches? Without daemons because if I set daemon as launcher, packed app cannot be set as default for file type :)))
It would be also cool if you add such a feature as "Start parameters". Something like "-nocache" that we type in shortcut after app's path

from appacker.

assenizator avatar assenizator commented on August 26, 2024

Yes! That`s what I wanted also - ability to make bats as entry points. Also would be nice to have two entry points - main - main exe, secondary - some script or daemon etc (just an idea)
Thank you!!!!

from appacker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.