Skip to content

Commit

Permalink
Merge pull request #82 from masqu3rad3/TIK-113-installer-and-document…
Browse files Browse the repository at this point in the history
…ation-for-Mari

mari installer and documentation
  • Loading branch information
masqu3rad3 authored Apr 1, 2024
2 parents ff9f10a + 4ecd8a6 commit 466bcb0
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 14 deletions.
4 changes: 3 additions & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ Installation

Automatic Installation
----------------------
Coming soon.
Currently Automatic installation is only available for Windows.
Download the exe installer from the latest release and follow the instructions.

Manual Installation
-------------------
Expand All @@ -27,5 +28,6 @@ Each DCC can be integrated individually.
/installation/houdini
/installation/katana
/installation/maya
/installation/mari
/installation/nuke
/installation/photoshop
18 changes: 18 additions & 0 deletions docs/source/installation/mari.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Mari Integration
===================

1. Locate the Mari scripts folder. (Create the Scripts folder if it doesn't exist)

.. tip::
| On Linux: ``/Mari/Scripts``
| On Windows: ``Documents\Mari\Scripts``
| On Mac: ``/Documents/Mari/Scripts``
2. Find the ``tikmanager4_init.py`` file in the ``tik_manager4/dcc/mari/setup`` folder and copy it to the Mari scripts folder.

3. Open the copied ``tikmanager4_init.py`` with a text editor and replace the ``PATH\\TO\\PARENT\\FOLDER\\OF\\TIKMANAGER4\\`` with the extracted parent of the tik_manager4 folder.

.. attention::
The Path MUST be the parent of the tik_manager4 folder. If you extracted the contents directly from the zip file it will be something like ``tik_manager4-4.0.7-beta``.

4. Open Mari and you should see the Tik Manager menu in the top menu bar.
15 changes: 7 additions & 8 deletions package/tik_manager4_innosetup.iss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define appName "Tik Manager4"
#define appVersion "4.0.6"
#define appVersion "4.0.8"

[Setup]
AppId={{0BAFF3AF-5D10-4CA9-9232-428F16D17175}
Expand Down Expand Up @@ -41,8 +41,9 @@ Name: "Houdini"; Description: "Houdini"; Flags: checkedonce
Name: "Max"; Description: "3dsMax"; Flags: checkedonce
Name: "Blender"; Description: "Blender"; Flags: checkedonce
Name: "Nuke"; Description: "Nuke"; Flags: checkedonce
Name: "Katana"; Description: "Katana"; Flags: checkedonce
Name: "Photoshop"; Description: "Photoshop"; Flags: checkedonce
Name: "Katana"; Description: "Katana"; Flags: checkedonce
Name: "Mari"; Description: "Mari"; Flags: checkedonce

[Code]
type
Expand Down Expand Up @@ -86,10 +87,12 @@ begin
strFlag := strFlag + ' ' + 'Blender';
if WizardIsTaskSelected('Nuke') then
strFlag := strFlag + ' ' + 'Nuke';
if WizardIsTaskSelected('Katana') then
strFlag := strFlag + ' ' + 'Katana';
if WizardIsTaskSelected('Photoshop') then
strFlag := strFlag + ' ' + 'Photoshop';
if WizardIsTaskSelected('Katana') then
strFlag := strFlag + ' ' + 'Katana';
if WizardIsTaskSelected('Mari') then
strFlag := strFlag + ' ' + 'Mari';
result := strFlag;
end;
Expand Down Expand Up @@ -159,7 +162,3 @@ end;
[Run]
Filename: "{app}\dist\tik4\install_dccs.exe"; Parameters: "-b {code:GetActiveTasks}";




#define appVersion "4.0.5"
2 changes: 1 addition & 1 deletion tik_manager4/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version_info__ = ('4', '0', '6')
__version_info__ = ('4', '0', '8')
__version__ = '.'.join(__version_info__)
36 changes: 33 additions & 3 deletions tik_manager4/dcc/dcc_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ def __init__(self, argv):
"3dsMax": self.max_setup,
"Blender": self.blender_setup,
"Nuke": self.nuke_setup,
"Photoshop": self.photoshop_setup,
"Katana": self.katana_setup,
"Photoshop": self.photoshop_setup
"Mari": self.mari_setup,
}

def install_all(self):
Expand All @@ -65,8 +66,9 @@ def install_all(self):
self.max_setup(prompt=False)
self.blender_setup(prompt=False)
self.nuke_setup(prompt=False)
self.katana_setup(prompt=False)
self.photoshop_setup(prompt=False)
self.katana_setup(prompt=False)
self.mari_setup(prompt=False)
ret = input("Setup Completed. Press Enter to Exit...")
assert isinstance(ret, str)
sys.exit()
Expand Down Expand Up @@ -487,8 +489,36 @@ def katana_setup(self, prompt=True):
_r = input("Press Enter to continue...")
assert isinstance(_r, str)

def mari_setup(self, prompt=True):
"""Install Mari."""
print_msg("Starting Mari Setup...")

if self.check_running_instances("Mari") == -1:
print_msg("Installation aborted by user.")
return

user_mari_scripts_folder = self.user_home / "Documents" / "Mari" / "Scripts"
user_mari_scripts_folder.mkdir(parents=True, exist_ok=True)

source_script = self.tik_dcc_folder / "mari" / "setup" / "tikmanager4_init.py"

# copy the source to the user's scripts folder
init_file = user_mari_scripts_folder / "tikmanager4_init.py"
shutil.copy(source_script, init_file)

injector = Injector(init_file)
injector.match_mode = "contains"
injector.replace_single_line(f"tik_path = '{self.tik_root.parent.as_posix()}'",
line="tik_path = ")

print_msg("Mari setup completed.")
if prompt:
_r = input("Press Enter to continue...")
assert isinstance(_r, str)


def photoshop_setup(self, prompt=True):
"""Installs the Photoshop plugin."""
"""Install the Photoshop plugin."""
print_msg("Starting Photoshop Setup...")

if self.check_running_instances("Photoshop") == -1:
Expand Down
19 changes: 18 additions & 1 deletion tik_manager4/dcc/mari/setup/how-to-install.txt
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
Tik Manager 4 <template_dcc_name> Installation Guide
Mari Integration
===================

1. Locate the Mari scripts folder. (Create the Scripts folder if it doesn't exist)

.. tip::
| On Linux: ``/Mari/Scripts``
| On Windows: ``Documents\Mari\Scripts``
| On Mac: ``/Documents/Mari/Scripts``

2. Find the ``tikmanager4_init.py`` file in the ``tik_manager4/dcc/mari/setup`` folder and copy it to the Mari scripts folder.

3. Open the copied ``tikmanager4_init.py`` with a text editor and replace the ``PATH\\TO\\PARENT\\FOLDER\\OF\\TIKMANAGER4\\`` with the extracted parent of the tik_manager4 folder.

.. attention::
The Path MUST be the parent of the tik_manager4 folder. If you extracted the contents directly from the zip file it will be something like ``tik_manager4-4.0.7-beta``.

4. Open Mari and you should see the Tik Manager menu in the top menu bar.
18 changes: 18 additions & 0 deletions tik_manager4/dcc/mari/setup/tikmanager4_init.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Tik Manager 4 [Start]
import mari
import sys
tik_path = 'PATH\\TO\\PARENT\\FOLDER\\OF\\TIKMANAGER4\\'
if not tik_path in sys.path:
sys.path.append(tik_path)

tik_main_ui_action = mari.actions.create('Main UI', 'from tik_manager4.ui import main;main.launch("mari")')
mari.menus.addAction(tik_main_ui_action, 'MainWindow/Tik Manager')

tik_new_version = mari.actions.create('New Version', 'from tik_manager4.ui import main;tui = main.launch("Mari", dont_show=True);tui.on_new_version()')
mari.menus.addAction(tik_new_version, 'MainWindow/Tik Manager')

tik_publish = mari.actions.create('Publish', 'from tik_manager4.ui import main;tui = main.launch("Mari", dont_show=True);tui.on_publish_scene()')
mari.menus.addAction(tik_publish, 'MainWindow/Tik Manager')
# Tik Manager 4 [End]


Binary file modified tik_manager4/dist/tik4/install_dccs.exe
Binary file not shown.
Binary file modified tik_manager4/dist/tik4/tik4_photoshop.exe
Binary file not shown.
Binary file modified tik_manager4/dist/tik4/tik4_ps_new_version.exe
Binary file not shown.
Binary file modified tik_manager4/dist/tik4/tik4_ps_publish.exe
Binary file not shown.
Binary file modified tik_manager4/dist/tik4/tik4_standalone.exe
Binary file not shown.

0 comments on commit 466bcb0

Please sign in to comment.