Author Topic: Forcing install order within a set of components, regardless of reinstallation  (Read 1711 times)

Offline cmorgan

  • Planewalker
  • *****
  • Posts: 1424
  • Gender: Male
  • Searcher of Bugs
 8) ok, I think I understand UNINSTALL-- what I can't figure out is how to parse it so that no matter what is done to install/reinstall the components within a mod, a single component "floats" to the end position.

I have a component, designated #200, with big warnings about it needing to be installed last in the order of components within the mod.

I easily set up dependency on A, thanks to your help, the bigg - flagged, no other component can install without A and if you pull A the whole mod uninstalls.

Right now, it is possible to install
A > B> C> 200

then uninstall B>

A> C > 200

Then reinstall B>

A > C > 200 > B

can folks point me to the correct sections of documentation, or an example, so I can try to stop users from accidentally messing up PIDs?

Offline Nythrun

  • Planewalker
  • *****
  • Posts: 89
  • Gender: Female
B and C should contain UNINSTALL ~bg1npcproject.tp2~ 200 ~preserving install order~

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
In a nutshell, the ideal solution would be to wait for WeiGUI + WeiDB (of course). Using FORCE_AT_TOP_OF_STACK, FORCE_AT_TOP_OF_TP2 commands sends warning shivers down my back, but since all install order code is going down the toilet and being rewritten nearly from scratch I'll see about adding the keyword anyhow.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline cmorgan

  • Planewalker
  • *****
  • Posts: 1424
  • Gender: Male
  • Searcher of Bugs
understood...

under the current versions, though the workaround would be  if each component does

Code: [Select]
/* DYNAHEIR ROMANCE */
BEGIN @1012  /* The BG1 NPC Project: Dynaheir's Romance Core (teen content) */
GROUP @1010  /* The BG1 NPC Project: Romances */
REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */
  ACTION_IF FILE_EXISTS_IN_GAME ~X#BG1NPCPlayerInitDlg.G3~ THEN BEGIN
    UNINSTALL ~bg1npc.tp2~ 200 ~Preserving install order: Player Initiated Dialogues will have to be reinstalled last.~
  END
and then the component does
Code: [Select]
/* Player-Initiated Dialogues: always keep the VERY last of BG1NPC to compile! */
BEGIN @1091 DESIGNATED 200    /* The BG1 NPC Project: Player-Initiated Dialogues */
  GROUP @1006
  REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */
    COPY ~BG1NPC/Core/X#component.xx~ ~override/X#BG1NPCPlayerInitDlg.G3~
  this means that the warning will pop up, and the component will be uninstalled. Actually, it is already uninstalled when you change somehing else - what this does is remove it from the list of things that WeiDU will automatically reinstall?

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Actually, it is already uninstalled when you change somehing else - what this does is remove it from the list of things that WeiDU will automatically reinstall?
Yes, it should go from Partially_Uninstalled to pure Uninstalled.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline cmorgan

  • Planewalker
  • *****
  • Posts: 1424
  • Gender: Male
  • Searcher of Bugs
Cool - I will recode for this behavior.

the bigg, I really don't see any need to do any rebuild of this to FORCE_AT_TOP_OF_STACK or such, unless you need it for WeiGUI. I am cretainly happy with the existing stuff. i just need to learn to take advantage of it.

Before I do this, though, one last question -- since everything is pulled out anyways, the flag file will be missing, so I need to detect the tp2 entry rather than the flag file, right?
« Last Edit: March 29, 2007, 10:01:30 AM by cmorgan »

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Before I do this, though, one last question -- since everything is pulled out anyways, the flag file will be missing, so I need to detect the tp2 entry rather than the flag file, right?
The tp2 entry will appear to be missing, too. Use UNINSTALL outside of any ACTION_IF check. And remember to check to see if it actually works!
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline cmorgan

  • Planewalker
  • *****
  • Posts: 1424
  • Gender: Male
  • Searcher of Bugs
ok - at the beginning of each component except the actual PID component, the straightforward line

UNINSTALL ~bg1npc.tp2~ 200  @999 /* ~Preserving install order: Player Initiated Dialogues will have to be installed last.~ */

Then check to see if it works.

i will probably be able to get there by Saturday...

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: